This is exactly what it is. This class can be only used is hosted by some UI class. I don't know, Forms, WPF — you did not specify what
WebBrowser
class you tried to use — please see my question. However, it does not matter, because…
Using any UI controls in a Web Service is absolutely pointless. Even if it was possible, who would see the UI?! :-)
Even if your Web Service really needs to act as a Web client, which is fine, you can use
System.Net.HttpWebRequest
, see:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[
^] (see the code sample here).
—SA