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

  • Question




    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:




    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?



    Monday, November 3, 2008 3:30 PM

All replies

  • Hi,


    You may like to take a look at the links below.



    Hope the above helps.






    Thursday, November 6, 2008 9:48 PM

    Appreciate this input.  I'm definitely getting an exception related to file permissions even though the user has full access.  Apparently the application is not being honored:


    Access to the path 'C:\TestDir\Test.xml' is denied.


    The first link you provided looks like it's related.  Any other input gladly accepted!



    Friday, November 7, 2008 5:19 PM

    ... only problem I see is that the application is trying to write with system defined procedures:


    Save(string) -  C\Windows\  .Net Framework v 2.0 - System.Xml.dll

    Save(System.IO.Stream) - C:\Windows\   .Net Framework v 2.0 - System.Xml.dll

    Save(System.IO.TextWriter) - C\Windows\  .Net Framework v 2.0 - System.Xml.dll

    Save(System.Xml.XmlWriter) - C\Windows\  .Net Framework v 2.0 - System.Xml.dll


    How would the File Permissions routine apply here?


    FileIOPermission f2 = new FileIOPermission

                     (FileIOPermissionAccess.Read, "C:\\test_r");f2.AddPathList(FileIOPermissionAccess.Write

                             |   FileIOPermissionAccess.Read, "C:\\example\\out.txt");


    In other words, how would this be applied to all routines that would need it?



    Friday, November 7, 2008 5:38 PM
  • There can be couple of reasons for this. Wrong manifest can definitely be one. However, it looks like you are trying to access any protected resource during start-up and this can be blocked. Start-up applications should be standard-user app only so that it doesn't need elevation. So, you should not be able to write to protected locations by an application launched in startup.


    You can try separating this admin code to a separate module so that start-up operation can run with standard user privilege.


    Hope this helps.

    Friday, November 14, 2008 12:26 PM