You tell people to set All Code to FullTrust? at the root of the machine policy? are you mad? You've stopped CAS preventing *any* code from doing things it shouldn't (unless the user has modified other policies - which if they are prepared to follow this advice I'd say was unlikely). The whole point of CAS was to limit what code can do on a machine if its not from a trusted source. You know that message box that IE puts up for .exes about them being dangerous when you click on a link to one, well it doesn't do that for .NET executables because their ability is limited by CAS - but hey, not on the machines of the people you've been advising!
Sorry for going in heavy here but if you're going to advise people what to do with their CAS permissions, please make sure you understand what CAS does, why it does it and how it works. What you should do is create an installer utility or MSI that modifies the machine policy to add a codegroup, say under the root of machine, which grants fulltrust to your strong name or URL or whatever identifies your code in such a way that prevents other less trusted code having the ability to do things it shouldn't - or change your app so it can runn OK with partial trust.
Regards
Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
I love programming in C#/.Net, but distributing applications is a real pain.
I never know if the user who might use one of my utilities might have the
proper code permissions to run a network application or access an assembly.
I'm always having to tell new users to go into the .Net Configuration Wizard
and set All_Code to fulltrust, or add a new assembly under Office_Projects.
Is there anyway to eliminate that aspect of .Net? I understand why Microsoft
has incorporated this feature in .Net, but it makes application distribution
a real hassle. Any suggestions on how to get around the problem would be
greatly appreciated.