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 / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

A Security Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dom - 30 Mar 2008 21:49 GMT
I have a program finished, I created the exe, I tested it, works
fine.  I move the exe to a network drive so that others can use it,
and suddenly it fails.  The problem seems to be a security problem,
since the program tries to access the backend through SQLConnection,
etc.

When I move the program to the user's local drive it works fine.  So I
assume there is something about the network that stops it.

How do I get out of this?  I really don't want to keep it on the
user's local drive.
thomasnguyencom - 30 Mar 2008 22:52 GMT
> I have a program finished, I created the exe, I tested it, works
> fine.  I move the exe to a network drive so that others can use it,
[quoted text clipped - 7 lines]
> How do I get out of this?  I really don't want to keep it on the
> user's local drive.

You're running into a code access security. There are ways around it,
but you'll have to change or edit the security policy and allow full
trust to *.exe.
Dom - 31 Mar 2008 14:51 GMT
> > I have a program finished, I created the exe, I tested it, works
> > fine.  I move the exe to a network drive so that others can use it,
[quoted text clipped - 11 lines]
> but you'll have to change or edit the security policy and allow full
> trust to *.exe.

Can you give me some tips on how to do this?  Is it done within Visual
Studio, or do I go to the control panel?
thomasnguyencom - 31 Mar 2008 16:23 GMT
> > > I have a program finished, I created the exe, I tested it, works
> > > fine.  I move the exe to a network drive so that others can use it,
[quoted text clipped - 14 lines]
> Can you give me some tips on how to do this?  Is it done within Visual
> Studio, or do I go to the control panel?

You'll have to get the users to meddle their .NET configuration, but I
haven't got that down to a science, yet.

These links helped me a understand more about the exception:
http://msdn2.microsoft.com/en-us/library/930b76w0.aspx
http://www.codeproject.com/KB/security/UB_CAS_NET.aspx#Overriding%20Security

After tinkering with my configuration, I figured it'd be harder to get
users to do this instead of just having them download a local copy.

I currently have my users download the application and run it locally.
When the application loads, it auto-checks the current version out on
the network to make sure they have the latest version and notifies
them if it isn't the latest.

good luck,
-tom

Rate this thread:







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.