Asked by:
IIS 8.5 404 not seeing application's virtual path

Question
-
User1155798070 posted
We have an .NET application on our old server running Server 2008 R2 and IIS 7. It runs as it should under localhost.
We have copied the code to a new server running Server 2012 and IIS 8.5 and edited the web.config accordingly. All of the same versions of .NET (Core, 3.5, 4.5, etc.) on the old server are on the new server and the app pools, bindings, physical locations are the same on both servers.
I can launch the application in the new server and the home page appears fine. But as soon as I click a link to drill deeper I get:HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
The Physical Path is pointing to a path that does not exist as the application should be generating a virtual path.
We have other .NET applications that are working fine on the new server.
Any help would be greatly appreciated!Monday, October 16, 2017 7:37 PM
All replies
-
User1771544211 posted
Hi theDaviator,
The Physical Path is pointing to a path that does not exist as the application should be generating a virtual path.
It seems that you don't have permission to generate the virtual path on the new server, so it returns the 404 error.
Please try the following steps to set the write permission.
- Right-click the directory, then choose Properties
- Go to the Security tab
- Find the IUSR account (If IUSR is not in the list, add it by clicking Edit, then clicking Add, and then typing "IUSR" in the "Enter the object names to select" field.)
- Highlight the user in the list, click Edit, and grant the account Modify and Write permissions
Best Regards,
Jean
Tuesday, October 17, 2017 2:57 AM -
User1155798070 posted
Hi Jean, Thanks so much but this did not work. I also tried the user IIS_IUSRS
Tuesday, October 17, 2017 12:42 PM -
User1771544211 posted
Hi theDaviator,
Please try set the IIS Application Pool's identity to LocalSystem and try again.
About how to set the IIS Application Pool's Identity:
- Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).
-
In the Connections pane, expand the server node and click Application Pools.
-
On the Application Pools page, select the application pool for which you want to specify an identity, and then click Advanced Settings in the Actions pane.
-
For the Identity property, click the ... button to open the Application Pool Identity dialog box.
-
If you want to use a built-in account, select the Built-in account option and select an account from the list.
-
If you want to use a custom identity, select the Custom account option and click Set to open the Set Credentials dialog box. Then type the custom account name in the User name text box, type a password in the Password text box, retype the password in the Confirm password text box, and then click OK.
-
Click OK to dismiss the Application Pool Identity dialog box.
Best Regards,
Jean
Wednesday, October 18, 2017 7:12 AM -
User1155798070 posted
Hi Jean, once again thanks so much for your time and detailed instructions. However this did not work either.
FYI the original app runs on .NET 2.0 and yes, .NET 2.0 is installed.Wednesday, October 18, 2017 1:18 PM -
User1771544211 posted
Hi theDaviator,
My first thought is that this problem should be caused by that the IIS process doesn't have the correct permission to create the virtual folder. So I give suggestion about setting permission in my previous two posts. However, these suggestions doesn't help.
Now, lets try use some debug methods to get some detailed error message to see if these message will help.
1. Please try enabled detailed error page to see if it can show more detailed error message about the 404 error.
2. Please try enable Failed Request Tracing to trace the request.
Best Regards,
Jean
Thursday, October 19, 2017 3:06 AM -
User-1220080607 posted
Hi
This error will occur if your application pool running in classic mode.Once check your application pool change it to Integrated mode
Thursday, October 26, 2017 4:41 PM