G
Guest
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.XmlSerializationReader1.Read2_ReturnDS(Boolean isNullable, Boolean checkType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read9_StorlibReadResponse()
The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.FileDialogPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1"/>
<IPermission
class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="None"/>
<IPermission class="System.Security.Permissions.SecurityPermission,
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.PerformanceCounterPermission,
System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"/>
<IPermission class="System.Security.Permissions.UrlIdentityPermission,
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.ZoneIdentityPermission,
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.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.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
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.XmlSerializationReader1.Read2_ReturnDS(Boolean isNullable, Boolean checkType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read9_StorlibReadResponse()
The granted set of the failing assembly was:
<PermissionSet class="System.Security.PermissionSet"
version="1">
<IPermission class="System.Security.Permissions.FileDialogPermission,
mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089"
version="1"/>
<IPermission
class="System.Security.Permissions.IsolatedStorageFilePermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Allowed="None"/>
<IPermission class="System.Security.Permissions.SecurityPermission,
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.PerformanceCounterPermission,
System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"/>
<IPermission class="System.Security.Permissions.UrlIdentityPermission,
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.ZoneIdentityPermission,
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.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.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