IIS Silverlight does not connect to WCF

I am at a loss and hope that someone here can help me. I created a WCF service that runs on a remote computer. The service is self-contained, but provides clientaccesspolicy.xml through the webget command.

I also have a silverlight application that requests a WCF server. I access the service through a link to the service. When I execute silverlight code in VS2008, it connects perfectly to the server. When I host a site on a local IIS server (even 5.1), it works fine.

However, when I transfer my site to our official IIS server, the client dies when it tries to connect to the server. Initially, this did not work at all, then we added MIME types. Although, at present, I think the MIME type for .xap is still set to application / octet-stream. (I don’t know if this really matters, since the site is loading now.)

I checked the packets coming in and out of the browser and it seems that the client crashes every time I try to establish a connection to the server (I believe this happens when it creates the connection code before even sending the packet.) I know that the IIS server can see the WCF service, since I tested the extraction of data from the service using ASP.NET.

Other than installing the SDK on this IIS, I can't think of anything else to try. Does anyone have any idea?

thanks

+3
source share
2 answers

Your problem is probably related to the location of ClientAccessPolicy.xml. Where does this relate to the domain? It should be in the root of the domain server ( http://domain.com/clientpolicyfile.xml or http://www.domain.com/clientpolicyfile.xml ).

+3
source

I can’t say that I answered my own question, but in the end I transferred the WCF service to IIS and all of a sudden the connection worked fine.

0
source

Source: https://habr.com/ru/post/1705777/


All Articles