Answered by:
Config file error

Question
-
User351843852 posted
Here is the error. What should I do
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.
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 2: <configuration> Line 3: <system.web> Line 4: <profile> Line 5: <properties> Line 6: <add name="UserTheme"/>
Source File: C:\Sites\content\e\r\i\erikn68\web.config Line: 4
Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3634
Monday, February 4, 2013 10:23 PM
Answers
All replies
-
User1990816827 posted
Did you check to make sure the folder was configured as an application? Most likely you have nested web.config files. Remove or rename the one in a folder below or above your app.
check this:
Monday, February 4, 2013 10:46 PM -
User-1716253493 posted
Add application instead add virtual directory, or configure virtual directory as an application
Monday, February 4, 2013 11:01 PM -
User465171450 posted
I explained this in your previous post. This happens when your web.config is in a directory that isn't your application root. Example: Your root directory is c::\myroot which maps to your site like http://www.mysite.com. If you put the web.config in c:\myroot\dir (which maps to http://www.mysite.com/dir) then this error would occur since. Certain things such as authentication, profile, sessionstate can only be set in the web.config that is at the very root of the application. Once you figure out which is the root directory for the application, place this in the web.config in the root and make sure it isn't in a subdirectory.
Monday, February 4, 2013 11:11 PM -
User351843852 posted
It is still not working with the config file in root and the aspx in the sub directory
Monday, February 4, 2013 11:24 PM -