"Request for the permission of type
System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed."
- I have another function in the same assembly that uses
System.Data.SQLClient to access a database and return values - this works
fine.
- I have included a codegroup for the assembly in rssrvpolicy.config with
the FullTrust permissionset.
- I have tried combinations of the following in the assemblyInfo.cs file:
[assembly: DirectoryServicesPermission(SecurityAction.RequestMinimum,
PermissionAccess=DirectoryServicesPermissionAccess.Browse)]
[assembly:
System.Security.Permissions.SecurityPermission(SecurityAction.RequestMinimum,
Unrestricted = true)]
[assembly: AllowPartiallyTrustedCallers]
- I have tried the following at the top of the function:
System.DirectoryServices.DirectoryServicesPermission pDir = new
DirectoryServicesPermission(System.Security.Permissions.PermissionState.Unrestricted);
System.DirectoryServices.DirectoryServicesPermissionEntry pDirEnt = new
DirectoryServicesPermissionEntry(System.DirectoryServices.DirectoryServicesPermissionAccess.Browse,"");
pDir.PermissionEntries.Add(pDirEnt);
pDir.Assert();
Please help!
I have been trying to solve this for ages and just cannot find a solution.
Regards,
Flon Mackenzie
I would like to suggest to first refresh the framwork installation on the
web server.
in %systemroot%\microsoft.net\framework\v1.1.4322\
installutil /i
The only reason I say that is because this number bugs me: "...mscorlib,
Version=1.0.5000.0, "
=-Chris
"Flon" <Fl...@discussions.microsoft.com> wrote in message
news:0725157A-2C8D-4CCE...@microsoft.com...
1.1.4322.2251 for MSCORLIB.DLL.
=-Chris
"Christopher Conner" <som...@someplace.com> wrote in message
news:On91kx3E...@TK2MSFTNGP15.phx.gbl...
Sorry!
=-Chris
"Christopher Conner" <som...@someplace.com> wrote in message
news:On91kx3E...@TK2MSFTNGP15.phx.gbl...
I have also tried the following in my function:
System.Security.Permissions.SecurityPermission pSec = new
SecurityPermission(System.Security.Permissions.PermissionState.Unrestricted);
pSec.Assert();
System.DirectoryServices.DirectoryServicesPermission pDir = new
DirectoryServicesPermission(System.Security.Permissions.PermissionState.Unrestricted);
pDir.Assert();
which results in this error:
"Stack walk modifier must be reverted before another modification of the
same type can be performed."