DeveloperBarn Forums

DeveloperBarn

Programming & IT forum

Multi folder web app

This is a discussion on Multi folder web app within the .Net Development forums, part of the Programming & Scripting category; Hey guys I have an app where i have some folders like admin, members. So i have set them as ...

Go Back   DeveloperBarn Forums > Programming & Scripting > .Net Development

  #1  
Old July 3rd, 2009, 07:07 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 563
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default Multi folder web app

Hey guys
I have an app where i have some folders like admin, members.
So i have set them as virtual directories to run.
Then i have used formsauthenication for login in each folder's login page.

Do i need web.config in each folder?
At this moment i have this in my web.config which resides in root
Code:
    <authentication mode="Forms">
      <forms name="site" loginUrl="default.aspx" protection="All" path="/" timeout="30">        
      </forms>
    </authentication>
__________________
Get the Mantra!

Last edited by micky; July 9th, 2009 at 08:17 AM.
Reply With Quote
  #2  
Old July 3rd, 2009, 07:57 AM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,312
Blog Entries: 5
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

Quote:
Originally Posted by micky View Post
Hey guys
I have an app where i have some folders like admin, members.
So i have set them as virtual directories to run.
Then i have used formsauthenication for login in each folder's login page.

Do i need web.config in each folder?
At this moment i have this in my web.config which resides in root
Code:
    <authentication mode="Forms">
      <forms name="site" loginUrl="default.aspx" protection="All" path="/" timeout="30">        
      </forms>
    </authentication>
I think if you have them setup as seperate folders then you would need a seperate web.config for each...I think if you just setup the root as an app, you could still use sub folders for different sections, then they would all be handled by the root web.config...I think....

Do the pages in the sub folder still work if you don't have them setup as virtual folders?
__________________
Join the folding team
Reply With Quote
  #3  
Old July 3rd, 2009, 08:06 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 563
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

Quote:
Originally Posted by richyrich View Post
I think if you have them setup as seperate folders then you would need a seperate web.config for each...I think if you just setup the root as an app, you could still use sub folders for different sections, then they would all be handled by the root web.config...I think....

Do the pages in the sub folder still work if you don't have them setup as virtual folders?
I always set the folders as virtual directories, as they dont work without it!!

Havent tried it without setting them as virtual directory!
Reply With Quote
  #4  
Old July 3rd, 2009, 08:13 AM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,312
Blog Entries: 5
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

Quote:
Originally Posted by micky View Post
I always set the folders as virtual directories, as they dont work without it!!

Havent tried it without setting them as virtual directory!
micky, you're confusing me..

You say you always set the folders up as virtual directories, then you say you haven't tried not setting them up...

Yeah, you would have to set the root of the app up, but then I believe sub folders of this root would use the same web.config....In the same way your App_Code, App_Data etc. folders use the same web.config...
Reply With Quote
  #5  
Old July 3rd, 2009, 08:22 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 563
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

Sorry RR, i meant i have set them and not tried without setting them as virtual directory
did i say that right??

Anyway, do i need separate web.config files then?
Reply With Quote
  #6  
Old July 3rd, 2009, 08:30 AM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,312
Blog Entries: 5
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

Quote:
Originally Posted by micky View Post
Sorry RR, i meant i have set them and not tried without setting them as virtual directory
did i say that right??

Anyway, do i need separate web.config files then?
I'm not entirely sure micky.....I would have said that setting up each sub folder as a virtual folder means you'd need a seperate web.config in each virtual folder.

If you just setup the root of the app as a virtual folder and had normal sub folders then they would use the web.config in the root of the app....

I think.... Not entirely sure though...
Reply With Quote
  #7  
Old July 3rd, 2009, 08:33 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 563
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

Hmm, just to add RR......... i dont have config file in each folder rite now, and they work as such.
Reply With Quote
  #8  
Old July 3rd, 2009, 09:09 AM
richyrich's Avatar
Administrator
 
Join Date: Mar 2008
Real name: Rich
Location: Somewhere only we know...
Posts: 1,312
Blog Entries: 5
Rep Power: 8
richyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to allrichyrich is a name known to all
Default

Quote:
Originally Posted by micky View Post
Hmm, just to add RR......... i dont have config file in each folder rite now, and they work as such.
Guess you can forget everything I've said then micky...

What was your original question?

Comments on this post
micky agrees: Thanked Post
Reply With Quote
The Following User Says Thank You to richyrich For This Useful Post:
micky (July 9th, 2009)
  #9  
Old July 4th, 2009, 03:06 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 563
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

RR, i just wanted to know if i really need a config file in each folder, although it works without having them.
Reply With Quote
  #10  
Old July 9th, 2009, 08:20 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,915
Blog Entries: 7
Rep Power: 13
jmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud ofjmurrayhead has much to be proud of
Default

No, a config file is not needed for each directory within an application. It will inherit from the root web.config. However, if you wanted to handle things like authorization, you could place a web.config file in the specific sub directory with the authorization information...but this can also be handled in the root web.config file.
__________________
jmurrayhead
If you agree with me... click the icon!
If my post solved your problem, click the button in the lower right-hand corner of the post.

If you like it here...throw us a few bones to help
support us.

Join our Folding team: DeveloperBarn Folding

Reply With Quote
Reply

  DeveloperBarn Forums > Programming & Scripting > .Net Development

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Another Folder Permission Issue Rebelle Microsoft IIS 7 February 11th, 2009 11:01 AM
Permission to make changes to xml in folder micky Microsoft IIS 11 October 23rd, 2008 08:13 AM
Shared folder issue Rebelle Microsoft Windows 5 August 18th, 2008 10:39 AM
Multi Prints with Watermarks AOG123 Microsoft Access 1 July 9th, 2008 09:21 AM
Make File/Folder restricted to only certain users Rebelle Microsoft IIS 16 March 26th, 2008 02:06 PM


All times are GMT -4. The time now is 02:04 AM.


Copyright ©2008-2009, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2