Hello All,

I know some of ASP.net but now I am finally getting ready to set up a web page.

Here is my error message:

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: Configuration file 'c:\inetpub\wwwroot\web.config' does not contain a root <configuration> tag.

Source Error:


Line 1: <?xml version="1.0"?>
Line 2: <appSettings>
Line 3: </appSettings>
Line 4: <connectionStrings>


Source File: c:\inetpub\wwwroot\web.config Line:

Here is the code:

?xml version="1.0"?>
	<appSettings>
	</appSettings>
<connectionStrings>
	<add name="appConnectionString" connectionString="Data Source=dev2005\sqlexpress;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<configuration>
<system.web> 
<globalization culture="en-GB"/>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" /></httpHandlers> 
<compilation debug="true" strict="false" explicit="true">
	<buildProviders> 
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></buildProviders> 
</compilation>
	<pages maintainScrollPositionOnPostBack ="true"> 
<namespaces>
	<clear/> 
<add namespace="System"/>
	<add namespace="System.Collections"/> 
<add namespace="System.Collections.Specialized"/>
	<add namespace="System.Configuration"/> 
<add namespace="System.Text"/>
	<add namespace="System.Text.RegularExpressions"/> 
<add namespace="System.Web"/>
	<add namespace="System.Web.Caching"/> 
<add namespace="System.Web.SessionState"/>
	<add namespace="System.Web.Security"/> 
<add namespace="System.Web.Profile"/>
	<add namespace="System.Web.UI"/> 
<add namespace="System.Web.UI.WebControls"/>
	<add namespace="System.Web.UI.WebControls.WebParts"/> 
<add namespace="System.Web.UI.HtmlControls"/>
	</namespaces> 
</pages>
	<authentication mode="Windows"/>
<authorization>
	<deny users="?"/> 
</authorization>
	<identity impersonate="true"/>
</system.web>
</configuration>

I am under some time pressure to learn this on the fly and yes I am burnign some midnight oil on my own.

Any and all help is greatly appreciated!

Thanks,

Kurt

HI, YOUR CONFIGURATION PLACEMENT WAS WRONG. HERE I MODIFIED YOUR CONFIG FILE. HAVE A LOOK:

<?xml version="1.0"?>
<configuration>
	<appSettings>
	</appSettings>
<connectionStrings>
	<add name="appConnectionString" connectionString="Data Source=dev2005\sqlexpress;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web> 
<globalization culture="en-GB"/>
<httpHandlers>
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" /></httpHandlers> 
<compilation debug="true" strict="false" explicit="true">
	<buildProviders> 
<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></buildProviders> 
</compilation>
	<pages maintainScrollPositionOnPostBack ="true"> 
<namespaces>
	<clear/> 
<add namespace="System"/>
	<add namespace="System.Collections"/> 
<add namespace="System.Collections.Specialized"/>
	<add namespace="System.Configuration"/> 
<add namespace="System.Text"/>
	<add namespace="System.Text.RegularExpressions"/> 
<add namespace="System.Web"/>
	<add namespace="System.Web.Caching"/> 
<add namespace="System.Web.SessionState"/>
	<add namespace="System.Web.Security"/> 
<add namespace="System.Web.Profile"/>
	<add namespace="System.Web.UI"/> 
<add namespace="System.Web.UI.WebControls"/>
	<add namespace="System.Web.UI.WebControls.WebParts"/> 
<add namespace="System.Web.UI.HtmlControls"/>
	</namespaces> 
</pages>
	<authentication mode="Windows"/>
<authorization>
	<deny users="?"/> 
</authorization>
	<identity impersonate="true"/>
</system.web>
</configuration>

Hello Saion,

Thanks for your reply.

This is the error I am now getting.

I am sorry if it seems like I am a klutz but once I get it, I have it for life!

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: Unrecognized configuration section 'connectionStrings'

Source Error:


Line 3: <appSettings>
Line 4: </appSettings>
Line 5: <connectionStrings>
Line 6: <add name="appConnectionString" connectionString="Data Source=dev2005\sqlexpress;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>
Line 7: </connectionStrings>


Source File: c:\inetpub\wwwroot\web.config Line: 5

Thanks,

Kurt

TRY BY MODIFYING IN THE BELOW WAY:

<add name="appConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>

HOPE IT WILL RESOLVE YOUR PROBLEM.

Hello Saion,

I am using SQL Server Management Express is it still the same name?

I am getting the same 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: Unrecognized configuration section 'connectionStrings'

Source Error:


Line 3: <appSettings>
Line 4: </appSettings>
Line 5: <connectionStrings>
Line 6: <add name="appConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>
Line 7: </connectionStrings>


Source File: c:\inetpub\wwwroot\web.config Line: 5

HI kdnichols,
COULD YOU PLEASE CHECK YOUR FRAMEWORK VERSION FROM IIS.
RIGHT CLICK ON MY COMPUTER-->properties-->IIS--> SELECT YOUR SITE-->right click-->click on asp.net tab then check asp.net version.

IF U R RUNNING FROM APPLICATION THEN CHECK VERSION FROM IIS-->DEFAULT WEBSITE

THEN SET UR VERSION WHICH USE FOR DEVELOPMENT.

Hello Saion and all,

I changed to version ASP.net 2.0 per your suggestion.

I now get this 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: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 44, position 19.

Source Error:


Line 42: <identity impersonate="true"/>
Line 43: </system.web>
Line 44: </configuration><?xml version="1.0"?>
Line 45: <configuration>
Line 46: <appSettings>


Source File: c:\inetpub\wwwroot\web.config Line: 44

