using dll component

  • Thread starter Thread starter tsutton
  • Start date Start date
T

tsutton

I developed my application on my PC using a referenced
Control component (which was analysed by Aximp.exe and
give me a dll). It runs fine on my PC but when I place it
on the network and run it from there (still from my PC) I
have an error namely:

System.Security.Permissions.SecurityException.

Any idea what is going on?

If I go and run a VBNet app. with no foreign components on
the network, the application would run fine!

T
 
.. . .
It runs fine on my PC but when I place it on the network and run it
from there . . .

System.Security.Permissions.SecurityException.

Programs run from outside the /local/ file system run in a security
"sandbox" with [one would hope] considerably less permissions than
a program running locally.

It sounds like your Control is trying to do something that the Security
Policy has decreed it can't.

HTH,
Phill W.
 
* "tsutton said:
I developed my application on my PC using a referenced
Control component (which was analysed by Aximp.exe and
give me a dll). It runs fine on my PC but when I place it
on the network and run it from there (still from my PC) I
have an error namely:

System.Security.Permissions.SecurityException.

Any idea what is going on?

If I go and run a VBNet app. with no foreign components on
the network, the application would run fine!

<http://www.google.de/[email protected]>
 
Phill,

Thanks for your reply.

However, the error message comes from the
InitializeComponent stage, it does not even recognise the
control.

A VB6 application calling the same control to do the same
jobs and is executed from the same network environment (as
the VBNet one) works fine!

The component is a IBM Client Access control.

Thanh



-----Original Message-----
.. . .
It runs fine on my PC but when I place it on the network and run it
from there . . .

System.Security.Permissions.SecurityException.

Programs run from outside the /local/ file system run in a security
"sandbox" with [one would hope] considerably less permissions than
a program running locally.

It sounds like your Control is trying to do something that the Security
Policy has decreed it can't.

HTH,
Phill W.


.
 
VB6 does not have the new Managed code security permissions, so the same
component run in VB6 will not create security exceptions.
VB.Net does use managed code in the runtime, which is why you're seeing the
security exceptions when using the same component.

The earlier comment that the security permissions run from the intranet is
correct: the permissions are much more limited. It's likely that the
component you're using violates the permission sets you've been granted for
the assembly. One example is that the same program run from the intranet
will not have permissions to write to the local hard disk.

You'll need to understand the basics of Code Access Permissions and
Administering security policy, here are some links:

Key security concepts:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconkeyconceptsinsecurity.asp

Intranet permission set default permissions:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpcondefaultsecuritypolicy.asp

Administering security policy:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpcondefaultsecuritypolicy.asp

Best practices:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/htm
l/cpconkeyconceptsinsecurity.asp

.Net security newsgroup:
http://msdn.microsoft.com/newsgroups/?url=/newsgroups/loadframes.asp?icp=msd
n&slcid=us&newsgroup=microsoft.public.dotnet.security

Outline of the best way to fix this:
1. Figure our why the referenced .dll is creating a security exception.
Usually this results from registry or File IO access. Look at the
exception message for details.
2. Use your machines management console to alter the security policy -
"Administrative tools" -> "Microsoft .Net Framework .1.1 Configuration tool"
a.) Create a new permission set based on intranet persmissions, but
with added permissions so the .dll will run correctly.
b.) Change the machines intranet zone code group to use the modified
permission set.

--------------------
 
Back
Top