Bob,
Sure.  Just add a location element with the necessary info for each file.

If you get to the point where you have a lot of files, it might be easier to
move them to a sub directory, and then just create a single location element
for the directory. Or if you do create a sub directory, you can also add a
simple web.config to the sub that handles authorization like so...

<?xml version="1.0"?>
<!-- This is here to allow non-authenticated users to access these files in
this directory. -->
<configuration>
  <system.web>
    <authorization>
      <allow users="*"/>
      <!-- Allow all users -->
    </authorization>
  </system.web>

</configuration>

On 4/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Dean,
>
> Thanks for your help.  I do have one last question on this though:  What
> if I want more than one page to be accessed without logging in?  Can this be
> done?  Let say I wanted this for MyOpenToAllPage.aspx and also
> MyOpenToAllPage2.aspx?
>
> Thanks,
> Bob
>
>
> -------------- Original message --------------
> From: [EMAIL PROTECTED]
>
> Ahh, I see now. Thanks Dean. It works now.
>
> -------------- Original message --------------
> From: "Dean Fiala" <[EMAIL PROTECTED] <dfiala%40gmail.com>>
> Bob,
> The error says differently.
>
> If you replaced your original authorization section you have made it a
> child
> of
>
> <configuration><system.web>
>
> and it does not belong there.
>
> Put your original authorization element back.
>
> Move the new one to be a child of configuration.
>
> On 4/27/07, [EMAIL PROTECTED] <rherrmann05%40comcast.net> <
> [EMAIL PROTECTED] <rherrmann05%40comcast.net>> wrote:
> >
> > Dean,
> >
> > I do have it between the <configuration> tags. I took this code and
> > replaced my preious <authorization> code actually.
> >
> >
> > -------------- Original message --------------
> > From: "Dean F iala" <[EMAIL PROTECTED] <dfiala%40gmail.com>>
> >
> > You put it the wrong place in the web.config file.
> >
> > It needs to be a child of <configuration>.
> >
> > On 4/27/07, [EMAIL PROTECTED] 
> > <rherrmann05%40comcast.net><rherrmann05%40comcast.net> <
> > [EMAIL PROTECTED] <rherrmann05%40comcast.net><rherrmann05%40comcast.net>> 
> > wrote:
> > >
> > > Dean,
> > >
> > > I tried this but I get a bunch of errors on each web page when I try
> yo
> > > run my app. Here is the error:
> > >
> > > Error 34 C:\Documents and Settings\ABC\My Documents\Visual Studio
> > > 2005\WebSites\Stats\GameHeader.aspx: ASP.NET runtime error: <location>
> > > sections are allowed only within <configuration> sections.
> (C:\Documents
> > and
> > > Set tings\ABC\My Documents\Visual Studio
> 2005\WebSites\Stats\web.config
> > line
> > > 45) C:\Documents and Settings\ABC\My Documents\Visual Studio
> > > 2005\WebSites\Stats\GameHeader.aspx 1 1 C:\...\Stats\
> > >
> > >
> > >
> > & gt;
> > >
> > > -------------- Original message --------------
> > > From: "Dean Fiala" <[EMAIL PROTECTED] 
> > > <dfiala%40gmail.com><dfiala%40gmail.com>>
> > >
> > > easy way is to add section to your web.config that tell your app to
> > allow
> > > anonymous users...
> > >
> > > <location path="MyOpenToAllPage.aspx">
> > > <system.web>
> > > <authorization>
> > > <allow users="?"/>
> > > <!-- Allow all users -->
> > > </authorization>
> > > </system.web>
> > > </location>
> &g t; >
> > > On 4/26/07, [EMAIL PROTECTED] 
> > > <rherrmann05%40comcast.net><rherrmann05%40comcast.net><rherrmann05%40comcast.net>
> > >  <
> > > [EMAIL PROTECTED] 
> > > <rherrmann05%40comcast.net><rherrmann05%40comcast.net><rherrmann05%40comcast.net>>
> > >  wrote:
> > > >
> > > > Hi all,
> > > >
> > > > I have an application that requires a user to log in every time. I
> use
> > > > forms authentication. This all works fine. But now I want my initial
> > url
> > > to
> > > > display a web page that does not require logging into. So
> > non-registered
> > > > users can callup this page. I would then put a hyperlink on this
> page
> > to
> > > Log
> > > > In. This typical of many sites.
> > > >
> > > > My question is what is the best way to do this? Not sure i f I
> should
> > > put
> > > > this new page in my current ASP.Net 2.0 web site project or creat a
> > new
> > > > project. My web.config has the XML tags that requires forms
> > > > authentication. So how can I make my new page bypass this? I hope
> this
> > > makes
> > > > sense! I just would like to have this structured the best possible
> > way.
> > > >
> > > > Thanks,
> > > > Bob
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > > >
> > > >
> > >
> > > --
> > > Dean Fiala
> > > Very Pr actical Software, Inc
> >
> > > Now with Blogging...
> > > http://www.vpsw.com/blogbaby
> > > Microsoft MVP
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > &g t;
>
> > >
> > >
> >
> > --
> > Dean Fiala
> > Very Practical Software, Inc
> > Now with Blogging...
> > http://www.vpsw.com/blogbaby
> > Microsoft MVP
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
>
> --
> Dean Fiala
> Very Practical Software, Inc
> Now with Blogging...
> http://www.vpsw.com/blogbaby
> Microsoft MVP
>
> [Non-text portions of this message have been removed]
>
> [Non-text portions of this message have been removed]
>
> 
>
>


-- 
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP


[Non-text portions of this message have been removed]

Reply via email to