无法打开数据库“mydb”登录请求。登录失败。用户'WIN-JM04KI254SDM8 \IWPD_1764(iamuser)'登录失败。 [英] Cannot open database "mydb" requested by the login. The login failed. Login failed for user 'WIN-JM04KI254SDM8\IWPD_1764(iamuser)'.

查看:86
本文介绍了无法打开数据库“mydb”登录请求。登录失败。用户'WIN-JM04KI254SDM8 \IWPD_1764(iamuser)'登录失败。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的网站中,我使用Windows身份验证模式访问我的SQL服务器数据库。当我使用visual studio 2012运行我的网站时,一切正常。但是当我在Plesk托管服务提供商上托管我的网站时,每次出现错误消息无法打开数据库mydb登录时请求。登录失败。登录失败用户'WIN-JM04KI254SDM8 \IWPD_1764(iamuser)'



请朋友帮助我。我在过去两天遇到这个问题。



我尝试过的事情:



In my website I am accessing my SQL-server database using "windows authentication mode". Everything works fine when I run my website using visual studio 2012. but when I hosted my website on Plesk hosting provider, every time an error message comes that "Cannot open database "mydb" requested by the login. The login failed. Login failed for user 'WIN-JM04KI254SDM8\IWPD_1764(iamuser)'"

Please, friends, help me. I am facing this problem from last two days.

What I have tried:

<connectionStrings>
    <add name="conn" connectionString="Data Source=.\sqlexpress;Initial Catalog=mydb;Integrated Security=True;Pooling=False" providerName="System.Data.SqlClient"/>
  </connectionStrings>

推荐答案

停止在生产中使用Windows身份验证模式 - 它通常不受支持。而是使用SQL用户名和密码组合,该组合对其需要在数据库上执行的任务具有权限(并且只有正确的权限)。您通常可以通过托管服务提供的管理控制台设置用户。
Stop using windows authentication mode in production - it's not often supported. Instead, use a SQL username and password combination that has permission (and only the right permissions) for the tasks it needs to perform on the database. You can normally set up the users via the management console provided by your hosting service.


这篇关于无法打开数据库“mydb”登录请求。登录失败。用户'WIN-JM04KI254SDM8 \IWPD_1764(iamuser)'登录失败。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