【问题标题】:sql server error online for bigrock hostingbigrock 托管的 sql server 在线错误
【发布时间】:2015-06-20 01:50:51
【问题描述】:

在 asp.net 应用程序的 bigrock 主机上显示错误

用户“”登录失败

在登录链接上,输入正确的凭据后出现登录页面,它给了我错误

“用户 'shreesa.mdf' 登录失败”

Bigrock 技术支持团队未能解决此问题。请帮忙解决这个问题。

据我所知,我的 web.config 文件中存在一些问题。

我也在这里添加代码..

<configuration>
    <system.web>
        <customErrors mode="Off"/>
        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
    </system.web>

    <connectionStrings>
        <add name="Conn" connectionString="Data Source=localhost;Initial Catalog=shreesa.mdf;Integrated Security=False; User Id=saachlrw; Password=******;" providerName="System.Data.SqlClient" />
    </connectionStrings>
</configuration>

【问题讨论】:

  • Connectionstring 中的数据源是“localhost”。请检查。
  • 我已将其更改为服务器 ip 地址,但给出同样的错误

标签: asp.net sql-server web-services web


【解决方案1】:

以这种方式修改您的 Connectionstring

之前

connectionString="Data Source=localhost;Initial Catalog=shreesa.mdf;Integrated Security=False; User Id=saachlrw; Password=******;"

之后

connectionString="Server=localhost;AttachDbFilename=|DataDirectory|shreesa.mdf;Database=yourdbname;Integrated Security=False; User Id=saachlrw; Password=******;"

SQL Server connection strings

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-02-04
    • 1970-01-01
    • 2021-10-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多