My C# application uses pointers and hence is complied using the "Allow Unsafe Code" setting. I know that it is quite difficult or not possible at all to run such an application from a network location.(or is there any way to run it??) What I would like to know is, is there any way to handle the error that occurs while trying to run this application from a network location and make the application fail gracefully. I am getting the following error... "Application has encountered a problem and needs to close". Exception Information contains the following code: 0xe0434f4d
Change security settings (using the CASPOL utility) to allow this execution. it is not that difficult - you can / should at least put your intranet known locations into the intranet zone there ;)
otherwise - yes and no. You can not get that exception, but you can actually check / claim the needed CAS rights in code to make sure you have them in the first place.
CAS is like - complicated. And not many people know about it.
Check http://support.microsoft.com/kb/315529 as a starting point.
From .NET 3.5 sp1 then running code from a network share gets the same rights as running on a local machine. You should be able to run unsafe code if the machine has .NET 3.5 sp1.
User contributions licensed under CC BY-SA 3.0