Configuration Error

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Apr 2009
Posts: 6
Reputation: kdnichols is an unknown quantity at this point 
Solved Threads: 0
kdnichols kdnichols is offline Offline
Newbie Poster

Configuration Error

 
0
  #1
Apr 15th, 2009
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:

  1. ?xml version="1.0"?>
  2. <appSettings>
  3. </appSettings>
  4. <connectionStrings>
  5. <add name="appConnectionString" connectionString="Data Source=dev2005\sqlexpress;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>
  6. </connectionStrings>
  7. <configuration>
  8. <system.web>
  9. <globalization culture="en-GB"/>
  10. <httpHandlers>
  11. <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>
  12. <compilation debug="true" strict="false" explicit="true">
  13. <buildProviders>
  14. <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></buildProviders>
  15. </compilation>
  16. <pages maintainScrollPositionOnPostBack ="true">
  17. <namespaces>
  18. <clear/>
  19. <add namespace="System"/>
  20. <add namespace="System.Collections"/>
  21. <add namespace="System.Collections.Specialized"/>
  22. <add namespace="System.Configuration"/>
  23. <add namespace="System.Text"/>
  24. <add namespace="System.Text.RegularExpressions"/>
  25. <add namespace="System.Web"/>
  26. <add namespace="System.Web.Caching"/>
  27. <add namespace="System.Web.SessionState"/>
  28. <add namespace="System.Web.Security"/>
  29. <add namespace="System.Web.Profile"/>
  30. <add namespace="System.Web.UI"/>
  31. <add namespace="System.Web.UI.WebControls"/>
  32. <add namespace="System.Web.UI.WebControls.WebParts"/>
  33. <add namespace="System.Web.UI.HtmlControls"/>
  34. </namespaces>
  35. </pages>
  36. <authentication mode="Windows"/>
  37. <authorization>
  38. <deny users="?"/>
  39. </authorization>
  40. <identity impersonate="true"/>
  41. </system.web>
  42. </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
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 221
Reputation: mail2saion is an unknown quantity at this point 
Solved Threads: 34
mail2saion's Avatar
mail2saion mail2saion is offline Offline
Posting Whiz in Training

Re: Configuration Error

 
0
  #2
Apr 15th, 2009
HI, YOUR CONFIGURATION PLACEMENT WAS WRONG. HERE I MODIFIED YOUR CONFIG FILE. HAVE A LOOK:

  1. <?xml version="1.0"?>
  2. <configuration>
  3. <appSettings>
  4. </appSettings>
  5. <connectionStrings>
  6. <add name="appConnectionString" connectionString="Data Source=dev2005\sqlexpress;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>
  7. </connectionStrings>
  8. <system.web>
  9. <globalization culture="en-GB"/>
  10. <httpHandlers>
  11. <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>
  12. <compilation debug="true" strict="false" explicit="true">
  13. <buildProviders>
  14. <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /></buildProviders>
  15. </compilation>
  16. <pages maintainScrollPositionOnPostBack ="true">
  17. <namespaces>
  18. <clear/>
  19. <add namespace="System"/>
  20. <add namespace="System.Collections"/>
  21. <add namespace="System.Collections.Specialized"/>
  22. <add namespace="System.Configuration"/>
  23. <add namespace="System.Text"/>
  24. <add namespace="System.Text.RegularExpressions"/>
  25. <add namespace="System.Web"/>
  26. <add namespace="System.Web.Caching"/>
  27. <add namespace="System.Web.SessionState"/>
  28. <add namespace="System.Web.Security"/>
  29. <add namespace="System.Web.Profile"/>
  30. <add namespace="System.Web.UI"/>
  31. <add namespace="System.Web.UI.WebControls"/>
  32. <add namespace="System.Web.UI.WebControls.WebParts"/>
  33. <add namespace="System.Web.UI.HtmlControls"/>
  34. </namespaces>
  35. </pages>
  36. <authentication mode="Windows"/>
  37. <authorization>
  38. <deny users="?"/>
  39. </authorization>
  40. <identity impersonate="true"/>
  41. </system.web>
  42. </configuration>
MARK AS SOLVED if its help you.

REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 6
Reputation: kdnichols is an unknown quantity at this point 
Solved Threads: 0
kdnichols kdnichols is offline Offline
Newbie Poster

Re: Configuration Error

 
0
  #3
Apr 15th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 221
Reputation: mail2saion is an unknown quantity at this point 
Solved Threads: 34
mail2saion's Avatar
mail2saion mail2saion is offline Offline
Posting Whiz in Training

Re: Configuration Error

 
0
  #4
Apr 15th, 2009
TRY BY MODIFYING IN THE BELOW WAY:
  1. <add name="appConnectionString" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=NWNET;Integrated Security=True" providerName="System.Data.SqlClient"/>

HOPE IT WILL RESOLVE YOUR PROBLEM.
MARK AS SOLVED if its help you.

REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 6
Reputation: kdnichols is an unknown quantity at this point 
Solved Threads: 0
kdnichols kdnichols is offline Offline
Newbie Poster

Re: Configuration Error

 
0
  #5
Apr 15th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 221
Reputation: mail2saion is an unknown quantity at this point 
Solved Threads: 34
mail2saion's Avatar
mail2saion mail2saion is offline Offline
Posting Whiz in Training

Re: Configuration Error

 
0
  #6
Apr 16th, 2009
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.
MARK AS SOLVED if its help you.

REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 6
Reputation: kdnichols is an unknown quantity at this point 
Solved Threads: 0
kdnichols kdnichols is offline Offline
Newbie Poster

Re: Configuration Error

 
0
  #7
Apr 16th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 221
Reputation: mail2saion is an unknown quantity at this point 
Solved Threads: 34
mail2saion's Avatar
mail2saion mail2saion is offline Offline
Posting Whiz in Training

Re: Configuration Error

 
0
  #8
Apr 19th, 2009
HEY WHY YOU PLACE THE
  1. <?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.
MARK AS SOLVED if its help you.

REGARDS
MCTS - Shawpnendu bikash maloroy
http://shawpnendu.blogspot.com
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 1
Reputation: skytiger is an unknown quantity at this point 
Solved Threads: 0
skytiger skytiger is offline Offline
Newbie Poster

Re: Configuration Error

 
0
  #9
Apr 19th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 6
Reputation: kdnichols is an unknown quantity at this point 
Solved Threads: 0
kdnichols kdnichols is offline Offline
Newbie Poster

Re: Configuration Error

 
0
  #10
Apr 20th, 2009
Hello All,

This is the code I now have:

  1. <configuration>
  2. <appSettings>
  3. </appSettings>
  4. <connectionStrings>
  5. <add name="appConnectionString" connectionString="Data Source=MyServer name for security reasons\sqlexpress;Initial Catalog=Northwind_Test_4;Integrated Security=True" providerName="System.Data.SqlClient"/>
  6. </connectionStrings>
  7. <system.web>
  8. <globalization culture="en-GB"/>
  9. <httpHandlers>
  10. <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" />
  11. </httpHandlers>
  12. <compilation debug="true" strict="false" explicit="true">
  13. <buildProviders>
  14. <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
  15. </buildProviders>
  16. </compilation>
  17. <pages maintainScrollPositionOnPostBack ="true">
  18. <namespaces>
  19. <clear/>
  20. <add namespace="System"/>
  21. <add namespace="System.Collections"/>
  22. <add namespace="System.Collections.Specialized"/>
  23. <add namespace="System.Configuration"/>
  24. <add namespace="System.Text"/>
  25. <add namespace="System.Text.RegularExpressions"/>
  26. <add namespace="System.Web"/>
  27. <add namespace="System.Web.Caching"/>
  28. <add namespace="System.Web.SessionState"/>
  29. <add namespace="System.Web.Security"/>
  30. <add namespace="System.Web.Profile"/>
  31. <add namespace="System.Web.UI"/>
  32. <add namespace="System.Web.UI.WebControls"/>
  33. <add namespace="System.Web.UI.WebControls.WebParts"/>
  34. <add namespace="System.Web.UI.HtmlControls"/>
  35. </namespaces>
  36. </pages>
  37. <authentication mode="Windows"/>
  38. <authorization>
  39. <deny users="?"/>
  40. </authorization>
  41. <identity impersonate="true"/>
  42. </system.web>
  43. </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
Last edited by peter_budo; Apr 25th, 2009 at 5:23 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC