简体   繁体   English

将ASP.net MVC项目部署到IIS并重定向到login.aspx

[英]Deploy ASP.net MVC project to IIS and redirect to login.aspx

I have an ASP.NET MVC 4 project that I just deployed to IIS. 我有一个刚刚部署到IIS的ASP.NET MVC 4项目。 When I tried to browse the web from the IIS, it always redirect to login.aspx (which I believe I have no such file on my project, I tried to search for login.aspx file on my project and found none). 当我尝试从IIS浏览Web时,它总是重定向到login.aspx(我相信我的项目中没有这样的文件,我试图在我的项目中搜索login.aspx文件,但没有找到)。 I got this error message: 我收到此错误消息:

404 - File or directory not found.
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

I know there are some questions out there that are similar to mine, but none of the solution provided work on mine. 我知道那里有一些与我的问题类似的问题,但是没有一个解决方案可以解决我的问题。 Can you help please? 你能帮忙吗? Thank you! 谢谢!

More info: btw, i'm using windows authentication. 更多信息:顺便说一句,我正在使用Windows身份验证。 here is the code in my web.config file: 这是我的web.config文件中的代码:

<authentication mode="Windows"/>
    <identity impersonate="true"/>
    <authorization>
      <deny users="?"/>
    </authorization>

Check this out - http://adilmughal.com/blog/2013/02/asp-net-mvc-4-redirects-incorrect-login-url-login-aspx/ 检查一下-http://adilmughal.com/blog/2013/02/asp-net-mvc-4-redirects-incorrect-login-url-login-aspx/

Also, if you are using STS or Single sign on, please make sure you remove the WebMatrix.dll and WebMAtrix.data.dll from your project. 另外,如果您使用的是STS或单一登录,请确保从项目中删除WebMatrix.dll和WebMAtrix.data.dll。 it will fix this. 它将解决此问题。 check this out at here too - https://meethrishi.wordpress.com/2015/03/29/sts-configuration-mvc-project-takes-you-to-unknow-login-aspx/ 也可以在这里查看-https: //meethrishi.wordpress.com/2015/03/29/sts-configuration-mvc-project-takes-you-to-unknow-login-aspx/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM