WEB CONFIG & APPLICATION FOLDER

Discussion in 'Classic ASP' started by mitch, Feb 1, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I'm using VB.Net andIIS on myXP Pro machinerunning as localhost to build and test,


    and then copying to dasp to see how it works for real. So far so good.


    However, I just set up my first web.config/login.aspx for forms based authentication


    and have a problem. Works fine locally but on dasp I can't seem to get it right.


    If I just copy everything to the htdocs folder then it works fine. Forces me to go through


    login.aspx and won't let me type the url directly to get to the pages behind it.


    But if I create an application folder with Web App Tool and move my files there, I can't get it to work.


    Should the web.config and login.aspx be in htdocs or just web.config and or?? I'm a little confused.


    At this time I've just hard coded the password info so it's not a database issue. Either I get nothing at all


    or it keeps redirecting me back to login.aspx.


    Any guidance would be appreciated..........Thank you
     
  2. I just realized I've got this in the wrong forum.


    Should be in ASP.Net. Sorry!
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    Web.config should reside in application root. Your root directory (htdocs) is always set as an app root.

    eg. If you create a directory, app1, and set it up as an application in the web app tool. You can put your web.config there.

    Remember though, web.config setting gets inherited from the parent app root.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. So,say I havetwo folders set up as apps, sayMyStuff and YourStuff.


    Each app folder would have it's own Login.aspx and web.config.


    To control access to each app, I could set up a default.aspx page in htdocs with a


    link to each appon the page.The link would redirect the user to the appropriate


    Login.aspx which would then authenticate the login. If the login was correct, the


    user would be able to access the pages in that app folder but not the other unless


    he also correctly logged into it.


    I just need to avoid a Login.aspx and web.config in the htdocs folder in order to do this.


    Do I understand that correctly?
     
  5. Bruce

    Bruce DiscountASP.NET Staff

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page