none
Help on creating a proxy service RRS feed

  • Question

  • I have WCF service hosted on application server and a Silverlight application that is hosted on a WebServer. Silverlight application needs to call this WCF service to perform some operations. But the WCF Service is behind the firewall and Silverlight application runs inside the browser, meaning it is on public network. So Silverlight application cannot access WCF service directly.

    So I’m planning host proxy WCF service on WebServer that will just forward the call to main WCF service which is running on application server. So the new proxy services needs to have same ServiceOperations, DataContracts.

    1>     1> Is there any way to handle this situation without creating  new proxy service?

    2>     2> If not, then is there way to use same service contracts and data contracts without creating them again in proxy service?

    Friday, February 22, 2013 2:40 AM

All replies

  • Hi,

    If you are trying to access the WCF service in a cross domain environment by Silverlight client, you need to configure a in cross-domain policy explicitly which is called clientaccesspolicy.xml or crossdomain.xml. To make the service accessible from another domain, you just need to deploy the clientaccesspolicy.xml at the root folder where the WCF service is published(the cross-domain policy should be accessible by http://domainofAppServer/clientaccesspolicy.xml). Please take a look at the BackGround part of this blog.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 27, 2013 1:50 AM
    Moderator
  • If your endpoint is listening at some port say 8025 then just ask your network admin to open this port for outside communication and you can even make a call to the existing WCF service behind the firewall.


    ViBi

    Friday, March 1, 2013 11:57 AM
  • its not the issue with clientaccesspolicy.xml, we have that already and also we cannot open the port on application server for public. That is not recommended. 

    And since we cannot open the port on application server, i was planning to host a proxy service on web server and the proxy service will call the main service that is hosted behind the firewall.

    And silverlight application will now call the proxy service instead of main service. The proxy service will act as Gateway and will just forward the call to main service.

    Monday, March 4, 2013 4:31 AM
  • Hi,

    Thanks for your feedback.

    So the issue is resolved now?

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, March 6, 2013 6:03 AM
    Moderator
  • The solution i mentioned above will solve our problem for sure. But i was looking for any other solution without having to create one more proxy service.
    Monday, March 11, 2013 6:51 PM