Solved

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

Posted on 2008-11-03
4
615 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
  • 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

759 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

19 Experts available now in Live!

Get 1:1 Help Now