473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Calling Web Services from a Web Form throws CAS violation

We created a C# Windows forms application and put the .EXE on our web server.

We can download the executable from the web server to a desktop and it will
display OK. When we click a button that causes the executable to call a web
service on the same web server, we get the following code access security
violation.

-------------- begin violation -------------------------------------------
Could not talk to the web server. Error = 'System.InvalidOperationException:
There is an error in XML document (1, 269). --->
System.Security.SecurityException: Security error.

at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read2_ReturnDS(Boolean isNullable, Boolean checkType)

at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlS erializationReader1.Read9_StorlibReadResponse()

The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">

<IPermission class="System.Security.Permissions.FileDialogPermi ssion,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1"/>

<IPermission
class="System.Security.Permissions.IsolatedStorage FilePermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="None"/>

<IPermission class="System.Security.Permissions.SecurityPermiss ion,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1"
Flags="Execution"/>

<IPermission class="System.Security.Permissions.UIPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Window="SafeTopLevelWindows"/>

<IPermission class="System.Net.DnsPermission, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"/>

<IPermission class="System.Drawing.Printing.PrintingPermission,
System.Drawing, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
version="1"
Level="NoPrinting"/>

<IPermission class="System.Diagnostics.PerformanceCounterPermis sion,
System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"/>

<IPermission class="System.Security.Permissions.UrlIdentityPerm ission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1"
Url="file://C:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll"/>

<IPermission class="System.Security.Permissions.ZoneIdentityPer mission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1"
Zone="MyComputer"/>

</PermissionSet>

--- End of inner exception stack trace ---

at System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader
xmlReader, String encodingStyle)
at System.Xml.Serialization.XmlSerializer.Deserialize (XmlReader xmlReader)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at BackIssue.com.kcc.cad.Service.StorlibRead(String wildcard)
at BackIssue.FormMain.searchForWildcard()'

---------------- end violation -------------------------------------------

What do I need to do to get past this violation?

Joe
Nov 23 '05 #1
0 1703

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: john | last post by:
I have a service that checks the event log for certain types of error messages. It kept locking up so I put in debugging code to see where the problem was. It's locking up when I call the property...
9
by: Eddie J | last post by:
I'm getting an intermittent error when calling a .NET web service from a .NET console application. Both are using v.1.1.4322 of the framework. Any ideas on what could be causing this? It can...
2
by: Boris Fortes | last post by:
I need to unhook event receiver as result of native C++ event. It unhooks successfully, but __raise does not return and throws access violation. Visual Studio 2003 How to reproduce: Consol...
8
by: Marc | last post by:
Hi! I'm calling a web service using C# and a wrapper class generated by wsdl tool. The web service specification contains some nillable parameters which types are Value Types in .NET (long, int,...
7
by: Stu | last post by:
Hi, I have a web service which returns a record set and works well integrated with an asp dot net page. However if I decided to develop a unix app will i be able to read the dataset as it is...
0
by: Don | last post by:
I have established a web reference to the WSDL of a web service written in Java. Successfully instantiated all my class objects and assigned values to required properties. When I call the...
0
by: samiam | last post by:
I know that "a new transaction" can be started from a web method by simply using an attribute " I guess the assumption here is that if the web method returns normally, the transaction is...
0
by: =?Utf-8?B?S2V2aW4gU2NobmVpZGVy?= | last post by:
I have two projects (one using .NET 1.1 the other using 2.0). When I call a particular method in a webservice from the 1.1 project everything works great. When I call the same method from the 2.0...
0
by: dev | last post by:
I have a website that dynamically instantiates an instance of a class using Reflection from another Assembly. Within that class there is a method that calls a webservice. The webservice is a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.