Skip to main content

Microsoft Silverlight

Answered Question web service is not called when using httpsRSS Feed

(0)

mr.saif
mr.saif

Member

Member

417 points

147 Posts

web service is not called when using https

Hi All,

  web service does not called by silverlight when web service is https.

I am loading service dynmaically when i run service with https it works fine in browser, but in siverlight application service does not called.Sad

M.C.BC.PCSer.PCSSoapClient service

service = new M.C.BC.PCSer.PCSSoapClient(new System.ServiceModel.BasicHttpBinding(), new System.ServiceModel.EndpointAddress(serviceUrl));

previously it was working fine with http. i have also updated my clientaccesspolicy file to incorporate with https.any help?

 

Regards,
Muhammad Saifullah

preishuber
preishuber

Contributor

Contributor

3570 points

655 Posts

Re: web service is not called when using https

is the certificate on webserver 100% ok, Means: cert authoriy, name, and date valid? Or do you get a warning in brwoser when accesing this site?

-Hannes

http://www.preishuber.net http://weblogs.asp.net/hpreishuber

mr.saif
mr.saif

Member

Member

417 points

147 Posts

Re: web service is not called when using https

yes i got following waring when accessing service in broswer

There is a problem with this website's security certificate.

 
The security certificate presented by this website was not issued by a trusted certificate authority.The security certificate presented by this website was issued for a different website's address.
Security certificate problems may indicate an attempt to fool you or intercept any data you send to the server.

 

Regards,
Muhammad Saifullah

preishuber
preishuber

Contributor

Contributor

3570 points

655 Posts

Re: web service is not called when using https

then you have to fake the  cert validation with something like that

 

ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(certValidation); }private static bool certValidation(object sender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error){return true;}

 

-Hannes

http://www.preishuber.net http://weblogs.asp.net/hpreishuber

mr.saif
mr.saif

Member

Member

417 points

147 Posts

Re: web service is not called when using https

Hi Hanne, 

your code works fine to fake ssl certificate in simple .net application. But we can not fake or authenticate certificate in silverlight as System.Net.Security is not available right now in silverlight 2.0.

Is there any other way that i can fake SSL authentication certificate?

Regards,
Muhammad Saifullah

preishuber
preishuber

Contributor

Contributor

3570 points

655 Posts

Answered Question

Re: web service is not called when using https

i am still have this topic in mind

its true that Silverlight 2 have not implemented RemoteCertificateValidation.

i see two options

1) bridge the call to server. Call a net service on server and this service goes to https

2) bridge the call to html and do it by AJAX.

 

-Hannes

http://www.preishuber.net http://weblogs.asp.net/hpreishuber

sethu_na
sethu_na

Member

Member

2 points

1 Posts

Re: web service is not called when using https

Is there any wasy I can do

1) Basic Authentication

2) Basic Authentication on HTTPS

from Silverlight? We do not have System.Net.ServicePointManager in Silverlight.

Any pointers? I am using Silverlight 3.

Response in this is highly appreciated.

Thanks,

S.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities