SFX - Linkdemand Error Windows 2003 network share

Aug 3, 2009 at 12:57 PM

Hi Cheeso,

We are experiencing the following issue when trying to execute a sfx across a network share whilst logged onto a windows 2003 platform. This issue doesn't appear to happen across 2 windows 2000 platforms. I was wondering if you could shed some light on the issue.

cheers Nick


Z:\Blah\GSC\Blah\utterances\archiver>20090519niktest

Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'Ionic.Zip.WinFormsSelfExtractorStub' threw an exception. ---> System.Security
.SecurityException: Request for the permission of type 'System.Security.Permissi
ons.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyTok
en=b77a5c561934e089' failed.
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly a
sm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, Secur
ityAction action, Object demand, IPermission permThatFailed)
   at System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object ass
emblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle
 rmh, SecurityAction action, Object demand, IPermission permThatFailed)
   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet gran
ts, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Objec
t assemblyOrString, SecurityAction action, Boolean throwException)
   at System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs
, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMet
hodHandle rmh, Assembly asm, SecurityAction action)
   at Ionic.Zip.WinFormsSelfExtractorStub..cctor()
The action that failed was:
LinkDemand
The type of the first permission that failed was:
System.Security.Permissions.SecurityPermission
The first permission that failed was:
<IPermission
version="1"
Flags="ControlAppDomain"/>

The demand was for:
<PermissionSet
version="1">
<IPermission
version="1"
Flags="ControlAppDomain"/>
</PermissionSet>

The granted set of the failing assembly was:
<PermissionSet
version="1">
<IPermission
version="1"
Access="Open"/>
<IPermission
version="1"
Allowed="ApplicationIsolationByUser"
UserQuota="512000"/>
<IPermission
version="1"
Flags="Execution"/>
<IPermission
version="1"
Window="SafeTopLevelWindows"
Clipboard="OwnClipboard"/>
<IPermission
version="1"
Url="file:///Z:/Blah/GSC/Blah/utterances/archiver/20090519niktest.exe"/>
<IPermission
version="1"
Zone="Internet"/>
<IPermission
version="1"
Level="SafePrinting"/>
</PermissionSet>

The assembly or AppDomain that failed was:
Ionic.Zip-2009Jul27-230057-1, Version=1.8.3.25, Culture=neutral, PublicKeyToken=
null
The Zone of the assembly that failed was:
Internet
The Url of the assembly that failed was:
file:///Z:/Blah/GSC/Blah/utterances/archiver/20090519niktest.exe
   --- End of inner exception stack trace ---
   at Ionic.Zip.WinFormsSelfExtractorStub..ctor()
   at Ionic.Zip.WinFormsSelfExtractorStubProgram.Main(

Coordinator
Aug 3, 2009 at 7:17 PM
Edited Aug 3, 2009 at 7:39 PM

The problem has to do with the way the SFX packages the DotNetZip dll.  The DLL is embedded as a resource, and in order to load that assembly, the application has to plug-in to the assembly resolution logic, which apparently is restricted for applications that run from the network.

For now, I think the only workaround is to copy the SFX locally.  I will look into a remedy.

Aug 4, 2009 at 11:03 AM

ok... thanks

Nick

Nov 3, 2009 at 1:41 AM

Hi,

I am having the same exception, any solution, please share with me.

Thanks

Riaz Afridi

 

Coordinator
Nov 3, 2009 at 12:00 PM

the only workaround is to copy the SFX locally.