IIS 2 level deep

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

Hi all

i seem to be having a funny error. or maybe it's just me.

I have a ASP.NET C# project that i am working on.

the url for this project is http://localhost/publications whose location is
at C:\inetpub\wwwroot (for argument sake)
there is a default.aspx

everything is working fine! no problems at all.

but when i created http://localhost/main/publications virtual directory and
pointed the location of that vdir to the EXACT same location as the previous
URL. the web app does not behave normally.

for one, i cant access the appSettings in the web.config file using the
ConfigurationSettings class

any ideas why?

Thanks
jason
 
Try to set the folder security for NETWORK SERVICE (W2K3) or ASPNET
(WindowsXP) at Read.

Hope this helps!
Franck.
 
hmm you mean right mouse click on my C:\wwwroot\publications and add user
ASPNET to access list with read permissions?
tried that, didnt help.

but remember. both virtual directories are pointing to the same folder
above, but the 2 level deep virtual directory does not work.

Thanks again
jason
 
Oh ok I understand now.
It's possible that ConfigurationSettings.AppSettings looks for a Web.Config
file which is in the root directory.

for example http://localhost/main = "c:\inetpub\wwwroot" and
http://localhost/main/publications = "c:\inetpub\wwwroot\publications"

A call to ConfigurationSettings.AppSettings is probably trying to find
Web.Config file in c:\inetpub\wwwroot even if it is in
c:\inetpub\wwwroot\publications

You can try to copy your web.config file in the first level of your virtual
directory just to check if it works.

Good luck,
Franck.

| hmm you mean right mouse click on my C:\wwwroot\publications and add user
| ASPNET to access list with read permissions?
| tried that, didnt help.
|
| but remember. both virtual directories are pointing to the same folder
| above, but the 2 level deep virtual directory does not work.
|
| Thanks again
| jason
 
Back
Top