Problem with Using Forms Authentication to Secure Subdirectory - "error to use a section registered as allowDefinition='MachineToApplication'"

Ok first let me say that this is a typical rented server off DiscountASP.net so I dont have direct IIS manager access. My app is pretty simple. I have the root / and a /Admin subfolder that I will allow the client to edit data on the customer interface. Mostly simple price listings. I want to restrict access to the /Admin folder obviously but leave the rest of the site wide open. I'm getting the following error. I only have one web.config file in the root. and the Admin subfolder is just a simple subfolder I created myself. Do I have to create the ADmin folder as its own application? I would like to avoid this if I could because I use master pages and everything is all organized nicely in the root. Please advise...

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 33:     <location path="Admin">
Line 34: <system.web>
Line 35: <authentication mode="Forms">
Line 36: <forms loginUrl="/Admin/AdminLogin.aspx"
Line 37: protection="All"
 

 

 


KC Abramson
www.ORCradio.com
Web Application Developer
Integrated Software Solutions, Inc.

When you're feeling down just remember.....the best things in life are someone else's.
0
kcabrams
4/30/2008 5:40:02 AM
asp.net.security 27051 articles. 1 followers. Follow

8 Replies
1164 Views

Similar Articles

[PageSpeed] 43

Hi, 

Check whether your folder is configured as virtual directory or not. And also add this

<allow users="*"/>


Regards,
Kumar Kiran | Protocols Of Matrix |
Click "Mark as Answer" on the post that helped you to help future readers to get the solutions.
0
kumarkiran
4/30/2008 6:18:58 AM

To configure the folder as an virtual directory can i have it still part of the same root application? 


KC Abramson
www.ORCradio.com
Web Application Developer
Integrated Software Solutions, Inc.

When you're feeling down just remember.....the best things in life are someone else's.
0
kcabrams
4/30/2008 4:11:52 PM

 Anyone know? I would like this all to be part of the same applictation. CAn you secure just a certain subdirectory?


KC Abramson
www.ORCradio.com
Web Application Developer
Integrated Software Solutions, Inc.

When you're feeling down just remember.....the best things in life are someone else's.
0
kcabrams
5/2/2008 3:59:07 AM

Heres is the section of code in my web config

 <location path="Admin">
        <system.web>
            <authentication mode="Forms">
                <forms loginUrl="/Admin/AdminLogin.aspx"
                protection="All"
                timeout="30"
                name=".EVALANDCOAUTH"
                path="/Admin"
                requireSSL="false"
                slidingExpiration="true"
                defaultUrl="/Admin/Default.aspx"
                cookieless="UseDeviceProfile"
                enableCrossAppRedirects="false" />
            </authentication>
            <allow users="*" />
        </system.web>
    </location>
 


KC Abramson
www.ORCradio.com
Web Application Developer
Integrated Software Solutions, Inc.

When you're feeling down just remember.....the best things in life are someone else's.
0
kcabrams
5/2/2008 3:59:50 AM

This error can happened if the website(applciation) is not configured as a virtual directory,

so make sure you configured the website as a virtual directory , and you don't have to configure the sub directories , just the main website directory,

there is alot of talks about this issue and how it can be resolved , have a look

http://geekswithblogs.net/ranganh/archive/2005/04/25/37609.aspx

and there is a relatd threads:

http://forums.asp.net/t/769696.aspx

http://forums.asp.net/t/1211603.aspx

 

actually , this forum contains a lot of threads about this issue ,

see  google search result

 

 


Regards,

Anas Ghanem.


Note:Please Don't hesitate to click "Report Abuse" link if you noticed something wrong on the forums (like duplicate ,Off-topic,offensive,or any post that violates the website "TERMS OF USE"). -- Thanks!

0
anas
5/2/2008 10:55:53 AM

Oh I see. See this is a rented server that i share with tons of others on DiscountASP.net so not sure if I have access to do that. We will see tho. Thanks for the assistance


KC Abramson
www.ORCradio.com
Web Application Developer
Integrated Software Solutions, Inc.

When you're feeling down just remember.....the best things in life are someone else's.
0
kcabrams
5/4/2008 6:29:13 AM

The option to configure your folder as virtual directory will be there in your webhosting control panel. but they might have named it as web folder.


Regards,
Kumar Kiran | Protocols Of Matrix |
Click "Mark as Answer" on the post that helped you to help future readers to get the solutions.
0
kumarkiran
5/6/2008 5:46:47 AM

I think it's very common problem, therefore I would like to share my solution.

I think that the simplest solution is to set <authentication mode="Forms"> in root directory (as you would want to access all website via username and password) but will allow the access to root directory for all users (to skip <authorization> element should be enough, default rights allow access to all users). For the Admin directory just override the authorization- <authorization><deny users="?" /></authorization>. As a result the password will be required only for accessing pages in Admin directory, for the others not at all!

 

0
osth
12/15/2008 7:32:15 PM
Reply:

Similar Artilces:

VS 2008 error 'It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.
 I am using VS 2008 on Windows XP. I downloaded the Ajax Control Toolkit. I am working on Liberty's Programming ASP.NET 3.5 AjaxDemo.aspx. When I hit F5 I get the following error message: "Error    1    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."  I do not have IIS on this machine. I checked out   http://geekswithblogs.net/ranganh/archive/2005/04/25/...

