Skip to main content

Microsoft Silverlight

Unanswered Question Accessing web service from websiteRSS Feed

(0)

kuekuatsheu
kuekuatsheu

Member

Member

6 points

10 Posts

Accessing web service from website

 I'm having this problem with hosting aspx pages with SL apps, i made a webservice to send an email and when i developed on my local machine, the client was set to the mailservice.asmx on my localhost, now i have hosted my website on x10hosting.com and i want to configure my service reference in my silverlight app to have the client at my website (the one at x10hosting), but when i open up the project in visual studio.. ie when i open up the web site thru the remote site/ftp option, and add the sl app for email, i do a discover service references.. and i get two services, but sadly cant access them, some error keeps popping up... plz help!!

codenenterp
codenenterp

Member

Member

36 points

13 Posts

Re: Accessing web service from website

Most likely you need to add a clientaccesspolicy.xml file at the root of your site.  This should allow you to access the service.  I think in this instance you maybe cross domain from local to server.

Solutions Architect
Coden Enterprises
http://www.codenenterprises.com/iblog

davidezordan
davidezo...

Contributor

Contributor

5614 points

863 Posts

Silverlight MVP

Re: Accessing web service from website

Hi,

follow the steps described in this article: http://blogs.msdn.com/silverlightws/archive/2008/04/16/debugging-web-service-usage-in-silverlight-2.aspx

Thanks, Davide

Silverlight MVP

Blog Twitter Silverlight Experts

kuekuatsheu
kuekuatsheu

Member

Member

6 points

10 Posts

Re: Re: Accessing web service from website

 @codenenterp: I have already added the crossdomainpolicy file to the root of the website.. that has been taken care off... but the only problem is when i add a SL project to the website, and on discovering the services, i cant add a service reference for the service i have built..

davidezordan
davidezo...

Contributor

Contributor

5614 points

863 Posts

Silverlight MVP

Re: Re: Re: Accessing web service from website

Hi,

try to verify if the service is working propertly by using an utility like WcfTestClient.exe

Thanks, Davide

Silverlight MVP

Blog Twitter Silverlight Experts

ippon11
ippon11

Member

Member

24 points

7 Posts

Re: Re: Re: Accessing web service from website

Davide is right, also check that the service is not erroring due to your host not having outbound smtp access on default port 25 or gmail port 587

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities