S
sfgianthater
I am completely at a loss here.. Nevermind I am also a newbie..
I created a C# 2.0 console application that needs to write to a network
share. I have strong named my app.. And have triedmany different
combinations all with no success:
Created a new permission set, with Permission Settings, Security.
(enable assebmly execution, allow calls to unamanged assemblies, allow
evidence control), IO (given rights to both the share and the logical
drive, also tried full access) and added them to a new zone under local
intranet. Given the new code group, permission to the URL share.
Trusted assembly through Runtime Security Policy.
Given all Code Groups Full Trust (for testing).
Turned CAS Security off. (for testing)
Per Juval Lowy's webcast, removed all Code Groups, except Microsoft
Strong Name, and EMCA Strong Name. Created my own code group, set the
membership to Strong Name, and imported my application.
All of the above options, come back with the following errors, or some
variant of the same error.
Unhandled Exception: System.Security.SecurityException: Request for the
permissi
on of type 'System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.
0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:
<IPermission class="System.Security.Permissions.FileIOPermission,
mscorlib, Vers
ion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Write="\\SERVERNAME\spl\input.pdf"/>
The assembly or AppDomain that failed was:
apcta, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=5f7eafc7f3a0bbd6
The method that caused the failure was:
Void Main(System.String[])
The Zone of the assembly that failed was:
Intranet
The Url of the assembly that failed was:
file://SERVERNAME/spl/apcta.exe
I dont understand how even though I only now have 3 codegroups, I am
still getting the zone "intranet" error. Also, I would assume if I
disabled CAS (caspol -security off) my app would work, but it doesnt..
Is CAS somehow inheriting permissions from my Domain? What is the best
practice for setting up and running an app through a share?
Help...
I am running this from an XP box, to a Win2k3 Box.
I created a C# 2.0 console application that needs to write to a network
share. I have strong named my app.. And have triedmany different
combinations all with no success:
Created a new permission set, with Permission Settings, Security.
(enable assebmly execution, allow calls to unamanged assemblies, allow
evidence control), IO (given rights to both the share and the logical
drive, also tried full access) and added them to a new zone under local
intranet. Given the new code group, permission to the URL share.
Trusted assembly through Runtime Security Policy.
Given all Code Groups Full Trust (for testing).
Turned CAS Security off. (for testing)
Per Juval Lowy's webcast, removed all Code Groups, except Microsoft
Strong Name, and EMCA Strong Name. Created my own code group, set the
membership to Strong Name, and imported my application.
All of the above options, come back with the following errors, or some
variant of the same error.
Unhandled Exception: System.Security.SecurityException: Request for the
permissi
on of type 'System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.
0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
The action that failed was:
Demand
The type of the first permission that failed was:
System.Security.Permissions.FileIOPermission
The first permission that failed was:
<IPermission class="System.Security.Permissions.FileIOPermission,
mscorlib, Vers
ion=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
version="1"
Write="\\SERVERNAME\spl\input.pdf"/>
The assembly or AppDomain that failed was:
apcta, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=5f7eafc7f3a0bbd6
The method that caused the failure was:
Void Main(System.String[])
The Zone of the assembly that failed was:
Intranet
The Url of the assembly that failed was:
file://SERVERNAME/spl/apcta.exe
I dont understand how even though I only now have 3 codegroups, I am
still getting the zone "intranet" error. Also, I would assume if I
disabled CAS (caspol -security off) my app would work, but it doesnt..
Is CAS somehow inheriting permissions from my Domain? What is the best
practice for setting up and running an app through a share?
Help...
I am running this from an XP box, to a Win2k3 Box.