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; So how can i handle it all from root web.config?? I have the code in my first post above. What ...

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


Reply

 

LinkBack Thread Tools Display Modes
  #11  
Old July 9th, 2009, 08:24 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 566
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

So how can i handle it all from root web.config??
I have the code in my first post above.

What changes wud i need?
__________________
Get the Mantra!
Reply With Quote
  #12  
Old July 9th, 2009, 08:29 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
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 ofjmurrayhead has much to be proud of
Default

Add something like the following:
Code:
<location path="DirectoryName">
  <system.web>
    <authorization>
        <deny users="?"/>
    </authorization>
  </system.web>
</location>
You can place as many of these as you want in the root config file. Keep in mind, if you were to use multiple .config files (one for each directory...it wouldn't need to be an exact copy...see here for more information: ASP.NET Configuration
__________________
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
  #13  
Old July 9th, 2009, 08:35 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 566
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

I have that J, do i need to do something with this portion??
Code:
    <authentication mode="Forms">
      <forms name="site" loginUrl="default.aspx" protection="All" path="/" timeout="30">        
      </forms>
    </authentication>
Reply With Quote
  #14  
Old July 9th, 2009, 08:43 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
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 ofjmurrayhead has much to be proud of
Default

That looks right to me, M. Post what you have for the <location> nodes.
Reply With Quote
  #15  
Old July 9th, 2009, 08:46 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 566
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

Code:
  <location path="Admin">
    <system.web>
      <authorization>
        <deny users="?" />
      </authorization>
    </system.web>
  </location>

  <location path="Members">
    <system.web>
      <authorization>
        <deny users="?" />
      </authorization>
    </system.web>
  </location>

<system.web>
    <authentication mode="Forms">
      <forms name="site" loginUrl="default.aspx" protection="All" path="/" timeout="30"></forms>
    </authentication>
</system.web>
Reply With Quote
  #16  
Old July 9th, 2009, 09:03 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
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 ofjmurrayhead has much to be proud of
Default

Is there any particular reason why you're creating each of those folders as Virtual Directories?
Reply With Quote
  #17  
Old July 9th, 2009, 09:07 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 566
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

Quote:
Originally Posted by jmurrayhead View Post
Is there any particular reason why you're creating each of those folders as Virtual Directories?
They all are accessed by different sets of people, so i have different kind of pages for each section, so i set them as virtual directories.

Plus i had security in my mind too.
Reply With Quote
  #18  
Old July 9th, 2009, 09:10 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
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 ofjmurrayhead has much to be proud of
Default

I don't really see how setting each as a separate virtual directory is helping anything. You can handle the security via the web.config.
Reply With Quote
  #19  
Old July 9th, 2009, 09:15 AM
micky's Avatar
Lazy Bum
 
Join Date: Jul 2008
Location: India
Posts: 566
Rep Power: 4
micky has a spectacular aura aboutmicky has a spectacular aura aboutmicky has a spectacular aura about
Default

Quote:
Originally Posted by jmurrayhead View Post
I don't really see how setting each as a separate virtual directory is helping anything. You can handle the security via the web.config.
Do you mean i could have all pages in root and not different folders??
If thats what you mean, then its just the way i preferred (diff folders).

Plus i could handle security for each folder by <location> nodes.
Am i missing here anything J?
Reply With Quote
  #20  
Old July 9th, 2009, 09:18 AM
jmurrayhead's Avatar
The Barnfather
 
Join Date: Mar 2008
Real name: Jason
Location: Washington, D.C.
Posts: 1,964
Blog Entries: 8
Rep Power: 15
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 ofjmurrayhead has much to be proud of
Default

Yes, you could also have all the pages in the root...but I prefer to have separate folders. There seems to be confusion on what a Virtual Directory is. You DO NOT need the subdirectories to be setup as Virtual Directories in IIS. Only the root directory of the application. All other directories are just normal folders.
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 01:45 AM.


Copyright ©2008-2010, DeveloperBarn

Content Relevant URLs by vBSEO 3.3.2