By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 816 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Multiple pages for Location tags?

P: n/a
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
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
As far as I know you have to use the second one. There is no way to specify
multiple values in xml.
Nov 19 '05 #2

P: n/a
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/de...onsettings.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

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

Nov 19 '05 #3

P: n/a
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.

--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

Nov 19 '05 #4

P: n/a
"Saravana" <sa******@sct.co.in> wrote in message
news:Ok**************@TK2MSFTNGP09.phx.gbl...
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.
--
-Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com

"tshad" <ts**********@ftsolutions.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
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


Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.