security policy

Hi,

I'm going thru this msdn articele: http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/default.aspx on serial communication, and it provides source code and an application for serial comm.  when i click on the settings button to try and setup the port and everything, a window pops up saying:

The application attempted to performa n operation not allowed by the security policy.  The operation required SecurityException.  To grant this app the reuqired permission please contact your system administrator, or use the MS .NET Security policy administration tool.

then some other useless msg

and finally:

Requrest for the permission of type System.Security.Permissions.FileIOPermission, mscorlib, Version=1.0.50000.0, Culture=nuetral, PublicKeyToken=###(some number) failed.

i found the .net security policy administration tool but don't know how to use it. do you?

thanks - Trevor
LVL 8
trevorhartmanAsked:
Who is Participating?
 
raterusConnect With a Mentor Commented:
No I don't, this is a correct answer since you only asked if I knew how to use it, please give points. :-)
0
 
trevorhartmanAuthor Commented:
lol, well i guess you're the #1 candidate for the points, if no one else knows :)
0
 
raterusCommented:
haha, I was wondering what you'd say to that.  Have you tried impersonating a user (like a domain admin) in web.config

<identity impersonate="true" />

This may be a quick fix, but the hard part would be to configure this so the aspnet user has the rights to do this.  This is what I don't know.
0
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
trevorhartmanAuthor Commented:
oops. i should have asked this in the .NET forum... this isn't even an asp.net question, i'm just so used to asking questions here..

it's a windows forms application..  anyway i sort of figured it out, i just gave FullTrust to all code... probably not the best for security but at least i can test now.
0
 
trevorhartmanAuthor Commented:
well, enjoy the easy points :)  looks like no one else knows
0
 
trevorhartmanAuthor Commented:
cool profile btw, i just checked it out :)
0
 
raterusCommented:
Did you ever figure out a solution?  Posting to microsoft.public.dotnet.security will get you in touch with the real experts, and I imagine they will be able to help you more.
0
 
trevorhartmanAuthor Commented:
well like i said before, it works when i put FullTrust on all code.... i only need it for testing/development, so it shouldn't be a problem.. thanks for the link
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.