Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8607319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:19:30+00:00 2026-06-12T03:19:30+00:00

I am trying to create an SSIS package that gets a folder tree structure

  • 0

I am trying to create an SSIS package that gets a folder tree structure from a remote SQL DB and recreates that structure in a document library in Sharepoint.

I tried to (hard) code a Script Task to create just one folder but I’m getting this error:
http://img856.imageshack.us/img856/1386/helpel.png

After running only a part of this script:

Microsoft.Sharepoint.Client.dll
Microsoft.Sharepoint.Client.Runtime.dll

public void Main()
    {
        ClientContext clientContext = new ClientContext("http://spdemo.example.com/");
        clientContext.Credentials = new System.Net.NetworkCredential("admin", "password", "SPDEMO");
        Web rootWeb = clientContext.Web;

        Dts.TaskResult = (int)ScriptResults.Success;
    }

I’ve scoured the internet for solutions, but haven’t found something that works for me.

So basically i need to find out how to:

  1. create a folder
  2. populate it with sub-folders
  3. Copy files in bitestreams from SQL to Sharepoint, all in SSIS

Thanks in advance!
Regards,
Vlad Ardelean

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:19:32+00:00Added an answer on June 12, 2026 at 3:19 am

    After some research I found out that in order to reference a DLL in a SSIS Script Task it first has to be strong named

    Instead, I have found an easier way to create folders and upload files:

    public void CreateFolder(string url)
        {
            HttpWebRequest request = (System.Net.HttpWebRequest)HttpWebRequest.Create(url);
            request.Credentials = new NetworkCredential(user, pass);
            request.Method = "MKCOL";
            HttpWebResponse response = (System.Net.HttpWebResponse)request.GetResponse();
            response.Close();
        }
    
    public void UploadDocument(byte[] file, string destinationName)
        {
            byte[] buffer = file;
    
            WebRequest request = WebRequest.Create(destinationName);
            request.Credentials = new System.Net.NetworkCredential(user, pass);
            request.Method = "PUT";
            request.ContentLength = buffer.Length;
    
            BinaryWriter writer = new BinaryWriter(request.GetRequestStream());
            writer.Write(buffer, 0, buffer.Length);
            writer.Close();
    
            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
            response.Close();
        }
    

    url : represents the url path of the folder you want to create

    http://spsite.host.com/DocLib/FolderToCreate
    

    destinationName: path + document name

    http://spsite.host.com/DocLib/FolderToCreate/DocToCreate.docx
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create an SSIS package that queries data from a table,
I am trying to create a SSIS package that will import Excel data to
I'm trying to create an SSIS package to move data from an Excel spreadsheet
I have an SSIS package that exports data from a table on a SQL
I'm working with a SSIS package that takes data from SQL Server and creates
I am trying to create a new library (.dll) for use in my SSIS
Is it possible to run an SSIS package from a sql server agent job
I'm new to SSIS and trying to create a dataflow task that will accomplish
Using SQL Server 2005 and Visual Studio 2005, I'm trying to create a SSIS
I am trying to create an SSIS package with BIDS 2008 withsome of application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.