CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2002
    Posts
    121

    running c# app remotely from sql server sp

    I'm getting an error when i try to run a c# application from a sql server procedure.

    It runs with out a problem when i run the app by double clicking. It just errors out when im attempting to run it with xp_cmdshell.

    Any ideas?


    Here's part of the exception that im getting:
    Unhandled Exception: System.TypeInitializationException: The type initializer for "System.Drawing.SafeNativeMethods" threw an exception. ---> System.Runtime.InteropServices.ExternalException: Failed to create system events window thread.

  2. #2
    Join Date
    Oct 2002
    Location
    Arkansas, USA
    Posts
    189
    I ran into the exact same issue myself yesterday; I discovered that xp_cmdshell would not let me run any app that had a GUI, but I can run a console app just fine.

  3. #3
    Join Date
    May 2002
    Posts
    121
    That fixed it... it's just annoying that the whole app didn't run just because it couldn't draw the form. I guess i should have caught the exception and ignored it....

    Thanks!

  4. #4
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    yes, its better to use messagebox with exceptions or console write. since they are the most usefull stuffs with debuging exceptions.

    Paresh
    - Software Architect

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured