I have two servers, One is application server which has webservice and other server is a DB server,which has SQL server 2005 DB. Webservice is a vb.net app and all the input files will be on app server. When my application calls(through webservice) DB server to execute BULK insert statement with UNC path(of app server) using Windows authentication(Integrated security) then it fails with error -
System.Data.SqlClient.SqlException: Cannot bulk load because the file "ServernameFoldernamefile1.txt" could not be opened. Operating system error code 5(error not found).
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
I m admin on both servers and webservice is running on my user credentials and also I m SA on SQL DB. SQL server is running on Local system account. I changed it to run on my User account but no luck! However the same statement works when I use SQL authentication in connectionstring.
Can anyone please shed some light on this issue.
Thanks in advance
Sai
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…