When deploying my Silverlight 4 application which works on the dev machine, I get the following error when accessing the entity server:
"There is no endpoint listening on http://localhost:9009/EntityService.svc - http://sbs2008/EntityService.svc that could accept calls from this application. If running in Visual Studio, make sure CopyLocal=true is set for all IdeaBlade assembly references in the web project to ensure that these assemblies are copied to the bin folder. To check if the service is running, open your internet browser and navigate to 'http://sbs2008/EntityService.svc'. If the service page shows errors, these should help diagnose the problem with the service. If the service is running, then also make sure that the endpoint bindings match between client and server, and that the server's ClientApplicationType is either 'Silverlight' or 'Both'. Check the server's debug log file for more information." error message.
If I browse to http://sbs2008/EntityService.svc, then it works fine.
However, if I have the following code before I load the main page of the app: WebRequest.RegisterPrefix("http://", System.Net.Browser.WebRequestCreator.ClientHttp); Then the application works fine on the production server. I have heard somewhere that I should use the browser stack for production, but this appears to fix the problem. Could someone explain why this corrects the problem (or maybe I should just be happy and accept this solution)
I have no app.configs in the xaps and the web.config is as follows: <?xml version="1.0"?> <configuration> <configSections> <section name="ideablade.configuration" type="IdeaBlade.Core.Configuration.IdeaBladeSection, IdeaBlade.Core" /> </configSections> <ideablade.configuration version="6.00" xmlns="http://schemas.ideablade.com/2010/IdeaBladeConfig"> <logging logFile="log\DebugLog.xml" /> <objectServer> <serverSettings supportedClientApplicationType="Silverlight" /> </objectServer> <notificationService enabled="true" /> </ideablade.configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> <httpHandlers> <add verb="*" path="UXFileUploadHandler.ashx" type="Intersoft.UXFileUpload.Server.UXFileUploadHandler, Intersoft.UXFileUpload.Server" /> </httpHandlers> </system.web> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="false" /> <behaviors> <serviceBehaviors> <behavior name="EntityServiceBehaviour"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> </behaviors> <services> <service name="EntityService" behaviorConfiguration="EntityServiceBehaviour"> <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" /> </service> </services> </system.serviceModel> <connectionStrings>removed</configuration>
I have removed the logging entry and set the includeExceptionDetailsInFaults="false" but this still shows the error on the production machine when I leave it set to the Browser stack.
Thanks Chris
|