Reputation: 8314
I have a Silverlight 2 application that I'm trying to get to invoke an HttpHandler by using WebClient. I have the HttpHandler just sending an email that says test when invoked. If I hit it via a browser, I get the email. However, using a WebClient object with a delegate, I can't seem to get it to connect.
I've started to think about using a Cross Domain Policy for connecting. However, the HttpHandler is within an SSL web app. When the control is deployed, it will be within the same SSL web app (by using the asp.net silverlight control).
Will this work? If not, what can I do to make it work?
Upvotes: 2
Views: 1450
Reputation: 6385
If you are trying to determine whether it is an issue with your web service, please try hitting just a regular .txt or any kind of file that will be served alongside your .Xap, to see if it's an issue with your WebClient code.
More than likely you are doing something that won't work, such as:
file:///
instead of http://
. You can't request cross-scheme.I wouldn't recommend trying to validate with Windows Forms, since it is able to request any web page at all, without these security restrictions in place.
Upvotes: 2