Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

security.permissions.securitypermission problem...

Status
Not open for further replies.

crodge

Programmer
Joined
Jun 22, 2006
Messages
1
Location
US
Long story short, I have to write a few utilies to do various types of batch renaming of files. Some files are in a XXXX-p####.xxx format and they need to go to ######.xxx and so on - that's besides the point. When I write and test these utilities on my computer, they work just as intended. I post them in a network share on my computer for others to grab and use. When they try to run the .exe on their own computer (with .NET 2.0 and all that installed) the program will launch, but the second it goes to do any work they get an error:

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

What do I have to change? Do I have to hop into the .NET 2.0 Configuration (MMC snap-in) and add each .exe as a trusted assembly on each computer? On a side note, some computers don't even have the ".NET Framework 2.0 Configuration" tool listed in Admin. Tools.
 
Yes, you have to use strong name, put it in GAC, deal with Code Access Security Policy (CASPOL.exe tool) and so on.
But, it is not hard to write a setup project i.e. setup.exe and share it for the users. The users can grab it on their computer and executing it will install utilities or the users can execute from that share and install your program.
-obislavu-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top