Multiple pages for Location tags?

T

tshad

Can I set up multiple pages in the same Location tag? I thought I saw
somewhere that I could. I tried the following, but it doesn't work.
***************************************************
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
<location path="default.aspx,addLogon.aspx,LogonForgot.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>
**************************************************************

The following does work, but since they are the same I would like to use the
same location tag if possible.
**********************************************************************************
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
<location path="default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="addLogon.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
<location path="logonForgot.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>
**************************************************************************

Thanks,

Tom
 
G

Guest

As far as I know you have to use the second one. There is no way to specify
multiple values in xml.
 
S

Stuart A Hill

Hi Tom,

As far as I am aware it is not possible to have multiple entries in the path
attribute. See
http://msdn.microsoft.com/library/d...e/html/cpconconfigurationlocationsettings.asp
for more information.

It could be that you need to think about the structure of your site. To
quote MSDN - Using <location> with a missing path attribute applies the
configuration settings to the current directory and all child directories.

You may find that easier to implement. If not, multiple <location> elements
it is.

Regards,

Stuart
MCSD, MCT
 
S

Saravana

You cant specify multiple files in location path. But you can place all
these files into one folder, and specify that folder name in location path.
Location path accepts folder name.
 
T

tshad

Saravana said:
You cant specify multiple files in location path. But you can place all
these files into one folder, and specify that folder name in location
path.
Location path accepts folder name.

That is what I may have to do. I don't know which is better - 10 files in
one folder or 10 Location entries.

Thanks,

Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top