Is there some trick to getting an ASP.NET page to run in server subdirectory?
I have an ASP.NET website on a leased remote server. It all seems to work pretty well, except when I try to add additional *.aspx web pages to a subdirectory of the main directory. In that case, the page invariably errors out with some cryptic message about security.
Now, htm pages work just fine in the same subdirectories. What is the problem here? Does each subdirectory need it own web.config file ? Is there some other trick to get this to work? I prefer the ASP.NET pages as they are more versatile and easier to use with the currently available tools.
Any help greatly appreciated. :)
Re: Is there some trick to getting an ASP.NET page to run in server subdirectory?
hay,
no there is no more web.config in each directory, for the asp.net it is only on web.config
we need your error message, can you provide it.
Re: Is there some trick to getting an ASP.NET page to run in server subdirectory?
At this time, the whole site is down and I cannot figure out why.
Having contacted service provider I have been instructed to create an 'Application Directory' out of the directory that I wish to use as an ASP.NET subdirectory. There are a number of posts on the Internet that also recommend this. But until I get the site up and running again, I won't be able to try it. One thing seems certain. These ASP.NET websites are alot more sensitive to minor changes (i.e., web.config) than the good old HTML sites.
Re: Is there some trick to getting an ASP.NET page to run in server subdirectory?
hay,
you said in your first post there is an error message,
it will help if you post it
Re: Is there some trick to getting an ASP.NET page to run in server subdirectory?
Going to the server host manager and setting a subdirectory as an 'Application Directory' solves the problem.
The error message that appeared initially is the usual lengthy message that indicates that it cannot tell you what the error was because the page is not configured for that. As it turns out, setting the 'debug=true' and so forth in the web.config page won't help because there is still only one web.config page and unless the subdirectory is configured as an application directory, not only won't the contained *aspx files run, but the asp.net debugger can't debug them.
Hopes this helps someone. Seems to work well for me now.