Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Increase timeout on VB.NET script task

Author  Topic 

Constraint Violating Yak Guru

442 Posts

Posted - 2015-03-12 : 11:52:26
Hello, I am trying to increase the timeout on a VB.NET script task to 5 minutes. The code below calls a simple web service via the task.

Could someone help me out?

Imports System
Imports System.Data
Imports System.Math
Imports System.Collections.Generic
Imports System.Net
Imports System.Net.Security
Imports System.Text
Imports System.Web.Script.Serialization
Imports Microsoft.SqlServer.Dts.Runtime

Public Class ScriptMain
Public Sub Main()
Dim url As String = ""
Dim userName As String = "test"
Dim password As String = "test"
Dim crmContactsWebClient As New WebClient()
Dim httpCredentialCache As New CredentialCache()
Dim basicNetworkCredential As New NetworkCredential(userName, password)
httpCredentialCache.Add(New Uri(url), "Basic", basicNetworkCredential)
crmContactsWebClient.Credentials = httpCredentialCache
Dim postData(0) As Byte
Dim responseData() As Byte = crmContactsWebClient.UploadData(url, postData)
Dim response As String = Encoding.UTF8.GetString(responseData)
Dim jsonJavaScriptSerializer As New JavaScriptSerializer()
Dim responseJSON As Dictionary(Of String, Object) = jsonJavaScriptSerializer.Deserialize(Of Dictionary(Of String, Object))(response)
Dts.TaskResult = Dts.Results.Success
End Sub
End Class

Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-03-12 : 12:23:00
This doesn't look like an SSIS question!

Anyway, check this out:

It's C# but should be easily translatable to VB
Go to Top of Page

Constraint Violating Yak Guru

442 Posts

Posted - 2015-03-12 : 13:01:48
Thanks, I will check out the link. I did not know if there was something that could have been set on the Script Task properties. Similar to the timeout field on a SQL Data Connection.

Appreciate the help though.
Go to Top of Page

- Advertisement -