views:

97

answers:

1

Hi all;

I have an SL 4 application (with OOB and elevated privileges) which makes a connection to a secure WCF service. But WCF service is never called, the application waits to connect and afterwards timeouts. I have checked with fiddler and wireshark and I saw no connection is made, application just waits! As you know if elevated privileges is not requested by the application crossdomain.xml etc. setup need be done, that's because I use OOB and elevated privileges. And If I make the SL app. not OOB, application connects and gets crossdomain.xml and gets security exception, which is expected.

To investigate the problem further, I just setup another machine with VS 2010, SL4 etc. I created a new SL4 project and a WCF service which is not secure. In OOB mode with elevated privileges the same problem occured again. Please note this machine was a clean XP(you might think that some libraries might be mixed up). Also I have checked the problem with an WPF application insted of SL and everything was normal, the connection could be made. Below is my sample solution, please try and send feedback.

My platform is described below:

  • Windows 7
  • Silverlight 4, OOB, Elevated Privileges
  • VS 2010
  • A WCF service.

Download the solution

A: 

Well, the problem is: accessing to a WCF service in App startup event is not possible. You need to call service in higher stages like in MainPage constructor or on Loaded event.

whoi