What DB required to make the Silverlight Business Application template work?

你。 提交于 2019-12-02 12:05:27

问题


I've been trying to run the Silverlight Business Application template but it fails when I try to register. I have SQL Express with an MSSQLSERVER instance and I've defined the standard aspnetdb created.

The error is:

Submit operation failed.  Unable to connect to SQL server database.

 at System.Web.DomainServices.ReflectionDomainServiceDescriptionProvider.ReflectionDomainOperationEntry.Invoke(DomainService domainService, Object[] parameters)
   at System.Web.DomainServices.DomainService.InvokeDomainOperationEntry(DomainOperationEntry domainOperationEntry, Object[] parameters, ChangeSetEntry operation)
   at System.Web.DomainServices.DomainService.InvokeCudOperations(ChangeSet changeSet)
   at System.Web.DomainServices.DomainService.ExecuteChangeSet(ChangeSet changeSet)
   at System.Web.DomainServices.DomainService.Submit(ChangeSet changeSet)
   at System.Web.Ria.Services.ChangeSetProcessor.Process(DomainService domainService, IEnumerable`1 changeSetEntries)
   at System.Web.Ria.Services.SubmitOperationBehavior.SubmitOperationInvoker.InvokeCore(Object instance, Object[] inputs, Object[]& outputs)

回答1:


You need the aspnetdb database created by running aspnet_regsql.exe against a SQL Server instance called SQLExpress - this can be found in the LocalSqlServer connection string in machine.config. Or by replacing the LocalSqlServer connection string with something that points to your SQL instance. Something like this:

<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" 
     connectionString="Data Source=YOURCOMPUTER;Initial Catalog=aspnetdb;Integrated Security=True" 
     providerName="System.Data.SqlClient"/>



回答2:


Don't mess with machine.config Go to Silverlight-TV-51-Debugging-and-Deploying-WCF-RIA-Services

then do this:

In IIS under Windows 7, Select the application pool and then "advanced settings." Under "process model" find "Load User Profile" and set it to true.

SQL should now load under the default app pool account.



来源:https://stackoverflow.com/questions/1965700/what-db-required-to-make-the-silverlight-business-application-template-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!