Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在本地IIS中运行asp.net应用程序_C#_Asp.net_Iis_Asp.net Mvc 5 - Fatal编程技术网

C# 如何在本地IIS中运行asp.net应用程序

C# 如何在本地IIS中运行asp.net应用程序,c#,asp.net,iis,asp.net-mvc-5,C#,Asp.net,Iis,Asp.net Mvc 5,我对asp.net有点陌生 我已经使用Visual studio 2013 Web Express和MVC5创建了一个应用程序。当我想运行应用程序时,我从VS按下run按钮,它成功地打开了它 现在,我将服务器从iisexpress切换到localiis。当我在浏览器中运行应用程序时,它会 Server Error in '/' Application. <br> Access is denied. Description: An error occurred while acce

我对asp.net有点陌生

我已经使用Visual studio 2013 Web Express和MVC5创建了一个应用程序。当我想运行应用程序时,我从VS按下run按钮,它成功地打开了它

现在,我将服务器从
iisexpress
切换到
localiis
。当我在浏览器中运行应用程序时,它会

Server Error in '/' Application. <br>
Access is denied. 

Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration.  Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server.  Contact the Web server's administrator for additional assistance.

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446 
“/”应用程序中出现服务器错误
访问被拒绝。 描述:访问服务此请求所需的资源时出错。服务器可能未配置为访问请求的URL。 错误消息401.2.:未经授权:由于服务器配置,登录失败。根据您提供的凭据和Web服务器上启用的身份验证方法,验证您是否具有查看此目录或页面的权限。请与Web服务器的管理员联系以获得其他帮助。 版本信息:Microsoft.NET Framework版本:4.0.30319;ASP.NET版本:4.0.30319.18446

我想是因为我没有像
Default.aspx那样的文件,我不知道问题出在哪里???

这是一个权限问题。在visual studio中开发和运行应用程序时,它拥有所需的所有权限。因此,当您希望直接从Web服务器演示/使用站点时,需要配置iis。在IIS中创建应用程序后->选择应用程序,并在操作窗格中看到“编辑权限”链接。单击该按钮将打开“属性”选项卡,并在“安全性”下添加您的帐户或管理员帐户,并提升权限,直到网站正常工作。

我成功地使其正常工作

问题是,我正在使用windows身份验证访问web应用程序(VS在项目首次创建时询问我)。现在我不知道我也需要在iis中设置它


我所做的只是在iis>MySite>身份验证中启用了
Windows身份验证

我授予了对我的帐户和其他用户的完全访问权限,但仍然无法工作。