vb.net app error when running in master..xp_cmdshell

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mike

    vb.net app error when running in master..xp_cmdshell

    I created a VB.NET app that uses Outlook's COM object.

    I get an error when I run master..xp_cmds hell 'myprogram.exe' in SQL query
    analyzer.



    The error occurs on this line "oOutlook = New Outlook.Applica tion"



    Unhandled Exception: System.Runtime. InteropServices .COMException
    (0x80080005):



    Server execution failed at WindowsApplicat ion3.Main.Proce ssInbox(String
    FolderName, String WhichFolder, String DateTimePicker1 ) in C:\Documents and
    Settings\user1\ My Documents\Visua l Studio
    Projects\Window sApplication3\M ain.vb:line 80

    at WindowsApplicat ion3.Main.main( ) in C:\Documents and Settings\user1\ My
    Documents\Visua l Studio Projects\Window sApplication3\M ain.vb:line 20




  • vbnetdev

    #2
    Re: vb.net app error when running in master..xp_cmds hell

    verify account it is running under has permissions to perform this
    operation.


    "mike" <bethere@hotmai l.comwrote in message
    news:On9oBZxHHH A.1264@TK2MSFTN GP06.phx.gbl...
    >I created a VB.NET app that uses Outlook's COM object.
    >
    I get an error when I run master..xp_cmds hell 'myprogram.exe' in SQL query
    analyzer.
    >
    >
    >
    The error occurs on this line "oOutlook = New Outlook.Applica tion"
    >
    >
    >
    Unhandled Exception: System.Runtime. InteropServices .COMException
    (0x80080005):
    >
    >
    >
    Server execution failed at WindowsApplicat ion3.Main.Proce ssInbox(String
    FolderName, String WhichFolder, String DateTimePicker1 ) in C:\Documents
    and Settings\user1\ My Documents\Visua l Studio
    Projects\Window sApplication3\M ain.vb:line 80
    >
    at WindowsApplicat ion3.Main.main( ) in C:\Documents and Settings\user1\ My
    Documents\Visua l Studio Projects\Window sApplication3\M ain.vb:line 20
    >
    >
    >
    >

    Comment

    • mike

      #3
      Re: vb.net app error when running in master..xp_cmds hell

      Hi,

      running in SQL QA as sysadmin

      "vbnetdev" <admin@kjmsolut ions.comwrote in message
      news:OvdTzCyHHH A.1008@TK2MSFTN GP06.phx.gbl...
      verify account it is running under has permissions to perform this
      operation.
      >
      >
      "mike" <bethere@hotmai l.comwrote in message
      news:On9oBZxHHH A.1264@TK2MSFTN GP06.phx.gbl...
      >>I created a VB.NET app that uses Outlook's COM object.
      >>
      >I get an error when I run master..xp_cmds hell 'myprogram.exe' in SQL
      >query analyzer.
      >>
      >>
      >>
      >The error occurs on this line "oOutlook = New Outlook.Applica tion"
      >>
      >>
      >>
      >Unhandled Exception: System.Runtime. InteropServices .COMException
      >(0x80080005) :
      >>
      >>
      >>
      >Server execution failed at WindowsApplicat ion3.Main.Proce ssInbox(String
      >FolderName, String WhichFolder, String DateTimePicker1 ) in C:\Documents
      >and Settings\user1\ My Documents\Visua l Studio
      >Projects\Windo wsApplication3\ Main.vb:line 80
      >>
      >at WindowsApplicat ion3.Main.main( ) in C:\Documents and Settings\user1\ My
      >Documents\Visu al Studio Projects\Window sApplication3\M ain.vb:line 20
      >>
      >>
      >>
      >>
      >
      >

      Comment

      • aaron.kempf@gmail.com

        #4
        Re: vb.net app error when running in master..xp_cmds hell

        WTF are you trying to do?

        send mail? make an appointment?

        using the outlook object model is just ridiculous I think

        -Aaron


        mike wrote:
        I created a VB.NET app that uses Outlook's COM object.
        >
        I get an error when I run master..xp_cmds hell 'myprogram.exe' in SQL query
        analyzer.
        >
        >
        >
        The error occurs on this line "oOutlook = New Outlook.Applica tion"
        >
        >
        >
        Unhandled Exception: System.Runtime. InteropServices .COMException
        (0x80080005):
        >
        >
        >
        Server execution failed at WindowsApplicat ion3.Main.Proce ssInbox(String
        FolderName, String WhichFolder, String DateTimePicker1 ) in C:\Documents and
        Settings\user1\ My Documents\Visua l Studio
        Projects\Window sApplication3\M ain.vb:line 80
        >
        at WindowsApplicat ion3.Main.main( ) in C:\Documents and Settings\user1\ My
        Documents\Visua l Studio Projects\Window sApplication3\M ain.vb:line 20

        Comment

        • David Browne

          #5
          Re: vb.net app error when running in master..xp_cmds hell



          "mike" <bethere@hotmai l.comwrote in message
          news:#67tZMyHHH A.4760@TK2MSFTN GP03.phx.gbl...
          Hi,
          >
          running in SQL QA as sysadmin
          >
          sysadmin is a SQL Server Server Role. xp_cmdshell spawns processes using
          the windows identity of the service account. That's the relevant security
          principal to check.

          David

          Comment

          • Dan Mitchell

            #6
            Re: vb.net app error when running in master..xp_cmds hell

            "mike" <bethere@hotmai l.comwrote in
            news:On9oBZxHHH A.1264@TK2MSFTN GP06.phx.gbl:
            I created a VB.NET app that uses Outlook's COM object.
            >
            I get an error when I run master..xp_cmds hell 'myprogram.exe' in SQL
            query analyzer.
            I don't know enough about SQL server to be sure here, but is this trying
            to run Outlook from the SQL server process itself? If so, then you
            probably can't do it:



            -- dan

            Comment

            Working...