Home > Archive > MS SQL XML > May 2005 > SqlXml Bulk Load Error: COMException (0x80004005)









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SqlXml Bulk Load Error: COMException (0x80004005)
LvBohemian

2005-05-01, 3:25 am

SqlXml Bulk Load Error: System.Runtime.InteropServices.COMException
(0x80004005): Error connecting to the data source.

This is raised calling the following snippet, when the sql server is local
and the web app is local no problem when IIS & SQL on different boxes same
domain... COMException...

Suggestions?

Thanks in advance.

<snip>
// Create new bulk load object SQLXMLBulkLoad3Class

SQLXMLBULKLOADLib. SQLXMLBulkLoad3Class
objXBL = new
SQLXMLBULKLOADLib. SQLXMLBulkLoad3Class
();
// Set connection string
objXBL.ConnectionString =
" Provider=sqloledb;se
rver=A2kSqlServer;da
tabase=northwind;int
egrated
security=sspi";
// Set log file
objXBL.ErrorLogFile = "C:\\XmlData\\SqlXml.err";
// Set keep identity to false, this will let the database handle the
identity inserts...
objXBL.KeepIdentity = false;
// Execute bulk load
objXBL.Execute(" C:\\XmlData\\Shipper
s.xdr", " C:\\XmlData\\Shipper
s.xml");
</snip>


LvBohemian

2005-05-04, 3:24 am

Still looking for some help on this one, I can make the code work in
vbscript, a console app and a web app as long as the sql server & the IIS web
server are on the same box, when I try to run the code with IIS and SQL
Server on separate boxes, but still on same domain I get "SqlXml Bulk Load
Error: COMException (0x80004005)"

Thanks in advance.

Graeme Malcolm

2005-05-05, 7:24 am

This is a stab in the dark, but it sounds like it might be a delegation
problem. Are the IIS server computer and the Web application service account
trusted for delegation?

--
Graeme Malcolm
Principal Technologist
Content Master
- a member of CM Group Ltd.
www.contentmaster.com


"LvBohemian" < LvBohemian@discussio
ns.microsoft.com> wrote in message
news:E866CD7C-6AE7-4D01-8CCA- C6CD9445B77C@microso
ft.com...
Still looking for some help on this one, I can make the code work in
vbscript, a console app and a web app as long as the sql server & the IIS
web
server are on the same box, when I try to run the code with IIS and SQL
Server on separate boxes, but still on same domain I get "SqlXml Bulk Load
Error: COMException (0x80004005)"

Thanks in advance.


LvBohemian

2005-05-05, 7:24 am

Neither the IIS Computer itself nor the account it is using are setup for any
specific delegation, I created an Service account which has log on as a
service and a batch job for the domain that both the sql server & web server
are on, gave that account access to the applicable database from within sql
server. In the web config of the web app I am using the identity tag thus:
<identity impersonate="true" userName="domain\account" password="password"/>
for proof of concept once working then I will go with the encrypted version
using aspnet_setreg.exe:
<identity>
userName=" registry:HKLM\Softwa
re\AspNetIdentity,Na
me"
password=" registry:HKLM\Softwa
re\AspNetIdentity,Pw
d"
</identity>

If I use same account on a box with both a web server and a sql server on it
it works...

What delegation rights do you think the web server & or account it is using
might need?

Thanks in advance.

Graeme Malcolm

2005-05-05, 9:23 am

I'm no expert in this area, but I've seen similar symptoms to what you
describe that were resolved by setting the "Trusted for Delegation" group
policy setting. See
http://msdn.microsoft.com/library/d...-us/gp/538.asp.

Of course, it might be completely unrelated - sorry not to be more definite!

--
Graeme Malcolm
Principal Technologist
Content Master
- a member of CM Group Ltd.
www.contentmaster.com


"LvBohemian" < LvBohemian@discussio
ns.microsoft.com> wrote in message
news:CDFC776F-6F83-40AF-A3E2- 7D11D7CDB3D6@microso
ft.com...
Neither the IIS Computer itself nor the account it is using are setup for
any
specific delegation, I created an Service account which has log on as a
service and a batch job for the domain that both the sql server & web server
are on, gave that account access to the applicable database from within sql
server. In the web config of the web app I am using the identity tag thus:
<identity impersonate="true" userName="domain\account" password="password"/>
for proof of concept once working then I will go with the encrypted version
using aspnet_setreg.exe:
<identity>
userName=" registry:HKLM\Softwa
re\AspNetIdentity,Na
me"
password=" registry:HKLM\Softwa
re\AspNetIdentity,Pw
d"
</identity>

If I use same account on a box with both a web server and a sql server on it
it works...

What delegation rights do you think the web server & or account it is using
might need?

Thanks in advance.


Graeme Malcolm

2005-05-05, 9:23 am

Oops - meant to paste this link:
http://msdn.microsoft.com/library/d...ml/secmod19.asp

--
Graeme Malcolm
Principal Technologist
Content Master
- a member of CM Group Ltd.
www.contentmaster.com


"Graeme Malcolm" <graemem_cm@hotmail.com> wrote in message
news:u8xMSSXUFHA.1152@tk2msftngp13.phx.gbl...
I'm no expert in this area, but I've seen similar symptoms to what you
describe that were resolved by setting the "Trusted for Delegation" group
policy setting. See
http://msdn.microsoft.com/library/d...-us/gp/538.asp.

Of course, it might be completely unrelated - sorry not to be more definite!

--
Graeme Malcolm
Principal Technologist
Content Master
- a member of CM Group Ltd.
www.contentmaster.com


"LvBohemian" < LvBohemian@discussio
ns.microsoft.com> wrote in message
news:CDFC776F-6F83-40AF-A3E2- 7D11D7CDB3D6@microso
ft.com...
Neither the IIS Computer itself nor the account it is using are setup for
any
specific delegation, I created an Service account which has log on as a
service and a batch job for the domain that both the sql server & web server
are on, gave that account access to the applicable database from within sql
server. In the web config of the web app I am using the identity tag thus:
<identity impersonate="true" userName="domain\account" password="password"/>
for proof of concept once working then I will go with the encrypted version
using aspnet_setreg.exe:
<identity>
userName=" registry:HKLM\Softwa
re\AspNetIdentity,Na
me"
password=" registry:HKLM\Softwa
re\AspNetIdentity,Pw
d"
</identity>

If I use same account on a box with both a web server and a sql server on it
it works...

What delegation rights do you think the web server & or account it is using
might need?

Thanks in advance.



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com