473,699 Members | 2,223 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# - soap exception when one web service calls another

1 New Member

This year I'm learning C# at school and now we focus on web services.

I created and published a web service which contains a method that calls another web service written by my class mates. When I run a simple windows application which uses my web service I get the following exception which is thrown when my mates' web method is called.

An unhandled exception of type 'System.Web.Ser vices.Protocols .SoapException' occurred in System.Web.Serv ices.dll

Additional information: System.Web.Serv ices.Protocols. SoapException: Server was unable to process request. ---> System.Security .SecurityExcept ion: Request for the permission of type 'System.Net.Web Permission, System, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9' failed.
at System.Security .CodeAccessSecu rityEngine.Chec k(Object demand, StackCrawlMark& stackMark, Boolean isPermSet)
at System.Security .CodeAccessPerm ission.Demand()
at System.Net.Http WebRequest..cto r(Uri uri, ServicePoint servicePoint)
at System.Net.Http RequestCreator. Create(Uri Uri)
at System.Net.WebR equest.Create(U ri requestUri, Boolean useUriBase)
at System.Net.WebR equest.Create(U ri requestUri)
at System.Web.Serv ices.Protocols. WebClientProtoc ol.GetWebReques t(Uri uri)
at System.Web.Serv ices.Protocols. HttpWebClientPr otocol.GetWebRe quest(Uri uri)
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.GetWebR equest(Uri uri)
at System.Web.Serv ices.Protocols. SoapHttpClientP rotocol.Invoke( String methodName, Object[] parameters)
at top100.aspklien ci.Service.Pobi erzDaneKlienta( Int32 indeks)
at Service.porowna jKryteriaZWycie czkami()
The action that failed was:
The type of the first permission that failed was:
System.Net.WebP ermission
The first permission that failed was:
<IPermission class="System.N et.WebPermissio n, System, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
<ConnectAcces s>
<URI uri="http://www\.aspklienci \.top100\.org\. pl/Service\.asmx"/>

The demand was for:
<IPermission class="System.N et.WebPermissio n, System, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
<ConnectAcces s>
<URI uri="http://www\.aspklienci \.top100\.org\. pl/Service\.asmx"/>

The granted set of the failing assembly was:
<PermissionSe t class="System.S ecurity.Permiss ionSet"
<IPermission class="System.S ecurity.Permiss ions.Environmen tPermission, mscorlib, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
<IPermission class="System.S ecurity.Permiss ions.FileIOPerm ission, mscorlib, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Read="f:\users\ okazje.hostedwi ndows.pl\wwwroo t"
Write="f:\users \okazje.hostedw indows.pl\wwwro ot"
Append="f:\user s\okazje.hosted windows.pl\wwwr oot"
PathDiscovery=" f:\users\okazje .hostedwindows. pl\wwwroot"/>
<IPermission class="System.S ecurity.Permiss ions.IsolatedSt orageFilePermis sion, mscorlib, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Allowed="Assemb lyIsolationByUs er"
UserQuota="9223 372036854775807 "/>
<IPermission class="System.S ecurity.Permiss ions.SecurityPe rmission, mscorlib, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Flags="Assertio n, Execution, ControlThread, ControlPrincipa l, RemotingConfigu ration"/>
<IPermission class="System.S ecurity.Permiss ions.UrlIdentit yPermission, mscorlib, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Url="file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/75f744b9/a73aabfc/App_WebReferenc es.nbrrm83k.DLL "/>
<IPermission class="System.S ecurity.Permiss ions.ZoneIdenti tyPermission, mscorlib, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Zone="MyCompute r"/>
<IPermission class="System.W eb.AspNetHostin gPermission, System, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
<IPermission class="System.N et.DnsPermissio n, System, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Unrestricted="t rue"/>
<IPermission class="System.D rawing.Printing .PrintingPermis sion, System.Drawing, Version= , Culture=neutral , PublicKeyToken= b03f5f7f11d50a3 a"
Level="DefaultP rinting"/>
<IPermission class="System.N et.Mail.SmtpPer mission, System, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Access="Connect "/>
<IPermission class="System.D ata.SqlClient.S qlClientPermiss ion, System.Data, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
Unrestricted="t rue"/>
<IPermission class="System.N et.WebPermissio n, System, Version= , Culture=neutral , PublicKeyToken= b77a5c561934e08 9"
<ConnectAcces s>
<URI uri=""/>

