G
Guest
Hi;
This is driving me nuts because it should work. In my AssemblyInfo.cs I have:
[assembly:CLSCompliant(false)]
[assembly:ComVisible(false)]
[assembly:IsolatedStorageFilePermission(SecurityAction.RequestMinimum,
UserQuota=1048576)]
[assembly:SecurityPermission(SecurityAction.RequestMinimum,
UnmanagedCode=true)]
[assembly:FileIOPermission(SecurityAction.RequestMinimum, Unrestricted=true)]
[assembly:SocketPermission(SecurityAction.RequestMinimum,
Unrestricted=true)]
[assemblynsPermission(SecurityAction.RequestMinimum, Unrestricted=true)]
[assembly:EnvironmentPermission(SecurityAction.RequestMinimum, Read="TEMP")]
// note - also tried with no EnvironmentPermission attribute.
But this call:
Environment.GetEnvironmentVariable("TEMP")
Throws this (note it's mscorlib, not my dll):
"Request for the permission of type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."
This is a Word Add-in dll (regular, not VSTO).
Any ideas?
thanks - dave
This is driving me nuts because it should work. In my AssemblyInfo.cs I have:
[assembly:CLSCompliant(false)]
[assembly:ComVisible(false)]
[assembly:IsolatedStorageFilePermission(SecurityAction.RequestMinimum,
UserQuota=1048576)]
[assembly:SecurityPermission(SecurityAction.RequestMinimum,
UnmanagedCode=true)]
[assembly:FileIOPermission(SecurityAction.RequestMinimum, Unrestricted=true)]
[assembly:SocketPermission(SecurityAction.RequestMinimum,
Unrestricted=true)]
[assemblynsPermission(SecurityAction.RequestMinimum, Unrestricted=true)]
[assembly:EnvironmentPermission(SecurityAction.RequestMinimum, Read="TEMP")]
// note - also tried with no EnvironmentPermission attribute.
But this call:
Environment.GetEnvironmentVariable("TEMP")
Throws this (note it's mscorlib, not my dll):
"Request for the permission of type
System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."
This is a Word Add-in dll (regular, not VSTO).
Any ideas?
thanks - dave