SerialPort.Open() Exception

C

Christian Havel

Hi,

I have a problem calling serialPort.Open(). The customer receives a message
like:


Die Anwendung hat einen Vorgang versucht, der von der Sicherheitsrichtlinie
nicht zugelassen ist ...
....verwenden Sie das Microsoft .NET Framework-Konfigurationstool.

Fehler bei der Anforderung des Berechtigungstyps
System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

I found the .NET Framework configurationstool. What do I have to configure?
Christian
 
M

Michael Nemtsev [MVP]

C

Christian Havel

Hi Michael,

thanks for your help!

We try it. Well, do not you think that it is necessary to set some options
in the .NET configuration tool?

Christian
 
B

Ben Voigt [C++ MVP]

Christian said:
Hi,

I have a problem calling serialPort.Open(). The customer receives a
message like:


Die Anwendung hat einen Vorgang versucht, der von der
Sicherheitsrichtlinie nicht zugelassen ist ...
...verwenden Sie das Microsoft .NET Framework-Konfigurationstool.

Fehler bei der Anforderung des Berechtigungstyps
System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089

I found the .NET Framework configurationstool. What do I have to
configure? Christian

Looks like the application was started from a network drive. You can either
enable full trust for that network location, or copy the executables
locally.
 
C

Christian Havel

Hi Ben,

thanks for your help. I got a screenshot and have following informations:

(Translated from german):
"The type from the first permission on which a error occurs:
System.Security.Permission.SecurityPermission
The zone of the assembly on which a error occured: Intranet"

Any more idea?
Christian
 
B

Ben Voigt [C++ MVP]

Christian said:
Hi Ben,

thanks for your help. I got a screenshot and have following
informations:

(Translated from german):
"The type from the first permission on which a error occurs:
System.Security.Permission.SecurityPermission
The zone of the assembly on which a error occured: Intranet"

"Intranet" instead of "Local Computer" appearing here confirms my guess.
..NET security prevents applications running over the network from accessing
local hardware, like the serial port. The easiest thing to do is install
the application locally.
 
C

Christian Havel

Hi Ben,

thanks for your help again. I wait on the users feedback.
Christian
 
C

Christian Havel

Hi Ben,

your are fantastic :)

The user really tried to start the app from a network folder.

Now it works.
Thanks a lot.
Christian
 
C

Christian Havel

Hi Michael,

the reason was, that the user started the app from a network folder => peng.

Christian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top