It's is an error to use a section registered as allowDefinition='MachineToApplication' ...
Hello Dear All, I'm just making my first steps in programming, and i'm really interesting in asp.net. I downloaded the Employee Info Starter Kit in order to learn some features, but unfortunatly i'm not able to run the application. This is the error i'm getting : 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. F:\Employee Info\employee-info-web-starter-kit\Web.config I thought i had to configure IIS in machi...

Error Message :It is an error to use a section registered as allowDefinition='MachineToApplication' ........
" 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."Could anyone plz help.....Why this error is occuring look at this. http://geekswithblogs.net/ranganh/archive/2005/04/25/37609.aspx in overview any one of the below 2 reasons.  1. You must define that application as virtual directory. you can do this by giving the directory websharing by rightclick the direcotyr-> properties->websharing-> share t...

Error 102 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.
 Hi there, i'm greatful if nayone can help me with it. i'm stuck with this error, trying to get to working but to no avail. Error    102    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.   ...\Web.config    389     i read lots of the posts but the solutions offered there did not resolve my problem. here is what i've tried...

It is an error to use a section registered as allowDefinition='MachineToApplication' ...
You may receive the error "It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level" in asp.net. This Article explains the resolution for the same. Thanks. regards,Harishhttp://geekswithblogs.net/ranganh...

...error to use a section registered as AllowDefinition='MachineToApplication'
It is an error to use a section registered as AllowDefinition='MachineToApplication' beyond application level. The error can be caused by a virtual directory not being configured as an application in IIS. Well I created a new web site application in VS2005 using the 'File System' option. The error message I get is when using the VS2005 IIS to test the page code. So I should not need to set up any IIS stuff when using the VS2005 debugger. I simply followed the steps in the microsoft tutorial: Working with Data in ASP.NET 2.0 :: Creating a Data Access Layerhttp://www.asp.net/learn/dataacces...

It is an error to use a section registered as allowDefinition='MachineToApplication' ...
Hello everyone,   I would like to publish my Personal starter kit  on a subdomain folder like: (www.mysite.com/clubsite/) rather than having all the files uploaded to the root directory. but it did not work I did try locally  to remove  all the files and folders  from the root to a sub directory folder but it did not work either : The error is:   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 applicatio...

It is an error to use a section registered as allowDefinition='MachineToApplication'
I have uploaded my site. It is working fine on my local server on my PC. But when I upload on remote server I am shown following 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...

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 configure
Dear All, I am a newbie and this is my first time trying to run asp.net :) I was trying to deploy the wrox asp.net sample code and this is what I got when I tried to run it. I created a virtual directory called "wrox". I have changed the username in the machine.config <processModel> to: userName="SYSTEM" password="AutoGenerate" I thought it was supposed to run because it is WROX OFFICIAL SAMPLE CODE. Server Error in '/wrox' Application. -------------------------------------------------------------------------------- Configur...

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 configure
Hello. I got this error on my brinkster hosting.   I have a virtual directory and on the virtual directory is a fodler called webroot. and on this there are 7 subdirectorys according to each one of my domains.  As the error says. I cant create a virtual directory because its not a dedicated server.     Server Error in '/' 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. ...

RE: It is an error to use a section registered as allowDefinition='MachineToApplication'
RE: It is an error to use a section registered as allowDefinition='MachineToApplication' There's an asp.net 1.1 vb.net vs 2003 solution under a virtual directory on one of our sites. I can see the solution and project files in under the folder where the IIS virtual directory is pointing. The solution is working fine. On the server, If I manually create a new virtual directory, create a new application name for it under the same application pool and copy the the full directory into the new virtual I can browse the solution. However if I attempt to browse the logon.aspx page I...

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 i
Hi i am getting this error, i am using visual studio 2005 and i have IIS 6, what do i need to do to rectify this problem, thank you. Can i also add that this error just came out of the blue, because the last time i started up the project it worked fine....

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 i
Hi Friends  i host the applicatin on server.I got the  error as Virtual  Directory not cofigured.I am using .net frame work 2.0 and i create the virtual directory in application Server. I am using Form authentication for application. I checked  virtual directory is created successfully. I need help to set any other properties virtual directory properites.  Do you have a sub web.config files ? i mean config files other than the one in the main directory ? if so , please make sure to remove the <authentication> section from them. Regards,Anas G...

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 i
I added this to my web.config as specified in the article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000008.asp <authentication mode="Windows"/> I get this error when I try loading my aspx page: "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." I checked my IIS virtual directory and it has a name in for the application name in it's properties so I don't get why I still have this err...

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 i #2
Hi All,I built a website which works. I needed to be able to generate 2 versions of the same website so I built a tool that dynamicaly generates the DAL and BLL. It also copies various standard files from a template to the target source location. It also processes variouse source files to customise them based on certain settings. Anyway it all works. I can generate a version of the original site. However, my problem comes when I run the tool to generate my orginal site. I am unable to build it and I get the following error:"It is an error to use a section registered as allowDefinition=&...

Web resources about - Problem with Using Forms Authentication to Secure Subdirectory - "error to use a section registered as allowDefinition='MachineToApplication'" - asp.net.security

Resources last updated: 1/12/2016 1:29:59 AM