Silverlight 4 HttpWebRequest user agent string is null
Posted
by Dan B
on Stack Overflow
See other posts from Stack Overflow
or by Dan B
Published on 2010-05-25T19:59:36Z
Indexed on
2010/05/25
20:01 UTC
Read the original article
Hit count: 748
The problem
I have a page with a silverlight object. It attempts to retrieve XML from the page. But I am struggling with a security exception.
I have this code working brilliantly in WPF.
When using a website hosting a silverlight application with the same code, the user agent string of the HttpRequest object is null (and seemingly cannot be set). In fact there is no header information at all - this causes a security exception when attempting to make my asynchronous call.
The question
Why is the user-agent string (and header information) null in my silverlight 4 application when making an asynchronous call using HttpWebRequest?
Thanks in advance!
© Stack Overflow or respective owner