.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Provision a File using Features

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :SharePoint

Using MOSS 2007

I wanted to upload files during feature activation.


<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
        <ElementManifest Location="element.xml" />

       <ElementFile Location="Images\images1.png" />
       <ElementFile Location="Images\mysubfolder\images2.jpg" />



<Elements xmlns="http://schemas.microsoft.com/sharepoint/">

<Module Name="mysubfolder1" Url="PublishingImages/mysubfolder">
    <File Url="image2.jpg" Name="image2.jpg" Type="GhostableInLibrary" />

<Module Name="Images" Url="PublishingImages" Path="Images" RootWebOnly="TRUE">
    <File Url="image1.png" Name="image1.png" Type="Ghostabl

View Complete Post

More Related Resource Links

web service - xml file provision


i have created a web service that has various methods allowing a client to input product IDs to retrieve information in XML format.

the XML file gets saved to the root directory at the moment so the client will need to know the xml file name to get it via the URL.

is there a way i can prompt a download of the file when they invoke the method or display it in the browser ?

thanks for any help

Error occurred in deployment step 'Activate Features': Invalid file name


While deploying a sharepoint solution I'm getting the follwing error:

Error occurred in deployment step 'Activate Features': Invalid file name.The file name you specified could not be used.  It may be the name of an existing file or directory, or you may not have permission to access the file.

How to find which file is causing this error?

File Splitter in .Net

I love to do utility programs in .Net. And this is one of them. As I was playing with JSplit (a free file splitter program), I wondered if I could do it in .Net. The framework supports file operations like reading files in bytes and creating them. It is indeed easy to do file operations in .Net Basics on File operations

Upload Multiple File using JQuery in asp.net

In this article I have explained how to upload multiple files using file upload control. I have used jQuery plugin for uploading multiple files.

I have also explained how to check for file type, file maximum size limit using jQuery & also using server side validation code.

New Language features in .NET4.0

The site explains the new features and enhancement to VB.NET and C# in .NET framework 4.0. The new enhancements are described in detail with examples and code snippets. One can easily understand the new features from this site. This is a must visit site for every .NET professional.

C# 3.0 new Features - Part 1

This article give you a brief description on the new features of C# 3.0 and make our life easier.

C# 3.0 new Features - Part 2

This articles describes the importance of Lambda Expressions.
This will reduce number of steps of code writing.

Short Overview of SharePoint Features in Visual Studio 2010

As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

New Features in Windows SharePoint Services 3.0

Windows SharePoint Services 3.0 (WSS 3.0) is the next version of WSS 2.0, released on 2007, and Microsoft Office SharePoint Server 2007 (MOSS 2007) is built on top of this. Windows SharePoint Services 3.0 takes full advantage of Microsoft ASP.NET 2.0 and the core Microsoft .NET 2.0 runtime. WSS 3.0 offers a lot of new features and programmability support. I have consolidated a list of new features and enhancements in the below section:

Creating Excel file from C#

I used below coding for create a excel sheet.I got from on web site.
In below coding there is no problem.Its create the excel file.If i run second time,its ask to overwrite the current excel file.If I said "Yes" then it ok ,but If I select cancel button,its generate the Error message.The exception is

Upload a File to a SharePoint Document Library - Part I

The following helper class demonstrates a few techniques that allow documents to be uploaded to a SharePoint document library programmatically without using the API or a custom web service. You don't need to specify a document library name, and it will create any folders specified in the URL as required. File meta data will be updated if any properties are passed.

Feature available to Silverlight 4 with VS 2010.

In Part I of this article series we have seen some features available to Silverlight 4 with VS 2010. We will continue to explore more in this article.

SmtpClient and Locked File Attachments

Got a note a couple of days ago from a client using one of my generic routines that wraps SmtpClient. Apparently whenever a file has been attached to a message and emailed with SmtpClient the file remains locked after the message has been sent. Oddly this particular issue hasn't cropped up before for me although these routines are in use in a number of applications I've built.

How to call an .exe file in .net

Sometimes a developer has to call an EXE from another EXE. While calling EXE there can be a requirement to pass parameter.

ClientAccessPolicy file in SharePoint 2010

I am upgrading my Silverlight demo code from the old beta to beta 2 and see that there are a few new considerations for the deployment of ClientAccessPolicy.xml files. In a previous post I demonstrated how to do this for SharePoint 2007. The heartburn that I get with that approach is any site collection owner or designer can drag the file into the site collection and open the site up to unwanted client access issues. In 2010 the virtual path provider no longer serves the files from the root of the site collection

Multi File Upload Using JQuery!

Everyone knows about the file upload in .NET. But the multi file upload is some what difficult in .NET. For that purpose we can have some AJAX or JQuery!. Jquery is the latest advanced version. It will give some animated upload. You can try it for your own!!!!

C# 2.0 Features

Total C# 2.0 Features Was Explained In a Step By Step Manner
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend