我有一个网站在今天早上之前运行良好。现在我得到一个
'对象'',数据库'',模式'dbo'的SELECT权限被拒绝。
错误。问题是,该方法是一些 DBML 代码的一部分,我什至找不到连接字符串。
[global::System.Data.Linq.Mapping.FunctionAttribute(Name="RAW.GetCustomers")]
public ISingleResult<GetCustomersResult> GetCustomers()
{
IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
return ((ISingleResult<GetCustomersResult>)(result.ReturnValue));
}
这是导致错误的生成的函数调用。我不得不假设数据库中有一些权限更改,或者登录不再有效,但是我在这段代码中找不到任何连接信息。web.config 中也没有任何内容。我在哪里可以找到所有这些的连接信息?我所拥有的只是一个包含被调用函数列表的图表。它是导致错误的 GetCustomers() 函数(见上文)。
这是web.Config。它显示了 RawParts 连接字符串,但不是导致问题的数据库连接字符串(动态是它的名称)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<connectionStrings>
<add name="MiscReportTablesConnectionString" connectionString="Data Source=pmfcgrb12;Initial Catalog=MiscReportTables;Persist Security Info=True;User ID=USERNAME;Password=PASSWORD"
providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
<customErrors mode="Off"/>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<defaultDocument>
<files>
<clear/>
<add value="default.aspx"/>
</files>
</defaultDocument>
</system.webServer>
</configuration>