Solved

Execution Problem

Posted on 2004-09-07
4
232 Views
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????????

Thanks,
Kendal
0
Comment
Question by:gvector1
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:NipNFriar_Tuck
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...
0
 

Author Comment

by:gvector1
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?????

Thanks,
Kendal
0
 
LVL 7

Accepted Solution

by:
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...
0
 

Author Comment

by:gvector1
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.

Thanks,
Kendal
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

911 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now