473,378 Members | 1,119 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,378 software developers and data experts.

Forms Authentication errror

Hi,

Please help me with this..
I am trying to use Forms Authentication in a sample project. I
basically want to have two folders in my application , one in which
I store pages that can be accesed without authentication and one
which can be accessed only by authenticated users..

In my Anonymous folder:
there is a default.aspx - which is a start up page
I have also included a web.config file in that folder with following
config:
<authentication mode="Forms" />
<authorization>
<allow users="?" />
</authorization>

My secret folder's web.config is as follows:
<authentication mode="Forms" />
<authorization>
<deny users="?" />
</authorization>

My main root directory has a Login page and a web.config file
configured as follows:

<authentication mode="Forms" />
<authorization>
<allow users="*" />
</authorization>
But when I am trying to run it it gives me error:

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.

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.
This error can be caused by a virtual directory not being configured
as an application in IIS.

Source Error:
Line 44: by Microsoft that offers a single logon and core
profile services for member sites.
Line 45: -->
Line 46: <authentication mode="Forms" />
Line 47:
Line 48: <!-- AUTHORIZATION
Source File:
c:\inetpub\wwwroot\FormsAuth1WithFolders\Anon\web. config Line: 46

Is it ok to have more than one web.config files in an application??
DOes some configuration need to be done for it??Please let me know...
I have been loosing sleep over it for the last two days.
My basic aim is to seggregate those pages that can be accessed by
anybody and those that need to be accessed only by authorized
users...I am using the sample provided in ASP.NET Unleashed...

If reqd I can also send me application.. It is a very tiny one, with
only 3 pages..:-)...

Any help would be highly appreciated.

Thanks,
Sumaira
Nov 18 '05 #1
1 1604
Hi Sumaria,
Go through this article at(It will solve ur problem):-
http://www.dotnetbips.com/displayarticle.aspx?id=117
Guess ur Web.config isn't well formed!
If u still get the error post ur WEB.CONFIG file
GDluck
Patrick
"Sumaira Ahmad" wrote:
Hi,

Please help me with this..
I am trying to use Forms Authentication in a sample project. I
basically want to have two folders in my application , one in which
I store pages that can be accesed without authentication and one
which can be accessed only by authenticated users..

In my Anonymous folder:
there is a default.aspx - which is a start up page
I have also included a web.config file in that folder with following
config:
<authentication mode="Forms" />
<authorization>
<allow users="?" />
</authorization>

My secret folder's web.config is as follows:
<authentication mode="Forms" />
<authorization>
<deny users="?" />
</authorization>

My main root directory has a Login page and a web.config file
configured as follows:

<authentication mode="Forms" />
<authorization>
<allow users="*" />
</authorization>
But when I am trying to run it it gives me error:

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.

Parser Error Message: It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.
This error can be caused by a virtual directory not being configured
as an application in IIS.

Source Error:
Line 44: by Microsoft that offers a single logon and core
profile services for member sites.
Line 45: -->
Line 46: <authentication mode="Forms" />
Line 47:
Line 48: <!-- AUTHORIZATION
Source File:
c:\inetpub\wwwroot\FormsAuth1WithFolders\Anon\web. config Line: 46

Is it ok to have more than one web.config files in an application??
DOes some configuration need to be done for it??Please let me know...
I have been loosing sleep over it for the last two days.
My basic aim is to seggregate those pages that can be accessed by
anybody and those that need to be accessed only by authorized
users...I am using the sample provided in ASP.NET Unleashed...

If reqd I can also send me application.. It is a very tiny one, with
only 3 pages..:-)...

Any help would be highly appreciated.

Thanks,
Sumaira

Nov 18 '05 #2

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

Similar topics

6
by: Billy Jacobs | last post by:
I have a website which has both secure and non-secure pages. I want to uses forms authentication. How do I accomplish this? Originally I had my web.config file in the root with Forms...
3
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
2
by: Eric | last post by:
I am trying to build an app where the stuff in the root directory is open to all, but anything under the Restricted directory requires you to login and I want to use Forms to do it. I'm having...
0
by: Anonieko Ramos | last post by:
ASP.NET Forms Authentication Best Practices Dr. Dobb's Journal February 2004 Protecting user information is critical By Douglas Reilly Douglas is the author of Designing Microsoft ASP.NET...
7
by: Justin | last post by:
I am trying to password protect a subdirectory using forms authentication. I am using the "Location" tag to specify the directory to be protected. The login.aspx page is in the root directory of...
0
by: Jay Balapa | last post by:
Hello, I posted this under security and there were no replies. We have a website running ASP.Net 1.1 using forms authentication and even protects .htm/.doc files. We have associated such files...
2
by: Jay Balapa | last post by:
Hello, I posted this under general group and no replies. We have a website running ASP.Net 1.1 using forms authentication and even protects .htm/.doc files. We have associated such files to...
4
by: =?Utf-8?B?R3V1czEyMw==?= | last post by:
Hi, I created a web site on a remote server. To logon the user must enter a user id and password. The site is uses Forms Authentication. The web config file looks as follows: ...
5
by: Rory Becker | last post by:
Having now created a Custom MembershipProvider that seems to work correctly with my Logon and ChangePassword controls, I am, as they say, a happy bunny. The next stange is to move on to the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.