6

I have a deployed a web application in IIS. Which used to work without any issues. Recently i have shifted that web application to another machine, Here is the problem. Once i setup the Webapplication when i opened the default document in IIS im getting the File not found error as following

Internal Server Error

\?\C:\inetpub\wwwroot\application\web.config

I have no clue why the IIS is not able to find the web.config. The file is present in the path C:\inetpub\wwwroot\application\web.config but the IIS is looking in the path \?\C:....

Please let me know how to resolve this??

4 Answers 4

18

Firstly this is documented on support.microsoft.com so I would suggest that anyone who has this issue read this first as it covers a number of solutions which I won't

Now from personal experience I encountered this error after setting up a new development machine. What I had forgotten to do was install the Url Rewrite 2.0 IIS module. Sadly the IIS error gives absolutely no idea that this is the actually issue.

Therefore to solve this issue investigate the system.webServer setting in our web.config and ensure that you have installed all the iis modules that you use. I did this by systematically removing elements from my web.config until I came across the cause.

2
  • 1
    Hi Alistair, I have had the exact problem that you have mentioned in the comment, I did solved the problem by installing the Url Rewrite module after some troubleshooting by myself. but i forgot to update the question. Thanks for the comment Feb 1, 2013 at 12:26
  • No prob. I expected you had solved it and was more interested in having the question answered for others that came along.... like me in a years time :)
    – Alistair
    Feb 3, 2013 at 21:55
3

In my case, I was running ASP .NET Core website so I had to install .Net Core Runtime from https://dotnet.microsoft.com/download/dotnet-core/current/runtime

1

I know it's old post but I resolved the same issue as follows:

If you are using TFS and you are getting this problem then Reason is ".vs" file is not excluded from commit.

Because of that ".vs\config\applicationhost.config" gets the local version of another user/Developer.

To Solve the error, First open that file Update Physical path inside "" xml tag.

Also ask user to exclude this folder from TFS to prevent future issues.

0

If you are getting mysql localhost error. What I will do will work for you.

Control Panel(View by: Large Icons) >> Programs and Features >> (Usually upper left corner) Turn Windows Features on or off >> Internet Information Services >> Web Management Tools and World Wide Web Services

After Restart.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.