Home All Groups Group Topic Archive Search About

Form authentication and files that shouldn'y be authenticated

Author
22 Jul 2006 8:09 AM
MarjanRastegar
I'm using asp.net 1,C#.my application has a form authentication but there are
some aspx pages that all clients, include unauthenticated clients, should be
able to visit them. i can not use html pages because i need connecting to
database

Author
22 Jul 2006 8:52 AM
Dominick Baier
use a location element to specify authorization settings for individual files/folders

<location path="myfile.aspx">
  <system.web>
    <authorization>
      <allow users="*" />
    /
  /
/

Show quoteHide quote
> I'm using asp.net 1,C#.my application has a form authentication but
> there are some aspx pages that all clients, include unauthenticated
> clients, should be able to visit them. i can not use html pages
> because i need connecting to database
>
Author
22 Jul 2006 11:27 AM
MarjanRastegar
I used this tag but i got this error:
"Unable to start debugging on the Web ser";
Here is my code I don't know what is wrong with it?!

<authentication mode="Forms" >
    <forms loginUrl="index.aspx">   
     </forms>
    </authentication>
    <location path="Unauthorized.aspx" />
      <authorization>  
       <allow users="*" /> 
       </authorization>
    </location>




Show quoteHide quote
"Dominick Baier" wrote:

> use a location element to specify authorization settings for individual files/folders
>
> <location path="myfile.aspx">
>   <system.web>
>     <authorization>
>       <allow users="*" />
>     /
>   /
> /
>
> > I'm using asp.net 1,C#.my application has a form authentication but
> > there are some aspx pages that all clients, include unauthenticated
> > clients, should be able to visit them. i can not use html pages
> > because i need connecting to database
> >
>
>
>
Author
22 Jul 2006 7:55 PM
Joe Kaplan (MVP - ADSI)
You didn't follow D.'s instruction.  The location tag must include the
system.web element as well.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
Show quoteHide quote
"MarjanRastegar" <MarjanRaste***@discussions.microsoft.com> wrote in message
news:1BA8CEA6-FE21-4F12-81BD-13DA4421ABE0@microsoft.com...
>I used this tag but i got this error:
> "Unable to start debugging on the Web ser";
> Here is my code I don't know what is wrong with it?!
>
> <authentication mode="Forms" >
>    <forms loginUrl="index.aspx">
>     </forms>
>    </authentication>
> <location path="Unauthorized.aspx" />
>   <authorization>
>       <allow users="*" />
>       </authorization>
>    </location>
>
>
>
>
> "Dominick Baier" wrote:
>
>> use a location element to specify authorization settings for individual
>> files/folders
>>
>> <location path="myfile.aspx">
>>   <system.web>
>>     <authorization>
>>       <allow users="*" />
>>     /
>>   /
>> /
>>
>> > I'm using asp.net 1,C#.my application has a form authentication but
>> > there are some aspx pages that all clients, include unauthenticated
>> > clients, should be able to visit them. i can not use html pages
>> > because i need connecting to database
>> >
>>
>>
>>
Author
23 Jul 2006 6:55 AM
MarjanRastegar
No,I tested both location but for both of them I got an error.

Show quoteHide quote
"Joe Kaplan (MVP - ADSI)" wrote:

> You didn't follow D.'s instruction.  The location tag must include the
> system.web element as well.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services Programming"
> http://www.directoryprogramming.net
> --
> "MarjanRastegar" <MarjanRaste***@discussions.microsoft.com> wrote in message
> news:1BA8CEA6-FE21-4F12-81BD-13DA4421ABE0@microsoft.com...
> >I used this tag but i got this error:
> > "Unable to start debugging on the Web ser";
> > Here is my code I don't know what is wrong with it?!
> >
> > <authentication mode="Forms" >
> >    <forms loginUrl="index.aspx">
> >     </forms>
> >    </authentication>
> > <location path="Unauthorized.aspx" />
> >   <authorization>
> >       <allow users="*" />
> >       </authorization>
> >    </location>
> >
> >
> >
> >
> > "Dominick Baier" wrote:
> >
> >> use a location element to specify authorization settings for individual
> >> files/folders
> >>
> >> <location path="myfile.aspx">
> >>   <system.web>
> >>     <authorization>
> >>       <allow users="*" />
> >>     /
> >>   /
> >> /
> >>
> >> > I'm using asp.net 1,C#.my application has a form authentication but
> >> > there are some aspx pages that all clients, include unauthenticated
> >> > clients, should be able to visit them. i can not use html pages
> >> > because i need connecting to database
> >> >
> >>
> >>
> >>
>
>
>
Author
23 Jul 2006 10:06 AM
Dominick Baier
<system.web>

<authentication mode="Forms" >
  <forms loginUrl="index.aspx">
</forms>
</authentication>

</system.web>

<location path="Unauthorized.aspx" />
<system.web>
     <authorization>
        <allow users="*" />
</authorization>
</system.web>
</location>




Show quoteHide quote
> No,I tested both location but for both of them I got an error.
>
> "Joe Kaplan (MVP - ADSI)" wrote:
>
>> You didn't follow D.'s instruction.  The location tag must include
>> the system.web element as well.
>>
>> Joe K.
>>
>> --
>> Joe Kaplan-MS MVP Directory Services Programming
>> Co-author of "The .NET Developer's Guide to Directory Services
>> Programming"
>> http://www.directoryprogramming.net
>> --
>> "MarjanRastegar" <MarjanRaste***@discussions.microsoft.com> wrote in
>> message
>> news:1BA8CEA6-FE21-4F12-81BD-13DA4421ABE0@microsoft.com...
>>> I used this tag but i got this error:
>>> "Unable to start debugging on the Web ser";
>>> Here is my code I don't know what is wrong with it?!
>>> <authentication mode="Forms" >
>>> <forms loginUrl="index.aspx">
>>> </forms>
>>> </authentication>
>>> <location path="Unauthorized.aspx" />
>>> <authorization>
>>> <allow users="*" />
>>> </authorization>
>>> </location>
>>> "Dominick Baier" wrote:
>>>
>>>> use a location element to specify authorization settings for
>>>> individual files/folders
>>>>
>>>> <location path="myfile.aspx">
>>>> <system.web>
>>>> <authorization>
>>>> <allow users="*" />
>>>> /
>>>> /
>>>> /
>>>>> I'm using asp.net 1,C#.my application has a form authentication
>>>>> but there are some aspx pages that all clients, include
>>>>> unauthenticated clients, should be able to visit them. i can not
>>>>> use html pages because i need connecting to database
>>>>>