I really need some help on this ASAP please. This is starting to drive me nutty.

Thanks,

Kurt

HEY WHY YOU PLACE THE

<?xml version="1.0"?>

after configuration section. Remove this & it will be the first line. Look at your first post. Why you modified?

I think everything will be just cut the above line & paste it as a first line. If problem doesn't resolve then post whole web.config file. Dont forget to remove your secure information like password/servername etc.

Let me know your status.

Hello,

What i am thinking if this is the same problem then you got the solution

<configuration>
<configSections>

put the above immediately after this line <?xml version="1.0"?>

thanks

Hello All,

This is the code I now have:

<configuration>
	<appSettings>
	</appSettings>
	<connectionStrings>
		<add name="appConnectionString" connectionString="Data Source=MyServer name for security reasons\sqlexpress;Initial Catalog=Northwind_Test_4;Integrated Security=True" providerName="System.Data.SqlClient"/>
	</connectionStrings>
	<system.web>
		<globalization culture="en-GB"/>
		<httpHandlers>
			<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
		</httpHandlers>
		<compilation debug="true" strict="false" explicit="true">
			<buildProviders>
				<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
			</buildProviders>
		</compilation>
		<pages maintainScrollPositionOnPostBack ="true">
			<namespaces>
				<clear/>
				<add namespace="System"/>
				<add namespace="System.Collections"/>
				<add namespace="System.Collections.Specialized"/>
				<add namespace="System.Configuration"/>
				<add namespace="System.Text"/>
				<add namespace="System.Text.RegularExpressions"/>
				<add namespace="System.Web"/>
				<add namespace="System.Web.Caching"/>
				<add namespace="System.Web.SessionState"/>
				<add namespace="System.Web.Security"/>
				<add namespace="System.Web.Profile"/>
				<add namespace="System.Web.UI"/>
				<add namespace="System.Web.UI.WebControls"/>
				<add namespace="System.Web.UI.WebControls.WebParts"/>
				<add namespace="System.Web.UI.HtmlControls"/>
			</namespaces>
		</pages>
		<authentication mode="Windows"/>
		<authorization>
			<deny users="?"/>
		</authorization>
		<identity impersonate="true"/>
	</system.web>
</configuration>

I am getting the following error:

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

Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

I have made sure all the services are started and the web pages aer copied in a folder in WWWRoot.

What am I doing wrong here?

I need help very quickly with this. I do appreciate everyone's time on this so far especially Saion's. If anyone has an idea please let me know.

Thanks,

Kurt

HI,
THIS IS ALL ABOUT PERMISSION RELATED PROBLEM. COULD YOU PLEASE TRY WITH THE ADMIN CREDENTIALS WHO HAS ENOUGH PERMISSION.

<identity impersonate="true"
          userName="hosting server name\Administrator" 
          password="........." />

THEN YOUR PROBLEM RESOLVED. I AM SURE. BUT THERE IS SCURITY HOLE HERE. SO CRETAE A USER & GIVE THE FULL PERMISSION THEN STEP BY STEP DENY PERMISSIONS & TUNE THE APPLICATION.

Hello All,

I haved checked the version and I have checked settings. I am a Administrator on this machine.

This is the error message I am now getting:

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: The 'system.web' start tag on line 7 does not match the end tag of 'identity'. Line 41, position 5.

Source Error:


Line 39: <deny users="?"/>
Line 40: </authorization>
Line 41: </identity impersonate="true"Administrator="My Server Name\Administrator"password="My Password">
Line 42: </system.web>
Line 43: </configuration>


Here is the code:

configuration>
	<appSettings>
	</appSettings>
	<connectionStrings>
		<add name="appConnectionString" connectionString="Data Source=AALABSTESTVM01\sqlexpress;Initial Catalog=Northwind_Test_4;Integrated Security=True" providerName="System.Data.SqlClient"/>
	</connectionStrings>
	<system.web>
		<globalization culture="en-GB"/>
		<httpHandlers>
			<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
		</httpHandlers>
		<compilation debug="true" strict="false" explicit="true">
			<buildProviders>
				<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
			</buildProviders>
		</compilation>
		<pages maintainScrollPositionOnPostBack ="true">
			<namespaces>
				<clear/>
				<add namespace="System"/>
				<add namespace="System.Collections"/>
				<add namespace="System.Collections.Specialized"/>
				<add namespace="System.Configuration"/>
				<add namespace="System.Text"/>
				<add namespace="System.Text.RegularExpressions"/>
				<add namespace="System.Web"/>
				<add namespace="System.Web.Caching"/>
				<add namespace="System.Web.SessionState"/>
				<add namespace="System.Web.Security"/>
				<add namespace="System.Web.Profile"/>
				<add namespace="System.Web.UI"/>
				<add namespace="System.Web.UI.WebControls"/>
				<add namespace="System.Web.UI.WebControls.WebParts"/>
				<add namespace="System.Web.UI.HtmlControls"/>
			</namespaces>
		</pages>
		<authentication mode="Windows"/>
		<authorization>
			<deny users="?"/>
		</authorization>
		</identity impersonate="true"Administrator="My Server Name\Administrator"password="My Password">
	</system.web>
</configuration>

Please help I am going nutty it shouldn't be this hard.

A special thanks to Saion for all of his efforts thus far. Does anyone out there have any websites that shows this type of coding that can help me learn more?

Thanks for taking your time to read my post!

Have a great day!

Kurt

PLEASE READ MY PREVIOUS POST SYNTAX CAREFULLY. YOU WILL GET YOUR ANSWER. WHY THE TAGE STARTED WITH </identity ????????????? Look at my syntax described in the previous post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.