简体   繁体   中英

404 error after deploying to IIS

Before deploying my ASP.net software to the production site (Windows server 2012 R2), I first test the software on a test server. If that is succesful, I deploy (copy) the exact same software to the production site.

On the production site, I got the following error when clicking on a link:

Warning, an 404 error has been detected: System.Web.HttpException (0x80004005): The file '/Account/Login.aspx' does not exist. at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal...

Note that the path '/Account/Login.aspx' was a part of the previous version of the deployed software. The path no longer exists in the current version.

I have tried to make a "clean-ip" by deleting the content in:

C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Temporary ASP.NET Files\\root

but that did not help.

  1. How do I find the root cause for the 404 error?

  2. How do I prevent old stuff from previous versions of the deployed software from making trouble in the latest deployed version?

Thank you for trying to help me by adding comments to my question.

I have found that adding the following lines to 'web.config' file removes the error. I dont know why but the main thing is that it now works:

<appSettings>
....
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
<add key="UserLockoutEnabledByDefault" value="true"/>
<add key="DefaultAccountLockoutTimeSpan" value="10"/>
<add key="MaxFailedAccessAttemptsBeforeLockout" value="3"/>

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