我是开发Silverlight应用程序的新手,在部署应用程序后我遇到了数据库连接问题(我可以正常访问应用程序,但由于数据库问题我无法登录)。
以下是我的错误消息
Unhandled Error in Silverlight Application Load operation failed for query 'Login'. The remote server returned an error: NotFound. at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.End(IAsyncResult result) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.c__DisplayClass1.b__0(Object state) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.RunInSynchronizationContext(SendOrPostCallback callback, Object state) at System.ServiceModel.DomainServices.Client.ApplicationServices.AuthenticationOperation.HandleAsyncCompleted(IAsyncResult asyncResult) at System.ServiceModel.DomainServices.Client.AsyncResultBase.Complete() at System.ServiceModel.DomainServices.Client.ApplicationServices.WebAuthenticationService.HandleOperationComplete(OperationBase operation) at System.ServiceModel.DomainServices.Client.LoadOperation.c__DisplayClass4`1.b__0(LoadOperation`1 arg) at System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction() at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error) at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error) at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult) at System.ServiceModel.DomainServices.Client.DomainContext.c__DisplayClass1b.b__17(Object )
这是我的连接字符串
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="server=.;data source=PC15\SQLEXPRESS;Initial Catalog=LodeSuiteDB;Integrated Security=True;" />
<add name="LodeSuiteDB1Entities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=PC15\SQLEXPRESS;initial catalog=LodeSuiteDB;integrated security=True;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
</connectionStrings>
有没有人有同样的问题?我正在使用Visual Studio 2010 Ultimate Edition和SQL Server 2008进行开发(均在Windows 7上运行),而我的IIS服务器(IIS 5.1)在Windows XP Professional上运行
我一直试图解决这个问题几天无济于事。非常感谢您的帮助!
答案 0 :(得分:0)
问题是ASPNET_WP进程(在IIS5.1上托管ASP.NET代码)将以ComputerName / ASPNET帐户的身份运行。
由于您在连接字符串中使用集成安全性,因此需要授予帐户访问正在访问的SQL数据库的权限。
或者,您需要在web.config中启用模拟,并指定有权访问数据库的帐户的用户名和密码。
答案 1 :(得分:0)