简体   繁体   中英

Aspx page not found on IIS hosted site but it exists on path

I have form which getting this problem. If I run same project using visual studio 2010 it runs perfect but I have published the same project on server it throws error

 `HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly.` 

This single page throws error other pages working fine.

Local : 在此处输入图片说明

Server: 在此处输入图片说明

Server Environment:

IIS 6.1
Windows Server 2008 R2

Any idea about this?

它通过清理临时 ASP.NET 文件来解决,因为同名 .aspx 表单中包含母版页,而新的 .aspx 页面没有。

Is ASP.NET installed in the server? If not, there will not be any appropriate handling of .aspx files. To install ASP.NET, you must run the following command, which varies depending on the CPU architecture and server.

32-bit, ASP.NET 2.0 - 3.5 %WinDir%\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis -i

32-bit ASP.NET 4.0+ %WinDir%\\Microsoft.NET\\Framework\\4.0.30319\\aspnet_regiis -i

64-bit, ASP.NET 2.0 - 3.5 %WinDir%\\Microsoft.NET\\Framework64\\v2.0.50727\\aspnet_regiis -i

64-bit ASP.NET 4.0+ %WinDir%\\Microsoft.NET\\Framework64\\4.0.30319\\aspnet_regiis -i

If you still continue getting the error, I would recomend to browse to the page locally on an Browser within the server itself or open the IIS log (defaulted to %SystemDrive%\\inetpub\\logs\\LogFiles\\W3SVC#\\ folder). You will either get a 404.# locally or in the sc-substatus column in the IIS log will give us more information as to why IIS is responding a 404. Let me know if the command above helps or if you manage to get the sub-status for that 404.

I'll reformat this answer once I get to an actual laptop.

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