0
votes

I have a silverlight application and the application connects with wcf (SSL/https) to a public service hosted on iis. Everything works fine if I start the application in Browser. As soon as I start the application in "Out of Browser Mode" it doesn't work anymore. I tried to figure out the Problem with fiddler but as long as fiddler is running, everything works fine. I found many posts in Internet about this but nothing worked. Are there any idea? What does fiddler do exactly and making it running in oob?

Summary: 1. Everything ok "In Browser" 2. No Connection to public Service when running "Out of Browser" 3. It's runinng "Out of Browser" as long Fiddler is running

Below are some info how I do the connects.

Thank you very very much for a help.

Best regards. Marc

Here are some info how I do everything:

Is it possible that the self signed certificate has something to do with all?

The connect on Client side to the public service looks like this:

 PublicServiceClient proxy;
    BinaryMessageEncodingBindingElement binaryMessageEncodingBindingElement = new     BinaryMessageEncodingBindingElement();
    HttpsTransportBindingElement httpsTransportBindingElement = new HttpsTransportBindingElement();
    httpsTransportBindingElement.MaxBufferSize = int.MaxValue;
    httpsTransportBindingElement.MaxReceivedMessageSize = int.MaxValue;
    httpsTransportBindingElement.TransferMode = TransferMode.Buffered;
    Binding binding = new CustomBinding(binaryMessageEncodingBindingElement,     httpsTransportBindingElement);
    binding.SendTimeout = new TimeSpan(0, 0, _WcfTimeout);
    binding.ReceiveTimeout = new TimeSpan(0, 0, _WcfTimeout);
    binding.OpenTimeout = new TimeSpan(0, 0, _WcfTimeout);
    binding.CloseTimeout = new TimeSpan(0, 0, _WcfTimeout);
    proxy = new PublicServiceClient(binding, new EndpointAddress("https://" +     App.CurrentParameter.WcfDomain + "/PublicService.svc"));

Binding Server side (web.config):

   <binding name="Web.PublicService.customBinding0" sendTimeout="00:01:00" receiveTimeout="00:01:00" openTimeout="00:01:00" closeTimeout="00:01:00">
    <binaryMessageEncoding maxReadPoolSize="2147483647" maxWritePoolSize="2147483647">
    <readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxDepth="2147483647" maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/>
    </binaryMessageEncoding>
    <httpsTransport maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" keepAliveEnabled="false"/>
    </binding>

Service Server side (web.config):

  <service name="Web.PublicService">
    <endpoint address="" binding="customBinding"    bindingConfiguration="Web.PublicService.customBinding0" contract="Web.PublicService"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
1
What's the behavior when running OOB without fiddler, but the connection isn't SSL? Can you test such a scenario?Boluc Papuccuoglu
The connection is always SSL. If it's running in OOB the following error occurs: Während des Vorgangs ist eine Ausnahme aufgetreten, sodass das Ergebnis ungültig ist. Weitere Ausnahmedetails finden Sie in InnerException. | 0 | 0 | Void RaiseExceptionIfNecessary() at Void RaiseExceptionIfNecessary() line 0 column 0 at SL.PublicServiceReference.CustomerData get_Result() line 0 column 0 at Void OnGetCustomerDataCompleted(System.Object, SL.PublicServiceReference.GetCustomerDataCompletedEventArgs) line 0 column 0 at Void OnGetCustomerDataCompleted(System.Object) line 0 column 0Marc
Well, and what says the inner exception? ;) Did you already activate tracing to get more details about the error?khlr
I tried the tracing but in OOB there is nothing logged. I suppose that the call from OOB never get to the Server, so nothing will be logged. The innerexception looks like: InnerException {System.ServiceModel.CommunicationException: Der Remoteserver hat einen Fehler zurückgegeben: NotFound. System.Net.WebException: ...: NotFound. System.Net.WebException: ...: NotFound. bei System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) bei System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState) bei System.Net.Browser.Asy...Marc

1 Answers

0
votes

If you disable HTTPS Decryption in Fiddler (and restart it) and the app stops working through Fiddler, that means that the self-signed certificate in use on the server is the problem, and you need to fix it by trusting that certificate.

If disabling HTTPS decryption in Fiddler doesn't make a difference, the problem is likely related to the security zone settings. See http://blogs.msdn.com/b/fiddler/archive/2010/11/22/fiddler-and-silverlight-cross-zone-cross-domain-requests.aspx for details on why that might be.