Download a web page using SSIS


Everyone is playing with web everyday. But for the programmer everyday means millions of web pages adding into web zone. So, we have a lot of resources and if we need some thing from web then we just open web browser and type the URL and download necessary information.

Think about a scenario, we need to download a webpage daily from a website using constant URL.

Here is the SSIS that can help you to achieve this task.

Implementation

Step 1: create a SSIS package

Step 2: Add HTTP connection in connection manager and provide the URL your wish to download

 

 

 

 

 

 

Step 3: Add Script Task component and paste the below given code in it

‘connecting website using HTTP connection manager
Dim nativeObject As Object = Dts.Connections(“HTTP Connection Manager”).AcquireConnection(Nothing)

‘ Create a new HTTP client connection
Dim connection As New HttpClientConnection(nativeObject)

‘Download the html page to your local drive
connection.DownloadFile(“<Drive>:\testing\Bing.html”, True)

Step 4: Execute package and look for Bing.html file in path you have given in the DowndloadFile function

Thanks for reading. Enjoy your download.

About these ads

About Ayyappan Thangaraj

Technology is my passion.
This entry was posted in SSIS and tagged , , , , , . Bookmark the permalink.

One Response to Download a web page using SSIS

  1. Pingback: Link Resource # 38: Dec 27 – Dec 30 « Dactylonomy of Web Resource

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s