Permissions

  • Thread starter Thread starter Sean McKaharay
  • Start date Start date
S

Sean McKaharay

I am wondering if anyone can help me out with this one. Here goes....... I
have my local machine (Windows XP framework 1.1) and a Server (Windows 2003
framework 1.1). When I go to run my code on my box and late bind to a dll on
the server machine I get an error. Below is the lines of code and the error
I get. I have no problem accessing the Reports.dll so it should not be a
security problem. I get the error when I try to run the class rptBadge. I am
getting a RegistryPermission error. Here is some background on the
class..... I am extending from a class from a 3rd party. We have paid for
the product and I am wondering if it has something to do with that. The
third party might have some information in the registry and I don't have
permissions to read the registry.

Any help would be appreciated.



System.Reflection.Assembly ControlAssembly =
System.Reflection.Assembly.LoadFrom("\\Server1\Reports\output\Reports.dll");

report =
(ExpoExchange.Registration.Common.Business.ProductionActiveReportBase)
ControlAssembly.CreateInstance("Reports.Production.rptBadge");



THE ERROR:

{"Request for the permission of type
System.Security.Permissions.RegistryPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed." }
 
Since the other assembly is loaded from a network resource, that code will
run with "local intranet" security permissions - which are a lot more
limited than assemblies run from the local machine. You will need to
configure the security for the given assembly, or bump up the security level
of the "local intranet" zone.

Arild
 
I tried to change the permisions of LocalIntranet_Zone to FullTrust and I am
still getting the error.
 
Sean McKaharay said:
Does anyone else have any help



dll I
System.Reflection.Assembly.LoadFrom("\\Server1\Reports\output\Reports.dll");

The latter is pretty easy to check out (assuming you can find the correct
hive/key that is giving you trouble.) just open regedt32 (regedit - doesn't
provide for changing permissions) as an admin - find the key/path and reset
the permissions to everyone, or specific name, etc.

There are various Registry Monitoring programs available for sale,
shareware, free, etc on the web that might help in your search.

There is likely more to the problem, but this would be a quick check if it
is a simple matter of registry permission. I am passing a note of doubt
because frankly M$ has been monkeying around with security over the last
couple of 24 months or so and .NET uses a slightly different security model
that Windows itself uses. I still don't have a warm fuzzy as to
understanding all the specifics.

HTH
-ralph
 
Sean McKaharay said:
I tried to change the permisions of LocalIntranet_Zone to FullTrust and I
am
still getting the error.
Are you sure you did this correctly?

On the client machine you should add a code group with at least "Registry"
access permissions to the Machine policy level, You would then give the code
group a URL membership condition which would specify the UNC path of your
file share.

Willy
 
Back
Top