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

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)

21 people commented!

  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.

  20. Fredericka Morganti says:

    This is such a great post you have shared. I really like reading post like this because its fruitful and helpful by many people like me. I know its not that easy to make a excellent post but once you’ve get use to it, you’ll be able to make it easier and more qualified. I’m noting it for future reference. I wish to read more of your post soon. Please put me in your list, so that I will be inform of your new post.

    Just in case your not earning money with your weblog, there’s a good ebook you must have to learn how to maximize your earning potential through blogging. I can see your blog needs a little improvement, I highly recommend that you take time on reading Darren’s book, its full of secret information of how you can earn more money out of a blog. I recommend that you checkout this site called ez-dollar-income (you can find it on google – its top in the search engine) – a friend recommend it to me and indeed had help me a lot on making money on my blog. Be sure to subscribe so that you’ll be updated for new blog money chances. I now made 30-50$ each day, its not that enough but will soon make more.

    Have a great day and hope to read more post when I come back.

  21. Paulo Costa says:

    Eu estou a ter o mesmo erro, e estou a utilizar o WS2003. Quando clico nas propriedades do meu site, nao me aparece o separador “Asp.Net”, sendo assim, onde posso mudar a versao do asp.net? obrigado.

Leave a Reply