Need help working around .NET security

I have problems with .NET security blocking the network programs I create.  If I use caspol to give full trust to the internet zone, then everything works fine.  I know I can use the Strong Name utility to create a strong name and add it to all my assemblies, but I would like an easier way.  Is it possible to disable .net security within my program and then re-enable it before closing the program?  I'm the network admin and I run apps that fix problems, or change account passwords, etc.  I have been told that some people will create an application in a non-.net program that disables .net security and then launches their .net program.  For example, I know someone who uses VB6 to run "caspol -s off" and then launch his .net application.  Once the application is complete, it turns .net security back on.

 Is there anyway to do this within a .net program?  I know the idea might be crazy because it seems that such security would not let you disable it, but it does seems you can disable security with a non .net program so I'm hoping someone has found a way to do it within a .net program.

0
cepacs
12/10/2008 2:32:03 AM
asp.net.security 27051 articles. 1 followers. Follow

2 Replies
815 Views

Similar Articles

[PageSpeed] 55

Hi cepacs,

Based on your description, I don't understand you clearly. But if you want to restrict the asp.net application security, you could take advantage of code access security. It can restrict your application by different types of resources and operations. Briefly to say, it can define what resources the application can access and what operations it can do. You can get more details in this link:

http://msdn.microsoft.com/en-us/library/ms998326.aspx

If there's any problem, please tell us more details. 

Thanks.


David Qian
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Wencui
12/12/2008 6:49:09 AM

! found out that if you install .NET 3.5 SP1, it does away with blocking .Net programs that are run from a network share. Thank you Microsoft!

http://blogs.msdn.com/vancem/archive...ork-share.aspx

 I installed .NET 3.5 SP1 and now all my .NET programs work... VB.NET, C#, etc.  As long as it is launched from a network share, it will run.  This was probably the wrong place to post this question, but when I googled the error, lots of links for ASP forums came up with questions about the same error.  I was assuming ASP.NET would encounter the same .NET security issues as VB.NET and C#.NET, but I don't know if this is true.  Anyway, now with this update, my .NET programs will run from the network.

0
cepacs
12/13/2008 5:02:02 PM
Reply: