November 4, 2009 at 3:31 am
Hi All,
We have a clinet that wants us to send him his files directly to his Web-Folder.
the desired web-folder sits in an HTTPS protocole server.
is there any way i can upload files to such a webfolder directly from SSIS flow (using script component maybe... ?).
i did try connect to the webfolder fusing the script component with the following method:
Public Sub Main()
Dim WebConnection As New WebClient()
Dim ConnectionString As String
Dim creds As New NetworkCredential("Username", "Password")
ConnectionString = "https://Web-Folder/DataFolder"
Try
With WebConnection
.BaseAddress = ConnectionString
.Credentials = creds
End With
Catch ex As Exception
Dts.Events.FireError(0, "Problem connecting to website: ", ex.Message, "", 0)
End Try
Try
With WebConnection.UploadFile(ConnectionString, "c:\temp\tmp.csv")
End With
Catch ex As Exception
Dts.Events.FireError(0, "Problem uploading file: ", ex.Message, "", 0)
End Try
End Sub
i get an "Unauthorized" error.
i guess that this does not supports HTTPS protocol.
anyone?????....
Thanks in advance.
November 5, 2009 at 4:17 am
Most likely, you don't have permission or the web server isn't configured to accept uploads. I'd check your credentials are correct and ask your client to verify that web server can accept uploads. Let us know how you get on.
HTH
Kindest Regards,
Frank Bazan
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply