Skip to main content
Home Forums Silverlight Programming Visual Studio & Silverlight Development Tools Debug WebService
8 replies. Latest Post by kostkac on November 4, 2009.
(0)
NickyM
Member
10 points
8 Posts
05-15-2007 5:55 AM |
When i start debug Silverlight project with reference on web service, visual studio return message:
This Silverlight project you are about to debug is consuming web services. Calls to the web service will fail unless the project is executed in the context of the web which contains the web service.
What this mean?
Second questionHow i debug web service in my silverlight project?
05-15-2007 8:07 AM |
I call webservice. The row in autogenerate reference fileobject[] results = this.Invoke("...", new System.Windows.Browser.Net.SoapHttpClientProtocol.ServiceParameter[0], typeof(string));return errorCross domain calls are not supported by BrowserHttpWebRequest.What this mean? What i was doing wrong?
samsp
282 points
96 Posts
05-15-2007 7:56 PM |
welcome to the wonderful world of browser security models. The alpha of silverlight will only allow requests to web services that have the same base url as the page that delivered the application. This is becuase its using the browser http stack to make the calls, which includes any cookies or trust based on your identity. This is to stop the app from making unexpected web service calls to services such as your stock broker, or internal sites that you didn't expect or know about.
So the error is saying you need to host the silverlight app on the same base url (dns name I think) as the web service.
05-16-2007 2:20 AM |
I have this error when i run application in Visual Studio on localhost.
Bye
Nicky
05-17-2007 1:31 PM |
Make sure that the silverlight app is loaded into the browser from http://localhost rather than as a filepath.
klausur
2 points
1 Posts
06-07-2007 1:38 AM |
samsp:Make sure that the silverlight app is loaded into the browser from http://localhost rather than as a filepath.
So how can I do this? My VS always starts the Silverlight Project directly from the filepath and I don't know how to switch this to http://localhost.
andy.wang
104 points
58 Posts
06-12-2007 3:19 PM |
You can create a webapplication and then add silverlight project as its link.
add webservice in silverlight project,..
aaakshay
5 points
2 Posts
03-07-2008 6:27 PM |
Web application project does not allow to add Silver light project reference.
kostkac
4 points
11-04-2009 11:03 PM |
I tried to debug from local filesystem - default setting for silverlight project - id browser addres bar is path from hdd.
After this failed, because a crossdomain policy not set i have tried to add silverlight xap file to default.aspx in WebSite project. Webservice is called fine here, but i cant debuging silverlight.
Have you got any idea? Thanks!