简体   繁体   中英

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. 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). 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. here is the code in my web.config file:

<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/

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. 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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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