470,573 Members | 1,772 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,573 developers. It's quick & easy.

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_cmdshell 'myprogram.exe' in SQL query
analyzer.

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

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

Server execution failed at WindowsApplication3.Main.ProcessInbox(String
FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents and
Settings\user1\My Documents\Visual Studio
Projects\WindowsApplication3\Main.vb:line 80

at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20


Dec 14 '06 #1
5 3228
verify account it is running under has permissions to perform this
operation.
"mike" <be*****@hotmail.comwrote in message
news:On**************@TK2MSFTNGP06.phx.gbl...
>I created a VB.NET app that uses Outlook's COM object.

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

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

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

Server execution failed at WindowsApplication3.Main.ProcessInbox(String
FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents
and Settings\user1\My Documents\Visual Studio
Projects\WindowsApplication3\Main.vb:line 80

at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20


Dec 14 '06 #2
Hi,

running in SQL QA as sysadmin

"vbnetdev" <ad***@kjmsolutions.comwrote in message
news:Ov**************@TK2MSFTNGP06.phx.gbl...
verify account it is running under has permissions to perform this
operation.
"mike" <be*****@hotmail.comwrote in message
news:On**************@TK2MSFTNGP06.phx.gbl...
>>I created a VB.NET app that uses Outlook's COM object.

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

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

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

Server execution failed at WindowsApplication3.Main.ProcessInbox(String
FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents
and Settings\user1\My Documents\Visual Studio
Projects\WindowsApplication3\Main.vb:line 80

at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20



Dec 14 '06 #3
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_cmdshell 'myprogram.exe' in SQL query
analyzer.

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

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

Server execution failed at WindowsApplication3.Main.ProcessInbox(String
FolderName, String WhichFolder, String DateTimePicker1) in C:\Documents and
Settings\user1\My Documents\Visual Studio
Projects\WindowsApplication3\Main.vb:line 80

at WindowsApplication3.Main.main() in C:\Documents and Settings\user1\My
Documents\Visual Studio Projects\WindowsApplication3\Main.vb:line 20
Dec 14 '06 #4


"mike" <be*****@hotmail.comwrote in message
news:#6**************@TK2MSFTNGP03.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

Dec 14 '06 #5
"mike" <be*****@hotmail.comwrote in
news:On**************@TK2MSFTNGP06.phx.gbl:
I created a VB.NET app that uses Outlook's COM object.

I get an error when I run master..xp_cmdshell '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:

http://support.microsoft.com/kb/237913/en-us

-- dan
Dec 14 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Matt | last post: by
1 post views Thread by Miles B | last post: by
4 posts views Thread by Chris Allison | last post: by
reply views Thread by simon | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.