473,654 Members | 3,239 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

web.config error

I'm attempting to write a custom Authentication module using http://www.15seconds.com/Issue/020417.htm

I looked at http://support.microsoft.com/default...b;EN-US;307996, but it doesn't setup things the way I want (ie, I want to integrate into an existing web application).

So I want to deny unauthenticated users access to everything except the default page.

I have an error in web.config. When I comment out these lines:

<location path="default.a spx" >
<system.web>
<authorizatio n>
<allow users="*" />
</authorization>
</system.web>
</location>

Things work. As soon as I put them in, I get this error message:

Server Error in '/Commencement' Application.
--------------------------------------------------------------------------------

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 -->

<configuratio n>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirec t" attribute of the application's <customErrors > configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="RemoteOnl y" defaultRedirect ="mycustompage. htm"/>
</system.web>
</configuration>

Which is odd, because I have customErrors mode="Off" set. I've looked this result up in "Programmin g ASP.NET", Chapter 19, p. 886, which has the exact same syntax. Any assistance would be appreciated. Here's the entire webconfig file:

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.web>
<!-- DYNAMIC DEBUG COMPILATION
Set compilation debug="true" to enable ASPX debugging. Otherwise, setting this value to
false will improve runtime performance of this application.
Set compilation debug="true" to insert debugging symbols (.pdb information)
into the compiled page. Because this creates a larger file that executes
more slowly, you should set this value to true only when debugging and to
false at all other times. For more information, refer to the documentation about
debugging ASP.NET files.
-->
<compilation defaultLanguage ="c#" debug="true" />
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly " to enable custom error messages, "Off" to disable.
Add <error> tags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly " Display custom (friendly) messages only to users not running
on the local Web server. This setting is recommended for security purposes, so
that you do not display application detail information to remote clients.
-->
<customErrors mode="Off" />
<!-- AUTHENTICATION
This section sets the authentication policies of the application. Possible modes are "Windows",
"Forms", "Passport" and "None"

"None" No authentication is performed.
"Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to
its settings for the application. Anonymous access must be disabled in IIS.
"Forms" You provide a custom form (Web page) for users to enter their credentials, and then
you authenticate them in your application. A user credential token is stored in a cookie.
"Passport" Authentication is performed via a centralized authentication service provided
by Microsoft that offers a single logon and core profile services for member sites.
-->
<authenticati on mode="None" />
<!-- AUTHORIZATION
This section sets the authorization policies of the application. You can allow or deny access
to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous
(unauthenticate d) users.
-->
<authorizatio n>
<deny users="?" /> <!-- Deny unauthenticated users -->
<!-- <allow users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
<deny users="[comma separated list of users]"
roles="[comma separated list of roles]"/>
-->
</authorization>

<!--
<location path="default.a spx" >
<system.web>
<authorizatio n>
<allow users="*" />
</authorization>
</system.web>
</location>
-->

<!-- APPLICATION-LEVEL TRACE LOGGING
Application-level tracing enables trace log output for every page within an application.
Set trace enabled="true" to enable application trace logging. If pageOutput="tru e", the
trace information will be displayed at the bottom of each page. Otherwise, you can view the
application trace log by browsing the "trace.axd" page from your web application
root.
-->
<trace enabled="true" requestLimit="1 0" pageOutput="fal se" traceMode="Sort ByTime" localOnly="fals e" />
<!-- SESSION STATE SETTINGS
By default ASP.NET uses cookies to identify which requests belong to a particular session.
If cookies are not available, a session can be tracked by adding a session identifier to the URL.
To disable cookies, set sessionState cookieless="tru e".
-->
<sessionState mode="InProc" stateConnection String="tcpip=1 27.0.0.1:42424" sqlConnectionSt ring="data source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se" timeout="20" />
<!-- GLOBALIZATION
This section sets the globalization settings of the application.
-->
<globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
</system.web>
</configuration>

Nov 18 '05 #1
0 5901

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

Similar topics

4
5386
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the custom-errors-tag ="off" but nothing happens.... what is my failure????
0
1498
by: Roy Chastain | last post by:
I have a simple page or two and a simple global.asax file that loads some configuration from the web.config file. I developed this on a Windows XP box with framework version 1.1 installed. I run it on a 2003 box with both version 1.0 and 1.1 installed. This appears to work. When move the page and code to my clients hosting service (Earthlink) which only supports version 1.0 of the framework, I get the error below. I know that my...
2
2153
by: Sam | last post by:
Inquiry? -------- I would like to authenticate all subdirectory via asp.net at Windows Server 2003 and IIS 6.0 but it prompt an error message as shown as below: 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,
9
6393
by: Benny Ng | last post by:
Hi,all, How to let the sub-directory to avoid the authentication control from Root's webconfig? I heard that we can add a new web.config to the sub-directory. And then we can slove the problem. Virtual directory is £ºhttp://localhost/main Sub-directory is : http://localhost/main/reminder
7
2782
by: Dan | last post by:
I am trying to add a definition for ConnString to web.config as follows (VB.NET STD 2003) <configuration> <system.web> .......... <appsettings> <add key="ConnString" value="C:\test\test.mdb" /> </appsettings>
1
2283
by: savajx1 | last post by:
I am using the new "web deployment addin" in VS 2005 to output my web site. The web site is correctly output (assemblies generated in the \bin subdirectory). The web site on my developement machine (WIN 2K OS) can be accessed and works correctly from other workstations (i.e no problem here). The problem: When deploying the web site (by just copying the correct subdirectories and creating the application in IIS 6) on 2 dffering Windows...
4
57061
by: aSoundMind | last post by:
Hi there, I recieve this error Server Error in '/integrate' Application. -------------------------------------------------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
3
10592
by: Blasting Cap | last post by:
I am working on a web app that I want to be able to use a separate config file on, in addition to the web.config file that's already working in the application. If I put the following in the web.config file (VS 2005, Framework 2.0), I can retrieve the values fine: <appSettings> <add key="fileInputFolder" value="C:\National City Downloads\test"/> <add key="fileTransaction" value="\Transactions\"/>
4
2939
by: yancheng.cheok | last post by:
Hello all, I have a web application, which I had developed few years ago with ASP .NET 1.1 Today, I would like to deploy the web application to client, using ASP .NET 2.0 + UltiDev Cassini 2.0 I locate my whole project in a folder named C:\website\GOWatch
14
5591
by: Peter | last post by:
..NET 3.5 I have a Windows Service application and it does remoting, but when a client incounters an error the client get the following error message "Server encountered an internal error. For more information, turn off customErrors in the server's .config file." Where do I turn this off
0
8294
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8709
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8494
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
5627
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4297
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2719
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1924
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.