当我尝试通过删除来执行简单的帖子时,出现 405 错误。我可以很好地读取、写入和更新,但无法弄清楚为什么 Visual Studio 2017(或者更具体地说,IIS Express)不允许我执行删除。
\n\n互联网上有很多关于 的帖子web.config,但它们都是较旧的帖子,最近的帖子不起作用。事实上,web.config我的项目中没有包含它,因为我相信微软正在走向appsettings.json。
我正在 Docker 容器中运行 Visual Studio 2017 v15.9.11 和 .NET Core 2.2。我切换到 IIS Express 但没有运气。我已经查看了applicationhost.configIIS Express 的文件,并且 WebDav 已被注释掉。我相信它发生在网络服务器级别,因为我在调试时没有受到控制器的影响。我最好的猜测是某个地方有一个默认设置不允许删除;我就是找不到它。
namespace Efficacy.Models.Entities\n{\n /* dbo.Contact.Contact */\n public class Contact\n {\n private const string V = "First Name";\n\n public int Id { get; set; }\n public ContactType ContactType { get; set; }\n public int ContactTypeId { get; set; }\n\n [Required]\n //[Display( Description …Run Code Online (Sandbox Code Playgroud) 我已经(成功)使用自定义域通过 Visual Studio 2017 / IISExpress 运行了几个 ASP.NET(.NET Framework 4.6.2、WebForms)网站。前几天我安装了 Visual Studio 2019(社区),突然自定义域停止在 Visual Studio 2017 和 2019 中的所有项目上工作!IIS Express 的系统托盘仍然继续显示绑定已接受:
但是,当尝试浏览该 URL 时,Chrome 会给出“ERR_CONNECTION_REFUSED”错误:
需要明确的是,每个项目采取的步骤如下:
applicationhost.configWeb 项目.vs文件夹中的文件以包括:<binding protocol="http" bindingInformation="*:80:agentdesktop.local" />
netsh http add urlacl url=http://agentdesktop.local:80/ user=everyone
127.0.0.1 agentdesktop.local
我已经删除了.vs目录,删除了urlacl条目,删除了文件夹IISExpress中的目录Documents。按照之前的方式执行了上述所有操作,但我仍然无法让它接受连接!
如果我 ping agentdesktop.local,那么我会收到来自 127.0.0.1 的有效响应,而且它出现在 IIS Express 系统托盘中,这一事实让我认为介于两者之间的某些东西正在拦截和阻止。
还有其他人对我如何使其恢复正常工作有任何想法吗,或者可能出了什么问题!?
IIS Express 服务器未启动并引发以下错误。
尝试为项目 <project_name> 配置 IIS Express 时发生以下错误。
文件名:redirection.config
错误:无法读取配置文件
我重新安装了 IIS Express 服务器,删除并安装了所有软件包,甚至修复了 Visual Studio。但没有任何效果。
我删除了.VS文件夹,即使这样也不起作用:-(。
当我需要从HTML编辑器发布HTML时,我一直能够关闭IIS和cassini上的请求验证.问题是我似乎无法在IIS Express上这样做.尝试了以下内容:
<%@ Page Language="C#" ValidateRequest="false"
<system.web>
<pages validateRequest="false">
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
谢谢.
最近,我一直在使用IIS Express,它的确很棒。但是,我有无法解决的情况。
我正在开发一个Webapp,用户应该可以使用其AD帐户登录。由于将运行WebApp的服务器不在域中,因此我将ADFS 2.0用作SSO解决方案来解决此问题。
为了简化该项目的开发,我选择在开发时使用IIS Express。
为了能够在开发环境中与ADFS 2.0服务器交换声明信息,我必须为站点配置应用程序池,以将“加载用户配置文件”设置为true(例如IIS 7.5)。我在网上搜索,到目前为止,几乎没有找到有关如何在IIS Express中配置应用程序池的文档。
我正在使用VS 2012开发Asp.Net MVC 4应用程序.在本地运行的应用程序使用IIS Express作为Web服务器.我在尝试访问作为我的解决方案一部分的文件时遇到问题.我有以下操作方法:
public FileContentResult GetImage()
{
byte[] imageByte = System.IO.File.ReadAllBytes(@"/MyPics/My.jpg");
string contentType = "image/jpeg";
return File(imageByte, contentType);
}
Run Code Online (Sandbox Code Playgroud)
在第一行中,我收到以下错误:
Could not find a part of the path 'C:\Program Files (x86)\IIS Express\~\MyPics\My.jpg'
Run Code Online (Sandbox Code Playgroud)
我知道上面的路径不正确,但我无法理解为解决这个问题我应该提供什么路径.
关心Pawan Mishra
我正在使用WCF,C#和.NET Framework 4.0开发REST Web服务.
我已按照本教程创建自己的证书,并使用IIS Express作为开发服务器.
但是现在,我不知道为什么,如果我使用https而不是http,我就无法访问我的网络服务.
这是IIS Express applicationhost.config:
<site name="MyGameWCFService" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="D:\Fuentes\CSharp\Test\MyLib\MyGameWCFService" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:7342:localhost" />
<binding protocol="https" bindingInformation="*:44300:localhost" />
<binding protocol="https" bindingInformation="*:443:Melnibone" />
</bindings>
</site>
Run Code Online (Sandbox Code Playgroud)
这是我的WCF web.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=4.4.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web> …Run Code Online (Sandbox Code Playgroud) 我只是启用了源地图,因为,为什么不,我想尝试一下.但是,我发现IISExpress不会下载.coffee文件,所以它不起作用.
我确定这是一个简单的web.config修改,我只是不确定是哪一个.如何配置它来提供这些服务?
当我请求[授权]装饰的控制器操作而不是重定向到登录页面时,我收到401错误.
这是一个使用IIS Express上运行的身份模板的.net核心mvc应用程序.
当我从program.cs运行应用程序时,重定向到登录工作正常.我已经为cookie身份验证添加了明确的指示,以便在配置和服务部分使用/ Account/Login重定向,以及配置Identity来执行此重定向.
我无法让它发挥作用.下面是我的StartUp类,我应该更改什么才能使它在IIS express中运行?:
public class Startup
{
private MapperConfiguration _mapperConfiguration { get; set; }
public Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
if (env.IsDevelopment())
{
// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
builder.AddUserSecrets();
}
builder.AddEnvironmentVariables();
Configuration = builder.Build();
_mapperConfiguration = new MapperConfiguration(cfg =>
{
cfg.AddProfile(new AutoMapperProfileConfiguration());
});
}
public IConfigurationRoot Configuration { get; }
// This method gets called by the …Run Code Online (Sandbox Code Playgroud) redirect http-status-code-401 iis-express asp.net-identity asp.net-core-mvc
我正在尝试在 VS2015 中加载一个 Web 项目,但出现以下错误。
创建虚拟目录 http://localhost:16858/ 失败并显示错误:文件名:redirection.config 错误:无法读取配置文件。
我试图删除 *.csproj.user 来重建文件。但它没有用。
如何解决这个问题呢 ?有什么建议 ?
我在 VS 2017 中使用 ASP.NET Core。我想知道构建的应用程序是否同时创建IIS Express and Kestrel?还是只是其中之一?我只是在本地说话。
我正在构建一个RESTful web api,它将启动几个任务,等待它们完成然后返回一些数据.但我一直有问题,等待时似乎挂了.我把它缩小到最基本的范围:
[Authorize]
public class ValuesController : ApiController
{
public IEnumerable<string> Get([FromUri]bool enableWait)
{
Task t = Silly(enableWait);
t.Wait();
return new string[] { "value1", "value2" };
}
private async Task Silly(bool delay)
{
if (delay)
await Task.Delay(1);
}
}
Run Code Online (Sandbox Code Playgroud)
如果我传递false,则返回没有任何问题.如果我返回true,它应该等待1毫秒(加上Task/Asnyc开销)然后返回.然而它只是挂在那里.
我在VS 2017附带的IIS Express上运行它.任何线索?
iis-express ×12
asp.net ×5
asp.net-core ×3
c# ×3
.net ×2
rest ×2
adfs2.0 ×1
asp.net-mvc ×1
async-await ×1
iis ×1
redirect ×1
ssl ×1
wcf ×1
wif ×1