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

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

'File Attachment' compulsory

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


I would like to ask if it is possible if we can force a user to attach a document to an item. Would be possibly to use workflow that if a user attempts to change the status of a task to completed, then workflow would remind the user to add attachment before closing the task.

Is there any way of making 'File Attachment' compulsory?


View Complete Post

More Related Resource Links

Powershell script to copy a list attachment to a file

I have a script that builds a list of items.  I'd like to add the ability to download the list items' attachments to a local directory.  IS this possible?  There are lots of examples of how to add attachments but nothing that can download the attachments.  Any help would be appreciated.

how to set the file path in Attachment

I am using to send attachent from my host.. The file is located on my abc folder on my root, so it' like this: root/abc/myfile.doc Attachment attachFile = new Attachment(txtAttachmentPath.Text);   How can I assign the path in the above code?

WCF MTOM Client calling Java Webservice - Issues with File attachment Content ID encoded in SOAP mes

Hello,I'm having difficulty calling a MTOM enabled Java based web service that accepts an file as input..NET appeats to be generating a SOAP message where the reference to the binary part of the message is an encoded url.For Example:  <inc:Include href="cid:http%3A%2F%2Ftempuri.org%2F1%2F634000265217257868" xmlns:inc="http://www.w3.org/2004/08/xop/include"/>In fact, the Content ID defined in the SOAP message, looks nothing like the actual Content ID of the actual message part.Content-ID: <http://tempuri.org/1/634000265217257868=2787915398744@soapui.org>The service is invoked and executed on the java webserver...but the data element appears to be null.I do not believe the java web server understands the reference in the SOAP message because it is encoded....Or...perhaps it's because the Content-ID attribute has extract stuff on it.I'm working with a custom MTOM encoder in WCF....is there a way to generate your own Content ID or tell .NET not to encode the url?My frustration with .NET has reached an all new level with this project...Any help would be greatly appreciated.Here the SOAP message that is being generated:<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:ns="http://docs.oasis-open.org/ns/cmis/messaging/200901" xmlns:ns1="http://docs.oasis-open.org/ns/cmis/core/200901&q

How To Save Pdf File In Client's Computer For Sending As Email Attachment


Hello everybody.

The subject of this thread is my question and I am really very sorry, I cannot brief it. I have generated the pdf file which contains text taken as input by various web-form and have saved it in my local drive then sended it to some email addresses. Now I want to know that how can I save it in client computer and send it to some email addresses provided by Client on demand?

I am failed to solve this problem as I don't know how to get INFORMATION OF CLIENT'S LOCAL DRIVE AS CLIENT MAY USES DIFFERENT OPERATING SYSTEM.

Any information will be very helpful to me.

Thank you.

SharePoint 2010 Incoming Email cannot process email file attachment in email with less than sign < a


When sending an email which contains an email attachment such as "Hello <World>.msg" from Outlook to SharePoint 2010 email enabled list such as an "Announcements" list, no item is created in the list and the attached email and the orginal email are not saved.

The log file contains

09/23/2010 13:51:17.54  OWSTIMER.EXE (0x18FC)                    0x0B2C SharePoint Foundation          E-Mail                         6873 Warning  An error occurred while processing the incoming e-mail file C:\inetpub\mailroot\Drop\f17ce37101cb5b600000002a.eml. The error was: Illegal characters in path.. 9f265722-74c9-4bd8-9504-ac265f2351d7

SharePoint 2010 Incoming Email cannot process file attachment with zero size.


When sending email with attachments to SharePoint list, if one of the file attached to the email is of size 0, then none of the files will be saved and NO new item will be created in the list.

The SPEmailHandler's ProcessAttachment method should check the length of the "contentStream". If the length is 0, it should return immediately.

As you can see in the ProcessAttachment method none of the arguments are validated before they are used. This an example of poor quality code.

It should do at least

if (contentStream == null || contentStream.Length == 0) return;

if (string.IsNullOrEmpty(fileName) || item == null) return;


private static void ProcessAttachment(Stream contentStream, 

Use Attachment Control to store URL to file and not the file

I want to use the Attachment to a custom list, but I don't want to store the file I want to store the URL to the file.  I can use the Link column, but what I want the browse funtionality and I dont get that with the link column.

SharePoint Custom List Attachment to Store URL and Not a File


I need to ust the attachment column for a list, but I want to store the URL NOT the attached file.  I could use a Link Column type, but doesn't have the browse utility that the attachement column has. 

Any ideas?  I would like to store the URL and not the FILE with the browse utility

Cannot download xlsx file attachment from list using "Save Target As"


When a list item has an Excel file such as "test.xlsx" attachment, there is no way to download a copy of it. Right click the file and click "Save Target As", it asks for saving a "xlviewer.htm" file. We just want to be able to right click the file and download the file as we are doing with any other types of files.

file attachment control on infopath 2010 browser form, validating event not fired


If preview within InfoPath 2010, the validating event is fired. But After deploying the form to SharePoint 2010, the validating event does not fire.

Any ideas?


Blog: http://convergingpoint.blogspot.com/

Send Email with HTTP file attachment - Workflow is sending garbage in attachment



I'm having an issue with a customized workflow when I send an email with an attachment. I am using the "send email with http file attachment" that I have downloaded from CodePlex. Unfortunately all attachments that come through are full of garbage. This includes .jpg, .pdf, and .txt. From what I can tell with the .txt file is that its contents has been replaced with what appears to be the html of the list page. Both the .jpg and .pdf fail to open complaining about corrupt documents. All documents can be opened fine from within sharepoint. 

Can anyone of you guide me in this regard, as rest of my  workflow logic is working fine but this attachment issue is ruining the end result.


SmtpClient attachment file size limit in .Net 4.0?


I am having trouble sending any file over about 3MB as an attachment using the SmtpClient class. I have no problems with smaller files. I get an index out of range error. I founf a reference on another site that said it supposed to be a known bug with the framework 4.0. I tried to change the target framework for my dll that actually sends the email back to 2.0, but is called from a 4.0 framework website, but that did not fix it.

Does anyone know if this is a known issue and how do you find out if/when it is fixed or if there is a patch available?






Why is Infopath Form File Attachment not getting saved after submit?



VS2008 and InfoPath 2007 in Workflow

I am having an issue on an Infopath form that is for a workflow task. When I add a File Attachement to a File Attachment Control this works fine. However, when I submit the form and then go back into it I see the attachment is not there. Basicallly on a submit it is not embedding the file.

The field is called "CreativeArtwork". This Infopath field has no default, but is of type (base64). Is it getting overwritten by internal default?

Can anyone help?



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.

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.
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