Skip to main content
Home Forums Silverlight Programming Accessing Web Services with Silverlight Accessing web service from website
5 replies. Latest Post by ippon11 on July 6, 2009.
(0)
kuekuatsheu
Member
6 points
10 Posts
07-03-2009 4:27 PM |
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
36 points
13 Posts
07-04-2009 12:36 AM |
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.
davidezo...
Contributor
5690 points
875 Posts
07-04-2009 10:40 AM |
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
07-06-2009 5:37 AM |
@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..
07-06-2009 7:55 AM |
try to verify if the service is working propertly by using an utility like WcfTestClient.exe
ippon11
24 points
7 Posts
07-06-2009 12:02 PM |
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