Error Solution: Fix for ‘Unrecognized configuration section connectionStrings’ Error in ASP.NET 2.0

Shiva

After publishing your website in ASP.NET 2.0 using the Build > Publish Website in the Visual Studio 2005 IDE, when you try to access your application for the first time in the browser, you may get the “Unrecognized configuration section ‘connectionStrings’” error. This is because ASP.NET has introduced the new <connectionsStrings> section in the web.config which will not be recognized in the .NET 1.1 framework.

If you look closely at the error message, IIS is trying to run the application using the 1.1 framework.

unrecognized configuration section connectionStrings error

Fix the configuration section connectionStrings error.

  • Open IIS and browse to the website under computer_name > Web Sites > Default Web Site > website_name.
  • Where website_name is the actual name of the website, in this case the MyForecast website.
  • Right click website_name. Click Properties.
  • Click the ASP.NET.

Change ASP.NET Version to 2.0

  • From the ASP.NET Version dropdown, select 2.0… version and Click OK.
  • Now, if you visit your application main page, it should work !

(Note, you may need to restart IIS)

19 Comments For This Post

  1. Dorbor Bedell Says:

    My Man I just can’t explain how you’ve rescued me frm this big little problem. Thanks a whole lot. I am an Application Programmer from Liberia, West Africa

  2. Shiva Says:

    Dorbor, Glad this was of help to you !

  3. Gerhardt Meyer Says:

    Hi.

    I don’t have an ASP.Net tab!?

    Please help.
    Thanks.

  4. Shiva Says:

    @ Gerhardt – What is your OS and IIS version ?

  5. Rob Says:

    I got the same error message as detailed in this post, and I set the website to ASP 2.0, and yet, when I try to open my aspx file in my browser, it says it can’t find the file…it works great on my local version of Visual Studio 2003. I am trying to run this on a Windows 2003 Server with the .Net 2.0 Framework installed.

    Any ideas?

  6. Mike Says:

    Ugh, I’m so lost. I’m trying to hack an old website together because my friend/client wanted some changes, but I have no expeirence with Visual studio/.net and am really lost.

    I’ve got it working at home, but after the upload I get the connectionstrings problem you’re talking about. I don’t think I understand how to fix it though.

    How do I change the IIS settings for an FTP that’s not running off this comp?

    Mike

  7. Sunilbabu C Says:

    Thanks Shiva.

  8. ghulam Says:

    I am also same error on windows 2000 and it I doesn’t have an ASP.Net tab!?

    Please help.

    Thanks
    Ghulam

  9. Prajwal Says:

    I have published the web site and when running in the browser i am getting following error.

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS0030: Cannot convert type ‘ASP.login_aspx’ to ‘System.Web.UI.WebControls.Login’

    Source Error:

    Line 120: public login_aspx() {
    Line 121: string[] dependencies;
    Line 122: ((Login) (this)).AppRelativeVirtualPath = “~/Login.aspx”;
    Line 123: if ((global::ASP.login_aspx.@__initialized == false)) {
    Line 124: global::ASP.login_aspx.@__stringResource = this.ReadStringResource();

  10. Alex Says:

    Thanks for this article! Great help!

  11. Marco Muciño Says:

    Thanks for this tip, great helpful. Thanks again from Mexico.

  12. Dunga Says:

    Thanks!!!!

  13. Oliver Says:

    I love you!!

  14. Atul Says:

    hi,

    I have problem.
    Can’t open database “Database name” requested by the login.Login failed. Login Failed For user “Computer nameASPNET”

    please solve it

    Thanks in advance.

  15. Dave Says:

    That worked, Thanks!

  16. Rob Says:

    Very helpful! Thank you for posting!

  17. Helen Says:

    Gert,

    Thank you. That was very helpful. I did have to go one more step, which was to run this command:

    %WINDIR%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

  18. r2d2 Says:

    Helen,

    thanks for the DOS command… couldn’t get it to work w/o ur help.

    Art

  19. kamlesh Says:

    i continue project in asp.net, and generated error ,
    please solution yhe error
    AssociatedControlID = Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

Leave a Reply

Advertise Here

Photos from our Flickr stream

See all photos

Advertise Here