G
Guest
I have a Windows project (VB.net) that has two forms. The first form performs
some I/O operations and displays some SQL data on a third party grid (Janus).
It also contains a button that opens the second form.
The second form reads some SQL data and also displays in another grid (Janus).
This application, once deployed, will be accessed on a shared drive in the
network.
While trying to run it from a remote computer on the network, I kept getting
code access security errors due to the assembly not having rights to perform
certain operations.
I did some research and learned how to create a key and assign a strong name
to my assembly. Then, as a test, using the .NET Configuration tool, I created
a code group called MyTestCodeGroup and assigned the Everthing Permission Set
to my assembly.
Well, that allowed the application to perform all actions on the first form,
but when I go to access the second form, I get access security errors once
again.
I tried changing the Membership Condition to include All Code, but that
didn't fix the problem.
I also added the directive <Assembly:
AssemblyKeyFileAttribute("..\..\sgKey.snk")> to AssemblyInfo.vb and added
references to the System.Reflection and System.Runtime.InteropServices
classes.
If anyone can help, please keep in mind that I am still learning how the CLR
deals with code security and so far, this has been a somewhat complicated
process.
Thanks in advance,
Rod
(e-mail address removed)
some I/O operations and displays some SQL data on a third party grid (Janus).
It also contains a button that opens the second form.
The second form reads some SQL data and also displays in another grid (Janus).
This application, once deployed, will be accessed on a shared drive in the
network.
While trying to run it from a remote computer on the network, I kept getting
code access security errors due to the assembly not having rights to perform
certain operations.
I did some research and learned how to create a key and assign a strong name
to my assembly. Then, as a test, using the .NET Configuration tool, I created
a code group called MyTestCodeGroup and assigned the Everthing Permission Set
to my assembly.
Well, that allowed the application to perform all actions on the first form,
but when I go to access the second form, I get access security errors once
again.
I tried changing the Membership Condition to include All Code, but that
didn't fix the problem.
I also added the directive <Assembly:
AssemblyKeyFileAttribute("..\..\sgKey.snk")> to AssemblyInfo.vb and added
references to the System.Reflection and System.Runtime.InteropServices
classes.
If anyone can help, please keep in mind that I am still learning how the CLR
deals with code security and so far, this has been a somewhat complicated
process.
Thanks in advance,
Rod
(e-mail address removed)