[英]Deployed Silverlight app doesn't work with database after move from local PC to remote server
昨天我完成了我的第一個Silverlight應用程序。 該應用程序通過實體模型和域服務類與數據庫(另一個遠程服務器上的SQL服務器)進行通信。 在PC上測試時,一切正常。 因此,我先將該項目部署到本地,然后再將其移動到遠程服務器。
問題是在移至服務器后,WCF RIA無法與服務器通信(回調會引發未找到服務器的錯誤-僅此而已)。
我如何找出錯誤的出處; 我有點絕望,因為我從未使用過IIS。 我嘗試了Web Deploy選項,但是它無法連接到遠程服務器。 在我的本地PC上,我具有IIS 8 Express,在需要移動的遠程服務器上,該網站是IIS 7(MS Server 2008)。
我的Web.Config文件
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="DomainServiceModule" preCondition="managedHandler" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
<system.web>
<httpModules>
<add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>
<httpRuntime/>
</system.web>
<connectionStrings>
<add name="ISPRSWebFormTestEntities" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=System.Data.SqlClient;provider connection string="data source=sql.fce.cz\\MSSQL2012,1433;initial catalog=testDB;user id=reviewer;password=xxxxxxxxxx;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient"/>
</connectionStrings>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
</configuration>
請提供更多錯誤信息以進行診斷。 此外,您必須仔細檢查以下設置。 1. ConnectionString。 請確認連接字符串正確並且能夠連接到遠程服務器。 2. Web服務。 請嘗試訪問IE中的svc文件,確認Web服務運行良好。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.