我有一个MVC应用程序,它是我的连接字符串。
<add name="BehkamContext" connectionString="Data Source=.;Initial Catalog=Behkam;Integrated Security=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient" />
在调试中使用我的项目没有问题。但是在IIS中运行它却出现此错误:
无法打开登录请求的数据库“ Behkam”。登录失败。 用户'WORKGROUP \ DESKTOP-TFB5NSL $'登录失败。
我使用<authentication mode="Windows"/>
,但收到错误消息。
我在连接字符串中设置了Integrated Security=SSPI
,但收到错误消息。