I have a website which is working perfectly now. The location of the website files (in my server) is at

C:\Hosting Spaces\admin\www.mysite.com

and it's accessible by URL from http://app.mysite.com

Now we're revamping the whole site, but still wants users to access the old site. So we moved the contents from

C:\Hosting Spaces\admin\www.mysite.com to C:\Hosting Spaces\admin\2014.mysite.com 

and make it accessible by virtual directory. I configured the virtual directory's alias as 2014, so the site should be accessible by going to http://app.mysite.com/2014 and the physical path as of course, C:\Hosting Spaces\admin\2014.mysite.com. I set the connect as to application user (pass through authentication), but when I want to test the connection, the problem below appear. Anyway I just click OK.

authorization problem

Now I can't access the virtual directory through http://app.mysite.com/2014, because it will always display

500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

Please help!

Update: Another info, if I tried to access the site using the server's own IE, it returns a more descriptive error, as displayed below:

more info about error

So I tried to remove the red lines from my web.config, but it just keep displaying errors at other lines. I think if I removed all the lines, my web site won't work properly anymore

1 Answer 1


For the first issue you need to make sure that both the Application Pool identity and any impersonation identity have read access to the site files.

For the second issue, you need to keep in mind that web.config files in virtual directories inherit from config files in parent directories (including the root site). Some settings can override those in the root config, some can't. If you want the same comfig as the root, you can delete the config in the virtual directory. If you want to keep the one in the virtual directory, you may need to disable config inheritance. See this SO post for info about that:https://stackoverflow.com/questions/782252/avoid-web-config-inheritance-in-child-web-application-using-inheritinchildapplic .

  • Thanks for the answer @James, but how do I make sure that both the Application Pool identity and any impersonation identity have read access to the site files?
    – imin
    Jan 30, 2015 at 4:44
  • Click the advanced button on the security panel of the folder properties on the root virtual directory and check for effective rights for each user. Keep in mind that the message didn't say the account didn't have access--just that it was unable to verify whether or not it did (not sure why that would be the case).
    – James
    Jan 30, 2015 at 13:54
  • On second thought, you probably needn't bother with that. If it gets far enough to see that the config is invalid, it must be able to read the config, so unless there are special exceptions for certain sun folders or files (unlikely unless you explicitly put those exception in place), the necessary folder rights must already be in place.
    – James
    Jan 30, 2015 at 13:58

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.