Skip to main content
Home Forums Silverlight Programming Accessing Web Services with Silverlight WCF Service and https problem in silverlight
4 replies. Latest Post by varshavmane on November 4, 2009.
(0)
Navnee
Member
3 points
10 Posts
10-29-2009 1:45 AM |
Hi,
I am facing problems in consuming secure WCF service in Silverlight application, the WCF Service is running fine on http:// however if i try to consume it using https:// URI then it throws error.
<client /> <bindings> <basicHttpBinding> <binding name="basicHttpBinding"> </binding> <binding name="basicHttpsBinding"> <security mode="Transport"> <transport clientCredentialType ="None"/> </security> </binding> </basicHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="SessionServiceBehavior"> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> <behavior name="ServiceBehavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> <behavior name="AnnualizedRateOfReturnBehavior"> <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </behaviors> <services> <service behaviorConfiguration="SessionServiceBehavior" name="SessionService"> <endpoint address="" binding="basicHttpBinding" contract="SessionService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> <service behaviorConfiguration="AnnualizedRateOfReturnBehavior" name="AnnualizedRateOfReturn"> <endpoint address="" binding="basicHttpBinding" contract="AnnualizedRateOfReturn" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services>
here is the C# code
var WebService = new ServiceRef.SessionServiceClient("BasicHttpBinding_SessionService", Address.AbsoluteUri); WebService.ReturnSessionClassCompleted += new EventHandler(WebService_ReturnSessionClassCompleted);
However the if i run WCF service from Directly in browser. Both with http:// and https:// are running fine. means problem is in just consuming WCF service in Silverlight
Thanks in Advance
Navneel Bhanot
varshavmane
Contributor
6719 points
1,578 Posts
10-29-2009 2:24 AM |
Check this Video:
http://silverlight.net/learn/learnvideo.aspx?video=66686
HTH
10-29-2009 2:34 AM |
Even this post
http://forums.silverlight.net/forums/p/36713/111182.aspx
will help you.
11-04-2009 2:56 AM |
Thanks... You have solved my problem... thanks a lot :)
11-04-2009 4:17 AM |
My Pleasure