Solved

C# application doesn't launch on Server 2008 but runs on XP & Vista

Posted on 2008-11-03
4
621 Views
Last Modified: 2013-12-04
Greetings,

I have a program the company has been using quite a while on Server 2003 and XP.  We recently started a migration to Server 2008 and Vista.  The program has no problems yet on Vista and works on some Server 2008 machines.  For the Servers it doesn't work on it gives a Problem Signature error:

System.UnauthorizedAccess

This program is located in the following directory:

C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Is there some configuration item that is lacking which causes this problem?

This is additional information generated by the C# application:


Attempted to perform an unauthorized operation.
mscorlib -- System.UnauthorizedAccessException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=


Thanks!

Status-program-stops-working.JPG
0
Comment
Question by:John500
[X]
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
4 Comments
 
LVL 4

Expert Comment

by:barnesd1
ID: 22928835
Try either adding the exe name to Control Panel..Advanced..Data Execution Protection.  See http://support.microsoft.com/kb/875352
Also you might want to add it to the Windows Firewall as an exception.
0
 

Author Comment

by:John500
ID: 22939981
Ok, I'll keep these in mind as alternate solutions.  However, it appears UAC is the problem because this executable is located in the Startup directory:

C$\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

Apparently this directory defaults to the 'User' account especially for primary domain controlers which have no local user/group policies (for security reasons).

The end result is that unless the 'User' account is given write permission on the directory it needs, the application won't be able to write even if the user running the application is considered an administrator of the domain.

I'd try your suggestion right now but it would require a reboot on the PDC... but that's not happening during normal working hours.

Any additional thoughts?
0
 
LVL 4

Accepted Solution

by:
barnesd1 earned 500 total points
ID: 22947912
If you want the program to start forget the Startup group.  Go into the registry with regedit and migrate to \HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run and add new String Value MyProg and set the Value to your exe eg c:\program files\myprog\MyProg.exe.
0
 

Author Closing Comment

by:John500
ID: 31512738
Thanks!
0

Featured Post

Put Machine Learning to Work--Protect Your Clients

Machine learning means Smarter Cybersecurity™ Solutions.
As technology continues to advance, managing and analyzing massive data sets just can’t be accomplished by humans alone. It requires huge amounts of memory and storage, as well as high-speed processing of the cloud.

Question has a verified solution.

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

This article helps those who get the 0xc004d307 error when trying to rearm (reset the license) Office 2013 in a Virtual Desktop Infrastructure (VDI) and/or those trying to prep the master image for Microsoft Key Management (KMS) activation. (i.e.- C…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

623 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