Base solution for your next web application
Open Closed

V5.5.2 couldn't access SQL server2012 compiled with VS2017 #5387


User avatar
0
jizhongqi created

Project solution: ASP.NET + Angular, V5.5.2 Latest VS2017 version: 15.7.5 SQL server2012 version: V11.0.xxx

1, if run the asp net core project directly from vs2017, it works file, I can login the sytem. 2, if I compile the solution and deploy it to window IIS server, couldn't login the system, if check the log, the error messages are about the failed to access sql server2012.

pleas check attached log file for more details. Logs.zip


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    The post did not see the attached log file you sent.

    However, I guess it may be that the IIS application pool user does not have permission to connect to the database when Trusted_Connection=True

  • User Avatar
    0
    jizhongqi created

    for sure, I have the trusted_connection=true

  • User Avatar
    0
    maliming created
    Support Team

    After publishing to IIS, the configuration information of the website will be used under the appsettings.production.json file. Do you see if the connection string is incorrect under this file?

    发布到IIS后,网站的配置信息就会使用appsettings.production.json这个文件下的.你看看是不是连接字符串在这个文件下没有修改?

  • User Avatar
    0
    jizhongqi created

    可以了,谢谢兄弟哈

  • User Avatar
    0
    maliming created
    Support Team

    I am glad that you solved the problem. 666

  • User Avatar
    0
    alper created
    Support Team

    thanks @maliming