Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Exclude pages from authentication!
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Adam J Knight  
View profile  
 More options Feb 12 2006, 4:57 am
Newsgroups: microsoft.public.dotnet.framework.aspnet
From: "Adam J Knight" <adam.jkni...@optusnet.com.au>
Date: Sun, 12 Feb 2006 19:57:13 +1000
Local: Sun, Feb 12 2006 4:57 am
Subject: Exclude pages from authentication!
Hi all,

I have an app that mostly requires authentication.

However there are a couple of pages that don't require authentication..

What do i need in my web.config, to specify these pages don't require
authentication..
thus the user is not redirected to my default login url..when they ('pages')
are requested.

Cheers,
Adam


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Teemu Keiski  
View profile  
 More options Feb 12 2006, 5:03 am
Newsgroups: microsoft.public.dotnet.framework.aspnet
From: "Teemu Keiski" <jot...@aspalliance.com>
Date: Sun, 12 Feb 2006 12:03:39 +0200
Local: Sun, Feb 12 2006 5:03 am
Subject: Re: Exclude pages from authentication!
Hi,

you can do that with <location> (path can  either be single page or a
directory). Note that <location> element is placed right under
<configuration> element, not under the default <system.web> in standard
web.config

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

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Adam J Knight" <adam.jkni...@optusnet.com.au> wrote in message
news:OKl20q7LGHA.3732@TK2MSFTNGP10.phx.gbl...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam J Knight  
View profile  
 More options Feb 12 2006, 5:31 am
Newsgroups: microsoft.public.dotnet.framework.aspnet
From: "Adam J Knight" <adam.jkni...@optusnet.com.au>
Date: Sun, 12 Feb 2006 20:31:42 +1000
Local: Sun, Feb 12 2006 5:31 am
Subject: Re: Exclude pages from authentication!
Hi,

I am not to clued up when it comes to Web.config.

Here is a butchered version, probably totally wrong..that attempts to
acheive what i am after.

Obviously it is incorrect, and producing an error..Would appreciated the
correct syntax!!!!

This is an attempt to apply authentication to a 'Admin' subject directory,
but have no security on pages in root directory...

Cheers,
Adam

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="ConnStr" value="Data Source=myDataSource;Initial
Catalog=myDb;User=myUser; Password=myPassword"/>
  </appSettings>
  <system.web>
    <compilation defaultLanguage="c#" debug="true"/>
    <customErrors mode="RemoteOnly"/>
    <trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true"/>
    <sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
     cookieless="false" timeout="20" />
    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
  </system.web>
  <location path="Admin">
    <system.web>
      <authentication mode="Forms">
        <forms loginUrl="Admin/Login.aspx"/>
      </authentication>
      <authorization>
        <deny users="?"/>
      </authorization>
    </system.web>
  </location>
</configuration>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Teemu Keiski  
View profile  
 More options Feb 12 2006, 6:35 am
Newsgroups: microsoft.public.dotnet.framework.aspnet
From: "Teemu Keiski" <jot...@aspalliance.com>
Date: Sun, 12 Feb 2006 13:35:38 +0200
Local: Sun, Feb 12 2006 6:35 am
Subject: Re: Exclude pages from authentication!
You need to specify <authentication> etc on the root level, therefore you
need to do it kind of twisted

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

  <appSettings>
    <add key="ConnStr" value="Data Source=myDataSource;Initial
Catalog=myDb;User=myUser; Password=myPassword"/>
  </appSettings>

  <system.web>
    <!-- Authentication element on root level, just specify with
authorization that root level is public -->
    <authentication mode="Forms">
        <forms loginUrl="Admin/Login.aspx"/>
      </authentication>
        <authorization>
            <allow users="*" />
        </authorization>

    <compilation defaultLanguage="c#" debug="true"/>
    <customErrors mode="RemoteOnly"/>
    <trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true"/>
    <sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
     cookieless="false" timeout="20" />
    <globalization requestEncoding="utf-8" responseEncoding="utf-8"/>
  </system.web>

    <!-- Deny Access to Admin folder -->
  <location path="Admin">
    <system.web>
        <authorization>
        <deny users="?"/>
      </authorization>
    </system.web>
  </location>

</configuration>

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Adam J Knight" <adam.jkni...@optusnet.com.au> wrote in message
news:ew%23ZF%237LGHA.2300@TK2MSFTNGP15.phx.gbl...


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google