Advertisement

02.28.2008 at 07:26AM PST, ID: 23200557
[x]
Attachment Details

How to connect a web service to a  WPF Browser Application?

Asked by tonyedmo in .Net Editors & IDEs, Visual Studio 2008, .NET Framework 3.x versions

Tags: C#

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.ViewWebServiceInfo wsInfo;
WebReference.ViewWebService wsView = new WebReference.ViewWebService();
wsInfo = wsView .ViewAll();

When I try to do this in 3.0 in a WPF Browser Application , I get this error:

System.Security.SecurityException 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
[+][-]02.29.2008 at 05:20AM PST, ID: 21012886

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .Net Editors & IDEs, Visual Studio 2008, .NET Framework 3.x versions
Tags: C#
Sign Up Now!
Solution Provided By: TheLearnedOne
Participating Experts: 1
Solution Grade: A
 
 
[+][-]05.27.2008 at 06:52PM PDT, ID: 21657143

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628