CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    May 2002
    Posts
    1,798

    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.
    mpliam

  2. #2
    Join Date
    Jun 2010
    Location
    Cairo, Egypt
    Posts
    17

    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.
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    010011000111010101110110001000000100110101111001001000000101000001100011

  3. #3
    Join Date
    May 2002
    Posts
    1,798

    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.
    mpliam

  4. #4
    Join Date
    Jun 2010
    Location
    Cairo, Egypt
    Posts
    17

    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
    You Don't Have to Rate Me.
    I'm Not a Civilized Man I'm the Civilization it self
    White or Black, Living or Dieing and 0 or 1 that's MY life
    iam an Object in Object Oriented Life
    010011000111010101110110001000000100110101111001001000000101000001100011

  5. #5
    Join Date
    May 2002
    Posts
    1,798

    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.
    mpliam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured