Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2004

Tip: Looking for answers? Try searching our database.

Security Exception error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roy - 30 Sep 2004 17:13 GMT
Hi all,

I get the following message as soon as I copy all the project's files on the
network and try to run it from there: (Even Build don't give me an error)
An unhandled exception of type System.Security.SecurityException occurred in
'Application Name'.
Any idea what is causing this problem. This application is in vb.net and I
don't have problem running it on my local machine.
Thanks in advance
Roy
Richard Blewett [DevelopMentor] - 30 Sep 2004 19:13 GMT
You are running into the security layer in .NET called code access security (CAS). CAS is niot concerned with who is running the code, but rather where the code came from (physically or author). Trust is applied based on the code's origins.

An in fact the same thing occurs in your head everytime you start an .exe. I'm sure you don't think twice about running an exe off the start menu. However, if you surf to an internet site and click on a link that happens to be an exe - do you happily always say you want to run it regardless of the site? I assume no (either that or you have a machine heavily laden with virus's ;-) ). So having different levels of trust depending on code origin is a good thing.

So whats the problem you're having? Well by default CAS policy states that code running on the local machine runs with full trust (in other words CAS doesn't restrict what the code can do). However code running from a remote location without a dot in the hostname is assumed to be on the intranet and has a lower level of trust (for example its not allowed to access the file system directly - it must go via the common file dialogs so the user can agree to the access.

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

  nntp://news.microsoft.com/microsoft.public.dotnet.framework/<DA9C0CD8-F8D3-4BDA-9624-3E5ED3E0A755@microsoft.com>

Hi all,

I get the following message as soon as I copy all the project's files on the
network and try to run it from there: (Even Build don't give me an error)
An unhandled exception of type System.Security.SecurityException occurred in
'Application Name'.
Any idea what is causing this problem. This application is in vb.net and I
don't have problem running it on my local machine.
Thanks in advance
Roy



[microsoft.public.dotnet.framework]

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.