PDA

View Full Version : WEB CONFIG & APPLICATION FOLDER


mitch
02-01-2005, 02:35 AM
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

mitch
02-01-2005, 02:38 AM
I just realized I've got this in the wrong forum.


Should be in ASP.Net. Sorry!

bruce
02-01-2005, 07:09 AM
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 (http://www.DiscountASP.NET)

mitch
02-01-2005, 09:34 AM
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?

bruce
02-02-2005, 03:02 AM
Yes.

Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)