I've got a SL app that won't deploy. It's working fine locally; if I change the db connection string to point to the Winhost SQL server it also works fine. It is when I deploy the app to the Winhost web server that the failures begin. First off, let me state that I've already tried going thru the various posts relating to deploying a Silverlight RIA app and haven't been sucessful at resolving the problem. The url in question is http://www.xprtsystems.com/xprt/index.html. The specific error is a service-not-found error ("The remote server returned an error: NotFound."). The specific failure (using Fiddler to sniff the connection) is that the virtually-created service in the xap file is returning a 404 error. The URL that is being requested is: http://www.xprtsystems.com/xprt/Cli...DomainService.svc/binary/GetBuildingBlockTags Note that this .svc file is not supposed to physically exist (it doesn't), but is supposed to be trapped by the DomainServiceModule and redirected (it isn't =(. I've tried the various other solutions I've seen regarding this issue -- authentication, url prefixes, etc to no avail. The web.config is below: <?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> <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" /> </system.web> <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> </configuration>
Are you sure you got all the required assemblies and files uploaded to your application. Have you checked the Bin folder? The error message... 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. ...is fairly straight forward about this. Plus what end points, bindings, and address your WCF is setup for. You posted your web.config file but I don't see any of these elements that are typical of WCF.
- I have verified that all of the DLLs required are present in the bin directory. - As far as the web.config goes, all I can say is that it's working fine locally. I know this doesn't help a lot in terms of diagnosing the server problem. Perhaps if there are some web.config examples you can point to in terms of what you think might be missing from mine it would be helpful? - At this point I'm operating on the premise that the dynamic redirect to the .svc file is the point of failure and is what is causing the 404, since this file is not supposed to actually exist. This would of course support your suspicion that the web.config file is missing a section, since that's where the redirector would be setup.
Try looking at these links. http://msdn.microsoft.com/en-us/library/ms733932.aspx http://blogs.msdn.com/b/brada/archi...e-is-a-wcf-service-add-service-reference.aspx The first link describe the WCF elements in the web.config file. The second link focuses on RIA and services specifically the DomainService.
Are you using the latest bits of RIA services or the April RC bits? I've noticed that I've had to include some of the binaries along with the publish to get it running. Also I've seen that other errors from the service seem to be causing the errors. http://code.msdn.microsoft.com/wcfbinaryinspector this was helpful to see what was happening even though it says it does not work with ria services I was able to inspect the traffic and see what was happening and what exactly the errors iis was sending me. Also remember to disable basic authentication.
I think the best way to solve this is to create a more simple application. One without the bells and whistles and simply calls a web service. Because the original web application is so complex it is really difficult, almost impossible to troubleshoot it. With a more simpler web application we can easily narrow down where it is failing.
Sure the format should look something like this. <connectionStrings> <remove name="LocalSqlServer" /> <add name="LocalSqlServer" connectionString="Data Source=DBServerName;Integrated Security=false;Initial Catalog=DBName;User ID=DBLogin;Password=DBPassword" providerName="System.Data.SqlClient" /> </connectionStrings> Another easy way of setting up your .net connection string is using the IIS 7 Manager. Once you are connected go to the Connection String module and you will have a GUI interface to define your connection string. http://forum.Winhost.com/showthread.php?t=7592