473,320 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Page Authentication

js
I am building a intranet site that has public and private information
that are rendered by ASP.Net pages. The site is not partitioned into
private/public folders. When users hit the site's URL, no
authentication is needed. When the users click a logon button, a
Windows logon dialog box should show up. Right now the Windows logon
dialog box appears as soon as the browse hit the URL. How can I use
page level authentication, instead of site level authentication without
using ASP.Net Forms authentication provider? The following are
authentication configurations in the IIS6 and ASP.Net web.config:

II6:
Enable anonymous access (disabled)
Integrated Windows authentication (enabled)
Enable default content page (enabled and with main.aspx,
underConstruction.aspx in the list)

Web.config:
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>

Nov 19 '05 #1
4 1842
HI,

We can bypass the Authentication by giving the location in web.config file
like below.
I hope this will work for u.

<location path="Login.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
"js" wrote:
I am building a intranet site that has public and private information
that are rendered by ASP.Net pages. The site is not partitioned into
private/public folders. When users hit the site's URL, no
authentication is needed. When the users click a logon button, a
Windows logon dialog box should show up. Right now the Windows logon
dialog box appears as soon as the browse hit the URL. How can I use
page level authentication, instead of site level authentication without
using ASP.Net Forms authentication provider? The following are
authentication configurations in the IIS6 and ASP.Net web.config:

II6:
Enable anonymous access (disabled)
Integrated Windows authentication (enabled)
Enable default content page (enabled and with main.aspx,
underConstruction.aspx in the list)

Web.config:
<authentication mode="Windows" />
<authorization>
<allow users="*" />
</authorization>

Nov 19 '05 #2
js
Thanks for your response. I did as you suggested, but the Windows
logon dialog box still popping up. In addition, when I click on the
Logon button on the main.aspx, I got
Server Error in '/' Application. I am posting my Web.config for your
refence.
--------------------------------------------------------------------------------
Runtime Error
Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server
machine.

Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrors> tag within
a "web.config" configuration file located in the root directory of the
current web application. This <customErrors> tag should then have its
"mode" attribute set to "Off".

<!-- Web.Config Configuration File -->
<configuration>
<configSections>
<section name="enterpriselibrary.configurationSettings"
type="Microsoft.Practices.EnterpriseLibrary.Config uration.ConfigurationManagerSectionHandler,
&#xD;&#xA; Microsoft.Practices.EnterpriseLibrary.Configuratio n,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7" />
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionH andler, &#xD;&#xA;
System.Web, Version=1.0.3300.0, Culture=neutral, &#xD;&#xA;
PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"
/>
</configSections>

<appSettings>
<add key="safeParameters"
value="OrderID-int32,CustomerEmail-email,ShippingZipcode-USzip" />
</appSettings>

<location path="2validateuser.asp">
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="Off" />
<authentication mode="Windows"/>
<authorization><allow users="*"/></authorization>
<trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true" />
<sessionState cookieless="true" timeout="20" />
</system.web>
</location>

<enterpriselibrary.configurationSettings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
applicationName="DMS_ASPX"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData"
name="dataConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData" name="XML
File Storage Provider" path="dataConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData"
name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:nil="true" />
<includeTypes />
</enterpriselibrary.configurationSettings>
</configuration>

Nov 19 '05 #3

We can do the Windows authentication in several ways, what im doing is im
using the Forms Authentication and Enable anonymous access (enabled) in IIS.
Im getting the username and password , after that im Authenticating the User
using LDAP connection.

when u enable the Integrated Windows Authentication, u cant get rid of the
popup box anyway.

Could you please confirm this

<location path="2validateuser.asp">

is it .asp or .aspx?
"js" wrote:
Thanks for your response. I did as you suggested, but the Windows
logon dialog box still popping up. In addition, when I click on the
Logon button on the main.aspx, I got
Server Error in '/' Application. I am posting my Web.config for your
refence.
--------------------------------------------------------------------------------
Runtime Error
Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons). It
could, however, be viewed by browsers running on the local server
machine.

Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrors> tag within
a "web.config" configuration file located in the root directory of the
current web application. This <customErrors> tag should then have its
"mode" attribute set to "Off".

<!-- Web.Config Configuration File -->
<configuration>
<configSections>
<section name="enterpriselibrary.configurationSettings"
type="Microsoft.Practices.EnterpriseLibrary.Config uration.ConfigurationManagerSectionHandler,
Microsoft.Practices.EnterpriseLibrary.Configuratio n, Version=1.0.0.0, Culture=neutral, PublicKeyToken=60c24972b7c20af7" />
<section name="sessionState"
type="System.Web.SessionState.SessionStateSectionH andler, System.Web, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" allowDefinition="MachineToApplication"
/>
</configSections>

<appSettings>
<add key="safeParameters"
value="OrderID-int32,CustomerEmail-email,ShippingZipcode-USzip" />
</appSettings>

<location path="2validateuser.asp">
<system.web>
<compilation defaultLanguage="c#" debug="true" />
<customErrors mode="Off" />
<authentication mode="Windows"/>
<authorization><allow users="*"/></authorization>
<trace enabled="false" requestLimit="10" pageOutput="false"
traceMode="SortByTime" localOnly="true" />
<sessionState cookieless="true" timeout="20" />
</system.web>
</location>

<enterpriselibrary.configurationSettings
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
applicationName="DMS_ASPX"
xmlns="http://www.microsoft.com/practices/enterpriselibrary/08-31-2004/configuration">
<configurationSections>
<configurationSection xsi:type="ReadOnlyConfigurationSectionData"
name="dataConfiguration" encrypt="false">
<storageProvider xsi:type="XmlFileStorageProviderData" name="XML
File Storage Provider" path="dataConfiguration.config" />
<dataTransformer xsi:type="XmlSerializerTransformerData"
name="Xml Serializer Transformer">
<includeTypes />
</dataTransformer>
</configurationSection>
</configurationSections>
<keyAlgorithmStorageProvider xsi:nil="true" />
<includeTypes />
</enterpriselibrary.configurationSettings>
</configuration>

Nov 19 '05 #4
js
It's an classic ASP. I am in the process of converting all ASP to
ASPX. I have not got there yet. Thus the 2validateuser.asp is still
the classic ASP. It seems to me that ASP.Net doesn't like the
<location> element with path attribute in it. As in my Web.config, it
seems all configuration only apply to 2validateuser.asp.

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: William E Hatto | last post by:
Hi 1 and all, I have an asp application/web site that uses a logon page then a page for the menus and separate asp pages for all the options in the menus. The options listed in the menu's...
1
by: William E Hatto | last post by:
My thanks to Nathan for the code below, but it does not work. I get the following error; Error Type: Microsoft VBScript compilation (0x800A03EA) Syntax error /dev/development/WAN RCI...
2
by: Senthil | last post by:
1. Created a new C# web application project 2. Change the name of webform1 to login.aspx 3. And in the .cs file change the name of the class to login, and include System.web.security namespace....
23
by: Lamberti Fabrizio | last post by:
Hi all, I've to access to a network file from an asp pages. I've red a lot of things on old posts and on Microsoft article but I can't still solve my problem. I've got two server inside the...
1
by: Stu | last post by:
Hi All, I have an ASP.NET application to which I have implemented forms authentication to handle security. It is a relatively straight forward solution with all aspx pages residing in the root...
1
by: Grey | last post by:
I have set the following parameters in web.config to prevent user direct access the web page without user login. <authentication mode="Forms"> <forms loginUrl="Initial/index.aspx"...
4
by: SB | last post by:
Hi I'm trying to get forms-based authentication to authenticate different users for differet pages, like this: <configuration> <location path="Member" allowOverride="true"> <system.web>...
8
by: Edward Mitchell | last post by:
I have a main project that is protected in that the user is directed to a login.aspx file. The text in the web.config file is: <authentication mode="Forms"> <forms loginUrl="Login.aspx" />...
7
by: Alan Silver | last post by:
Hello, Sorry this is a bit wordy, but it's a pretty simple question... I have a web site, http://domain/ which is a public site, part of which (http://domain/a/) is protected by forms...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.