Need help with Web.config

Discussion in 'Site Programming, Development and Design' started by SonnyK, Jan 12, 2018.

Tags:
  1. Hello,
    I added the connection string correctly following the guidelines, but as soon as I upload my site and browse to it, I am getting the following error:

    An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct

    This error is given as a result of an Exception that is thrown in my C# code when trying to access the database.

    I have attached the Web.Config file here. Can someone please go through it and let me know what I'm doing wrong. FYI, I'm using ASP.NET Membership in the site. Please note that just for the sake of attaching the Web.Config here, I had to change the extension to .txt as this site doesn't accept it.
     

    Attached Files:

  2. I figured this out. There was nothing wrong with the Web.config. I upgraded my IDE from VS 2012 to VS Community 2017 and at the time of publishing the site from within VS, I had to create the connection string in the wizard by connecting to the Server and DB at Winhost. Once I did this, my issue was fixed.
     
    Michael and Elshadriel like this.
  3. Thanks for posting the follow-up Sonny.
     
    SonnyK likes this.

Share This Page