Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

Execution Problem

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????????

Thanks,
Kendal
0
gvector1
Asked:
gvector1
  • 2
  • 2
1 Solution
 
NipNFriar_TuckCommented:
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...
0
 
gvector1Author Commented:
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?????

Thanks,
Kendal
0
 
NipNFriar_TuckCommented:
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...
0
 
gvector1Author Commented:
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.

Thanks,
Kendal
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now