views:

1378

answers:

1

Hey all,

Under IIS 6 Win23k. At the root directory of a website there is a web.config (I think the root website is actually a sharepoint site). I create a virtual directory and plunk in my asp.net application and it's web.config. My application runs as a specific user id, and one that doesn't happen to have rights to the root directory's web.config.

Turns ought my virtual directory's web.config has an error in it (a reference was misspelled). When I access the virtual directory through the browser I was getting an ASP.NET error about "permission denied".

Change the permission on the parent web.config... poof I now get the correct error. Delete the parent web.config... poof I now get the correct error.

What's going on here? Why does my virtual directory need/want the root directory's web.config? How can I prevent my virtual directory from doing this?

Edit: This is sharepoint being a bad citizen. It sets the permissions on web.confg to be only Administrators and System with full control and STS_WPG as read only. Note the first time sharepoint has messed with a webserver I'm sure.

Thanks!

Rob

+1  A: 

afaik, virtual directories "inherits" the root config. You can disable that behaviour:

http://dotnetslackers.com/Security/re-55457_Stopping_ASP_NET_web_config_inheritance.aspx

jishi
Thanks for the suggestion but that didn't help.