简体   繁体   English

部署的WCF Silverlight应用程序返回404错误

[英]Deployed WCF Silverlight application returns 404 Error

I have a Silverlight 5 Web Application that I host in IIS 8. I can run my application fine in VS 2013 but on Deploying to a Windows 2012 server running IIS 8, my app fails to run. 我有一个托管在IIS 8中的Silverlight 5 Web应用程序。我可以在VS 2013中很好地运行我的应用程序,但是在部署到运行IIS 8的Windows 2012服务器时,我的应用程序无法运行。 Fiddler gives me the following: Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Fiddler为我提供了以下内容:说明:HTTP404。您正在寻找的资源(或其依赖项之一)可能已被删除,名称更改或暂时不可用。 Please review the following URL and make sure that it is spelled correctly. 请查看以下网址,并确保其拼写正确。

My Web.config file is shown below: 我的Web.config文件如下所示:

 <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <sectionGroup name="system.serviceModel"> <section name="domainServices" type="System.ServiceModel.DomainServices.Hosting.DomainServicesSection, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" allowDefinition="MachineToApplication" requirePermission="false" /> </sectionGroup> </configSections> <appSettings> <add key="ApplicationName" value="......" /> </appSettings> <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> <httpRuntime targetFramework="4.5" maxRequestLength="10000000" executionTimeout="120" /> <compilation debug="true" targetFramework="4.5"> <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation> <roleManager enabled="true" /> <authentication mode="Forms"> <forms name=".ABCD_ASPXAUTH" timeout="20" /> </authentication> <profile> <properties> <add name="FriendlyName" /> </properties> </profile> <pages controlRenderingCompatibilityVersion="4.0" /> <customErrors mode="RemoteOnly" defaultRedirect="DefaultRedirectErrorPage.aspx"> <error statusCode="403" redirect="AccessDenied.htm" /> <error statusCode="404" redirect="Http404ErrorPage.aspx" /> </customErrors> </system.web> <system.web.extensions> <scripting> <webServices> <authenticationService enabled="true" requireSSL="false" /> <roleService enabled="true" /> </webServices> </scripting> </system.web.extensions> <system.webServer> <validation validateIntegratedModeConfiguration="false" /> <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=31BF3765AD364E35" /> </modules> </system.webServer> <system.serviceModel> <client /> <behaviors> <serviceBehaviors> <behavior name="AppServicesBehavior"> <serviceMetadata httpGetEnabled="true" /> </behavior> <behavior name="ReportServiceBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> <endpointBehaviors> <behavior name="WebBehavior"> <webHttp /> </behavior> </endpointBehaviors> </behaviors> <bindings> <basicHttpBinding> <binding name="userHttp"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <services> <service name="System.Web.ApplicationServices.AuthenticationService" behaviorConfiguration="AppServicesBehavior"> <endpoint contract="System.Web.ApplicationServices.AuthenticationService" binding="basicHttpBinding" bindingConfiguration="userHttp" bindingNamespace="http://asp.net/ApplicationServices/v200" /> </service> <service name="System.Web.ApplicationServices.RoleService" behaviorConfiguration="AppServicesBehavior"> <endpoint contract="System.Web.ApplicationServices.RoleService" binding="basicHttpBinding" bindingConfiguration="userHttp" bindingNamespace="http://asp.net/ApplicationServices/v200" /> </service> <service name="Telerik.Reporting.Service.ReportService" behaviorConfiguration="ReportServiceBehavior"> <endpoint address="" binding="basicHttpBinding" contract="Telerik.Reporting.Service.IReportService"> <identity> <dns value="localhost" /> </identity> </endpoint> <endpoint address="resources" binding="webHttpBinding" behaviorConfiguration="WebBehavior" contract="Telerik.Reporting.Service.IResourceService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> </system.serviceModel> <connectionStrings> '''''''''''''''' </connectionStrings> <system.diagnostics> <sources> <source name="System.ServiceModel" switchValue="Critical, Error, Warning" propagateActivity="true"> <listeners> <add name="traceListener" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\\Projects\\Log\\Traces.svclog" /> </listeners> </source> </sources> </system.diagnostics> </configuration> 

Can someone tell me why a previously configured Win 2012 server does not now load the deployed application when I can still run from VS 2013? 有人可以告诉我为什么仍然可以从VS 2013运行时,以前配置的Win 2012服务器为什么现在不加载已部署的应用程序吗? Or is there a way to get Fiddler to give a more detailed error? 还是有办法让Fiddler给出更详细的错误?

I set Tracing on, but the log does not give any better clues. 我将“跟踪”设置为“开”,但是日志没有提供任何更好的线索。

Thanks. 谢谢。

Chances are you have RIA Services installed on your development machine but it is not installed on the server. 您可能在开发计算机上安装了RIA Services,但未在服务器上安装它。

You have two choices: 您有两种选择:

  1. Remember to install RIA Services on each server you deploy to 切记在要部署到的每台服务器上安装RIA Services

  2. Add the RIAServices.Server NuGet package to your *.Web project. RIAServices.Server NuGet包添加到* .Web项目。 This will add private local copies of the RIAServices dll to your solution. 这会将RIAServices dll的私有本地副本添加到您的解决方案中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM