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

  • Home
  • SEARCH
  • 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 7553873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:10:55+00:00 2026-05-30T11:10:55+00:00

I need a solution that creates an InfoPath instance form from an XSN template

  • 0

I need a solution that creates an InfoPath instance form from an XSN template that exists on a SharePoint server, I am using this approach but this extracts template files on temp directory of server that we may not have write permission to. Is there better solution for this?

  • 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-05-30T11:10:57+00:00Added an answer on May 30, 2026 at 11:10 am

    You just change the CAB-library, to one that can extract the template file to memory, as this one,

    Minimum C# code to extract from .CAB archives or InfoPath XSN files, in memory

    And then call, myCab.ExtractFile("template.xml", out buffer, out bufferLen);

    the complete code would look something like

    private byte[] GetXmlForm(SPDocumentLibrary list) {
      byte[] data = null;
      SPFile file = list.ParentWeb.GetFile(list.DocumentTemplateUrl);
    
    
      Stream fs = file.OpenBinaryStream();
      try {
        data = new byte[fs.Length];
        fs.Read(data, 0, data.Length);
      } finally {
        fs.Close();
      }
    
      byte[] buffer;
      int bufferLen;  
      CabExtract cab = new CabExtract(data);
      cab.ExtractFile("template.xml", out buffer, out bufferLen);
    
      return buffer;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Folks, I need a solution that allows drag-and-drop cell over the table. The cells
I have a solution that is missing a lot of code coverage. I need
i have a big solution containing that much projects..i need to find a specific
I need to add a C# solution with examples that would be distributed as
I need a solution to read raw binary from any filetype stored on a
I am using a rails helper that creates 3 select lists for the purpose
We need a cross platform solution for compressing files. Our server runs on Windows
I have a server application that runs in a hosted environment but creates print
I need a solution to export a dataset to an excel file without any
I need a solution where a user could enter the URL of a web

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.