locked
Deploying WCF Data Services RRS feed

  • Question

  • I have created a WCF Service that just returns a string.  I created the end points, bindings, contract, behaviors and address. Also created the crossdomain file. Deployed the service to my hosting company. It works just fine.  Able to call from my silverlight application that is deployed to another domain.

    Now I want to move to WCF Data Services. 

    Since it is a WCF Service, I figured that the ABCs would still have to be created. From what I have been able to find (blogs, videos) none talk about the ABCs. None that I have found even talk about deploying to an hosting environment.  All examples are done on localhost.

    So does it even make sense to offer different end points when working with WCF Data Services?

    Do all WCF Data Services only offer REST style access?

    Any resources to show how to deploy a WCF Data Service to a hosting site?

    I want to do the same with WCF Data Services as I did the WCF Service, I want to deploy the WCF Data Service to one hosting site (Domain A.com) and deploy the silverlight application to another domain (B.Com).

    Any direction or suggestion would be much appreciated.

     

    Saturday, July 3, 2010 8:29 AM

Answers

All replies

  • http://msdn.microsoft.com/en-us/data/cc974474.aspx silverlight wcf data service  

    http://msdn.microsoft.com/en-us/library/aa751792.aspx

    http://channel9.msdn.com/shows/Endpoint/Endpoint-Screencasts-Hosting-WCF-Services-in-IIS/

    http://msdn.microsoft.com/en-us/library/bb332338.aspx

    http://dvanderboom.wordpress.com/2009/01/07/hosted-adonet-data-services-silverlight/

    http://forum.discountasp.net/showthread.php?t=7719

    all of these items should help In order to deploy your application you create a service host factory method   yes wcf data services works with wcf restful which is the most advanced. When you use any silverlight application or wcf data serice

    you have a net application that need to communicate with silverlight. silverlight itself is just a plug in

    Their are two two ways to deploy your application

    begin with a self hosting (console application) using asp.net web server

    and then use IIS

    or you can simply use iis

    however that model will be changing soon   http://forums.silverlight.net/forums/p/189803/437016.aspx#437016  iis express

    Sunday, July 4, 2010 10:14 PM
  • Deploying your application you should remember that you are using a wcf restful model which uses service host factory methods

    I give you a free guess what does wcf ria use to deploy- you got it servicehostfactory     

    Their are plenty of examples using this in  the forums   http://www.robbagby.com/rest/rest-in-wcf-part-xi-tunneling-put-through-post/

    The other piece of advice is that you should really study iis because their is alot of information to decipher in using iis

    Alot of people do not understand that in order to use iis you need to create a virtual Directory  -why is this? you need to build a client

    or cross domain policy in the webroot. YOU HAVE TO BUILT THIS IN THE VIRTUAL DIRECTORY  

    Virtual directory

         http://forums.silverlight.net/forums/t/479.aspx

    http://dotnetefectivecoding.blogspot.com/2009/08/publish-silverlight-3-on-iis-70-75.html

    their is alot more than this in publishing silverlight wcf data services, this will only give you an ideal of  a beginning point....

    Sunday, July 4, 2010 10:43 PM
  • Thanks for taking the time to reply. I'm missing something, I just don't know what it is. Your advice is spot on about IIS. Like I said in my first post, I'm able to get the "regular" WCF Service working properly in my hosting site. I had to deal with IIS, cross domain policy files and config files. I slowly worked my way through that. Now I have a WCF Service sitting on one domain and I'm able to deploy a SL4 application to another domain and that SL application can call my WCF Service and it works fine. I see you mention the service host factory. This may be where I'm missing the point. I will start looking into the service factory. Does this factory eliminate the need for WCF configuration. Where you need to create endpoints. I have searched many many times and I can not find anything about configuring the ABCs with WCF Data Services. Can find a lot of blogs videos on WCF Services that address deploying. I'm writing this before I have read any of the links that you have provided. As soon as I post, I will starting following up with the links you gave me. I have stayed away from RIA Services so far. I know that is where I will end up (too many features provided to ignore). But on the same hand, it just seems likes a big black magic box that too much stuff is being done for you. I'm talking about the Silverlight Business Application Template. Which is a good thing if you really understand WCF. I want to try and learn the basics and not just jump in with the Bus. App Template without understanding what is happening. How do you fix something when it breaks if you don't understand it? That is why I have taken the slow route of WCF then WCF Data Service and then I will address WCF RIA Services. Once again, thanks for taking to time to help.
    Tuesday, July 6, 2010 9:27 PM
  • Hi wma4432,

    ServiceHost provides another to configure a wcf service, one of the advantage of using ServiceHost is that you can alter the runtime behavior of a service. I would suggest you using reflector to analyze the source code of ria service to check how it uses DomainServiceHost and DomainServiceHostFactory to create endpoints, apply default behavior for ria service.

    Wednesday, July 7, 2010 1:31 AM
  • https://forums.silverlight.net/forums/p/189272/435599.aspx
    Wednesday, July 7, 2010 1:58 AM