Connection to remote SQL server breaks when upgrading web server to .net framework 4.6.1

后端 未结 4 785
再見小時候
再見小時候 2021-02-20 00:27

We\'re currently working on updating our asp.net web application (hosted on IIS 7.5) from .net framework v4.5 to v4.6.1. On small lower environments/local development in which S

4条回答
  •  感动是毒
    2021-02-20 01:13

    you might want to check the machine.config and web.config files in the windows\micorsoft.net\framework64\v######\config folders. each version of .NET runs on different config files. Since the same code is used in both environments, it must be from the config inherited from here. I am guessing that the 4.6.1 is set to default the connection string to localhost and since the SQL in local and dev are on the same server it is not an issue. You will probably find that the config in the .NET 4.5 version has a connection string defined beyond localhost.

    if 4.5 and 4.61 are using the same config files, then make sure you define a default connection string to be used by the entity framework in that web.config.

提交回复
热议问题