The assembly or AppDomain that failed was:
App_WebReferenc es.nbrrm83k, Version= , Culture=neutral , PublicKeyToken= null
The method that caused the failure was:
top100.aspklien ci.Klient PobierzDaneKlie nta(Int32)
The Zone of the assembly that failed was:
The Url of the assembly that failed was:
file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/Temporary ASP.NET Files/root/75f744b9/a73aabfc/App_WebReferenc es.nbrrm83k.DLL
--- End of inner exception stack trace ---

Could anyone help me ?
Jun 17 '07 #1
0 9815

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Glauco | last post by:
I'm trying to use SOAPpy 0.10.1 for a client but is difficult to handle easly Is this library in use or i'm using an OLD death library ? I'm alone in find a lot of problem in a SOAP Client ? I'm going crazy because function are not documented . Exist another solution for di a SOAP CLient ??
by: Brian P | last post by:
I am working on a new program that uses a SOAP interface. I have written a few of these before, but this time it is giving me trouble. I suspect there is a problem with on the SOAP handler side, but since I'm not an expect I cannot be sure. The vendor has provided me a url to the WSDL document for the soap service. Using the .Net WSDL utility, I generate a c# proxy class. When I'm trying to use the methods of the soap service, I get...
by: Cleo | last post by:
Hi, I am trying to call a WebService Method written in Weblogic from VB.NET and I am getting the following error. I am using SOAP Caal s from VB.NET. Please find the wsdl file and my code. Any help would really be appreciated. Thx
by: parrot toes | last post by:
Summary: I have been trying to make requests of a web service provided by Axis using a dotnet client with code generated by wsdl.exe and have been getting exceptions when trying to process the response. As a result of seraching news groups I guessed that the SOAP response defines an array element in a way that causes the dotnet deserialization routines to put the content in a generic object array (object) BUT the content is supposed to...
by: JRey | last post by:
Does .Net generate the classes for Faults when they are specified in the WSDL. I tried defining them and then generating a proxy, and it did not appear to do it. On the Java side it did generate the class and the ability to serialize that class when putting it on the wire. I was hoping a .Net client would create the appropriate exception class defined in the WSDL and deserialize the message into the appropriate exception class.
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our perspective, should be as simple as defining an object and viewing a parameter on that object. My boss has worked with it and I'm still tryin'... TIA! -- TFWBWY...A
by: Hao | last post by:
There is a wield issue in inspecting the network traffic on the web service client side. There are two soap calls if credentials are used. The first call has no credentials and is rejected by the server. The second call has credentials and works. They are done by .Net behind the scene. No exception is generated. If I do not pass in credentials or pass in empty crenditials (empty user id and password), only one soap message is sent. I...
by: pmasclark | last post by:
Hello, I created a web site, site A, that redirects to another web site, site B, where a simple web service is hosted. The code to call the web service is simple. oWS.AllowAutoRedirect = True oWS.Credentials = New System.Net.NetworkCredential("user","pass") str = oWS.HelloWorld("World")
by: pmlane2001 | last post by:
I have a PHP SOAP XML file size problem that I was wondering if anyone has seen before. I have an XML file that when I put it through my PHP script with 270 lines (13,082 KB) it works fine. If I make it 271 lines (13,112 KB), it causes the script to end with a soap fault. I've tried adding substance to the 270 lines to make the file bigger with out adding lines, but it didn't fail. I've installed everything on a second development box...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.