简体   繁体   中英

ASP.NET : Connection String not working IIS - Internal Server Error

So I have a WebAPI project with Individual Accounts, and I published it to a folder.

After that, I added a new website in IIS Manager. I created a new connection string with SQL Server Settings:

  • Server : WINDOWSHOST\\WINSQLSERVER
  • Database : Database2
  • Credentials : Use Windows Integrated Security

Server=WINDOWSHOST\\WINSQLSERVER;Database=Database2;Intergrated Security=true

If I use WINDOWSHOST\\WINSQLSERVER and IntergratedSecurity in SQL Server Management Studio, I can log in successfully, but trying to create an account gives me an internal server error

Response from server : 在此处输入图片说明

Default IIS does not support using Windows Integrated Security. these are steps to enable windows authentication

  • Select your website in IIS Manager.
  • Double-click the Authentication icon under the IIS header.
  • Right-click on Windows Authentication and select Enable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM