开发者

Database Connection Problem when deploying Silverlight 4 application on IIS 5.1

I'm new to developing Silverlight application and I got an issue with the database connection after deploying the application (I can access the application just fine, but I can't login due to the database problem).

Below is my error message

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.WebAuthent开发者_如何学PythonicationService.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 )

and this is my connection string

<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=&quot;data source=PC15\SQLEXPRESS;initial catalog=LodeSuiteDB;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>

Does anyone have the same problem? I'm using Visual Studio 2010 Ultimate Edition and SQL Server 2008 for my development (both running on Windows 7) whereas my IIS server (IIS 5.1) is running on Windows XP Professional

I've been trying to solve this problem for days with no avail. Your help is greatly appreciated!


The problem will be that the ASPNET_WP process (which hosts the ASP.NET code on IIS5.1) will run under the identity of the ComputerName/ASPNET account.

Since you are using Integrated Security in you connection strings that account will need to have been granted access to the SQL databases being accessed.

Alternatively, you need to enable impersonation in the web.config and specify the username and password of an account that does have access to the databases.


I don't think this is a database connection issue. The issue here looks more like the Silverlight application can't talk to the application server over WCF RIA Services. Take a look at some of the RIA service calls using Fiddler and see if any of them are showing errors.

This link has more help about how to fix an RIA Services NotFound error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