Problem with SerialPort using network

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a program using SerialPort and it works perfectly when I have the exe
file in my hard disk.

But when I try to open the port and the file is in a network, I get this
exception:

System.Security.SecurityException: Request for the permission of type
'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

Someone can help me?
 
Hi,

If you run a program from the network you need to gives it more permission
than the defaults.

This is what you need to do:

Go to Administrative tools and select Microsoft .NET framework wizards
Select Adjust .NET security
Select Make changes to this computer
Select Local Intranet
Move the slider up to full trust

cheers,
 
Thanks Ignacio.

I haven't the option "Microsoft .NET framework wizards", but instead I use
"Microsoft .NET Framework 2.0 Configuration"
Select "Configure Code Access Security Policy"
Select "Adjust Zone Security"
And finally, as you said:
Select Make changes to this computer
Select Local Intranet
Move the slider up to full trust
 

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

Back
Top