I have created a custom assembly that contains a function that uses
System.DirectoryServices to determine the user groups a user belongs to. It
works fine in development (preview) but returns the following error on the
report server:
"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 MackenzieHey, are you using 1.1 of the framework on the web server? If you do have it
installed, it doesn't look like it is installed for that virtual web.
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" <Flon@.discussions.microsoft.com> wrote in message
news:0725157A-2C8D-4CCE-B382-A6658FE98449@.microsoft.com...
>I have created a custom assembly that contains a function that uses
> System.DirectoryServices to determine the user groups a user belongs to.
> It
> works fine in development (preview) but returns the following error on the
> report server:
> "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 just verified the version on my server with the 1.1 version of the
framework, and my version says:
1.1.4322.2251 for MSCORLIB.DLL.
=-Chris
"Christopher Conner" <someone@.someplace.com> wrote in message
news:On91kx3EFHA.3664@.TK2MSFTNGP15.phx.gbl...
> Hey, are you using 1.1 of the framework on the web server? If you do have
> it installed, it doesn't look like it is installed for that virtual web.
> 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" <Flon@.discussions.microsoft.com> wrote in message
> news:0725157A-2C8D-4CCE-B382-A6658FE98449@.microsoft.com...
>>I have created a custom assembly that contains a function that uses
>> System.DirectoryServices to determine the user groups a user belongs to.
>> It
>> works fine in development (preview) but returns the following error on
>> the
>> report server:
>> "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 meant aspnet_regiis /i not installutil /i DOH!
Sorry!
=-Chris
"Christopher Conner" <someone@.someplace.com> wrote in message
news:On91kx3EFHA.3664@.TK2MSFTNGP15.phx.gbl...
> Hey, are you using 1.1 of the framework on the web server? If you do have
> it installed, it doesn't look like it is installed for that virtual web.
> 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" <Flon@.discussions.microsoft.com> wrote in message
> news:0725157A-2C8D-4CCE-B382-A6658FE98449@.microsoft.com...
>>I have created a custom assembly that contains a function that uses
>> System.DirectoryServices to determine the user groups a user belongs to.
>> It
>> works fine in development (preview) but returns the following error on
>> the
>> report server:
>> "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
>|||Thanks for your suggestion.
I have no idea what the 1.0.5000.0 is for.
I have reinstalled .net framework 1.1 and my version of mscorlib.dll
is 1.1.4322.573.
Still no change.
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."
"Christopher Conner" wrote:
> I meant aspnet_regiis /i not installutil /i DOH!
> Sorry!
> =-Chris
> "Christopher Conner" <someone@.someplace.com> wrote in message
> news:On91kx3EFHA.3664@.TK2MSFTNGP15.phx.gbl...
> > Hey, are you using 1.1 of the framework on the web server? If you do have
> > it installed, it doesn't look like it is installed for that virtual web.
> >
> > 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" <Flon@.discussions.microsoft.com> wrote in message
> > news:0725157A-2C8D-4CCE-B382-A6658FE98449@.microsoft.com...
> >>I have created a custom assembly that contains a function that uses
> >> System.DirectoryServices to determine the user groups a user belongs to.
> >> It
> >> works fine in development (preview) but returns the following error on
> >> the
> >> report server:
> >>
> >> "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
> >>
> >
> >
>
>