开发者

How should I Host my WCF RIA DataDomainService On IIS for a mobile and silverlight front end?

开发者 https://www.devze.com 2023-03-14 15:38 出处:网络
I have created a RIA DataDomainService which I exposed to my silverlight project. The WCF RIA service is part of the ASP.NET web application. We\'ve done a lot of work on the implementation of the Dat

I have created a RIA DataDomainService which I exposed to my silverlight project. The WCF RIA service is part of the ASP.NET web application. We've done a lot of work on the implementation of the DataDomainService.

Silverlight project can retrieve the serialized data that the website returns. So everything works correctly.

Now, the client wants to use mobile phone front end. We want to call the same RIA DataDomainService from the mobile phone and for that we need to host the RIA service to a webserver or windows service etc.

I am unable to understand how to host a RIA DataDomainService on IIS? Can you please guide if it is possible? Shall I take the RIA se开发者_Python百科rvice out and put it in a WCF project and reference it into my asp.net project?

Please guide

Regards


If you move your code into a RIA services library project, it will create a web-service library project and a client library project, both tied together by the magic of RIA services. The web library can be used by your website by simply linking to it and the matching client library gets linked to your Silverlight Application.

The above is generally a neater way to organise your RIA services, but not really part of this problem.

As for using the RIA services from WCF... RIA services are WCF services (just with more plumbing on top of the calls). That being said you probably do just want to expose a simpler API using a standard WCF service (sharing code/data from your RIA service) as you do not have any RIA services client code for your target platform (presumably, unless it is for WP7).

I would suggest a separate library for your EF models and use them in both your RIA services project and a separate WCF service project. They will not be that similar due to the lack of a RIA client for your target platform.

Hosting the WCF in your website is then just simply linking it in, just like the RIA services.

0

精彩评论

暂无评论...
验证码 换一张
取 消