• WCF Library, Silverlight 4, ASP host combo problems.
    0 replies, posted
This is a web app so I guess it should probably go here. Anyway, I have a project I am doing for school, and I have a specific directory structure in my VS2010 (oh god, bugs everywhere - but required of the class) solution. The part I am getting hung up now is the WCF Service library project and the way I get it to talk to the ASP.NET project. I would normally just add a WCF service directly to the ASP project, but the client doesn't want that. (It is odd, but I have no say in the matter) I have tried adding a reference to the project in my ASP project then added: [code] <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <bindings> <customBinding> <binding name="DMiner.Domain.WCF.Service1.customBinding0"> <binaryMessageEncoding /> <httpTransport /> </binding> </customBinding> </bindings> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" /> <services> <service name="DMiner.Domain.WCF.Service1"> <endpoint address="" binding="customBinding" bindingConfiguration="DMiner.Domain.WCF.Service1.customBinding0" contract="DMiner.Domain.WCF.IService1" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel> [/code] to the web.config I just made the default WCF service library project and edited the app.config in that project: [code] ... <endpoint address ="" binding="basicHttpBinding" contract="DMiner.Domain.WCF.IService1"> <!-- Upon deployment, the following identity element should be removed or replaced to reflect the identity under which the deployed service runs. If removed, WCF will infer an appropriate identity automatically. --> <identity> <dns value="localhost"/> </identity> </endpoint> ... [/code] (Note: I changed the binding to basicHttp since Silverlight can't consume wsHttp yet). So this is probably a really stupid question (We started this project about 5 days ago, previous to this I have had no experience with web development, silverlight, ASP .NET, nor VS2010). To reword it: I need a ASP.NET project host WCF service library project so the silverlight app doesn't have cross domain issues. (They are hosted as two parts with two projects, but one part if I just add the WCF to the ASP.NET) If you need to know more let me know, I'll be camping the topic. (We only have 4'ish weeks to get our project done and it is big - we are still doing requirements gathering and test-spikes)
Sorry, you need to Log In to post a reply to this thread.