Execution Problem

Posted on 2004-09-07
Last Modified: 2010-04-15
Hello again everyone,
I have an application that was written and tested in C#.  The application runs fine on my local machine.  When I run it on our server, I have a problem.  Actually, when I run it on our server as Administrator, I get a CLR exception.  If I run it under my user account, it runs just fine.  I don't understand it because I am a member of Administrators on the server.  The application is a program that monitors a directory for changes.  Any suggestions????????

Question by:gvector1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2

Expert Comment

ID: 11997055
With .Net there are security "features" that will not allow code to execute that may be a security risk.  For instance if you set up a Windows Service that has to access any network resource you can not allow the service to run as the default user "Local System", as "Local System" does not have any network right according to .Net, at least this was the case for some coding that I did.  This may also be the case that you are running into when you try to run your applications as the Administrator...

Just a though...

Author Comment

ID: 11997135
The application is monitoring a directory on another server, but the server administrator and user accounts have the same rights.  The user account is a member of administrators.  Why would that keep administrator from accessing and not the user account?????


Accepted Solution

NipNFriar_Tuck earned 500 total points
ID: 11997196
From what I understand there are certain accounts that are denied access to network resources... I believe that the Administrator and Local System are two of these accounts.   One reason is that if one box gets hacked, your whole network is not then vulnerable.  Also, an Administrator for one box may not be an Administrator for another box.  I am sure there are other reasons, I just do not know them...  There may be away to allow the dissallowed accounts to have access to the network through configuration but I would not suggest it.

The way that I have worked this out is to set up an account for my applications.  This account would have the minimal security needed for the applications to run ( including across the network ).  Ideally, one would set up a prod, test, dev account for all applications...

Hope this helps...

Author Comment

ID: 11997434
You are correct!  Now that you brought it to my attention, the administrator account on the running server does not have rights to the server that is needed to be accessed.  I don't know how I missed that.  Thanks Nip.  The points are yours.


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Stop Git from being my repository 1 48
c# ftp code 3 56
Using sample c# simple example 1 53
C#line chart with data on Y and time on X-axis 3 32
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question