IIS 2 level deep

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
 
F

Franck Quintana

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

Hope this helps!
Franck.
 
J

Jason

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
 
F

Franck Quintana

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top