Could someone please tell me how to connect a WPF Browser Application to a web service. I am trying to do this in .NET 3.0. In a .Net 2.0 Web Site I would connect to a web service by using the following C# code:
WebReference.ViewWebServic
eInfo wsInfo;
WebReference.ViewWebServic
e wsView = new WebReference.ViewWebServic
e();
wsInfo = wsView .ViewAll();
When I try to do this in 3.0 in a WPF Browser Application , I get this error:
System.Security.SecurityEx
ception was unhandled by user code
Message="Request for the permission of type 'System.Net.WebPermission,
System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxx' failed."
Source="mscorlib"
Can anyone tell me what I am doing wrong, or show me some sample code of how to connect to a web service in WPF Browser Application .Net 3.0. Thanks for your help.
Start Free Trial