.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

How to restrict access to a SharePoint Document Form Library while allowing users to fill out and su

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :C#

We have created a MS InfoPath form with it's corrsponding SharePoint Document Form Library, but would like to restrict the access to the SharePoint Document Form Library. After the user completes and submits the forms then he/she should not be able to go into the SharePoint Document Form Library and view the form. In order to allow users to fill out and submit an InfoPath form, Contributor level access is required to be granted. But Contributor level access allows them to view not only the form he/she has created but everyone else's which is not acceptable in this particluar situation. The solution we've come up with is to grant Contributor access to the SharePoint Document Form Library when the Submit button is pressed using stsadm grant the user Contibutor role. Then remove the access once the submission is completed.

We would be interested to know if there is a better process to accomplish this task. And, of equal importance, the coding that is required to execute this task.

View Complete Post

More Related Resource Links

Changing fields while updating an InfoPath Form to a SharePoint 2010 Document library

My document library has following EventReceiver: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="101"> <Receiver> <Name>EventReceiverDocumentLibraryItemUpdating</Name> <Type>ItemUpdating</Type> <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly> <Class>EventHandling.EventReceiverDocumentLibrary</Class> <SequenceNumber>10000</SequenceNumber> </Receiver> </Receivers> </Elements> Updating a browser enabled InfoPath form in the document library fires following event: Public Overrides Sub ItemUpdated(ByVal properties As SPItemEventProperties) Try Me.EventFiringEnabled = False properties.ListItem("Lastname") = "Testperson" properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = True properties.ListItem.SystemUpdate(False) ' solution 1 properties.ListItem.Update() ' solution 2 properties.ListItem.UpdateOverwriteVersion() ' solution 3 properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = False Me.EventFiringEnabled = True MyBase.ItemUpdated(properties) Catch ex As Exception Me.EventFiringEnabled = True E

Allowing internal users access to Sharepoint site externally

Good afternoon.   This may be a simple answer (I hope so actually) but I haven't been able to figure this out. What I need: I have internal users who can access my Sharepoint site easily while logged onto my network, and external users who I have added to our Active Directory system who can access the site using our external URL.  Both work fine. What I am having problems with:  One of my users (internal) is on a different AD (he is on our European network) and he can not access the site either from the VPN (when he is in the US) nor from the external site (it will take him to the logon screen, but since he doesn't have an account on our AD, it won't let him in). I understood from our European IS department that all we had to do was give him both internal and external access to the Sharepoint site, and he would be able to connect from anywhere. So, how do I do that (give him both)?  Do I need to have our IS team turn on MOSS2007 to do this (it is not turned on today). Many thanks, I am still a newb at Sharepoint, but trying to learn quickly. Thanks, Jim  

SharePoint Users Behind a Forefront TMG Server Cannot Access Explorer View in Document Libraries

SharePoint server via a Forefront TMG server in a separate sub-domain. These users cannot access Explorer View in Document Libraries nor can they map a drive to the SharePoint directory structure, as users who are in the same sub-domain as the SharePoint server can. How do I setup SharePoint and the TMG server so that these users can map a drive to the SharePoint site? Office SharePoint 2007 SP2 Windows 2008 Server SP2

can i access sharepoint 2007 'Document Library' items into WPF directly. or iwant to use any WCF o


please suggest me.

and give the proper coading..

thanks for any help

Compare InfoPath Form Field to Document Library list in SharePoint


I have an infopath form that has a field that matches values in a SharePoint List. In the SharePoint List I have two fields, One is email and the other is the field I am trying to match on. When the form is submitted I want to take that field from the form and compare it to the SharePoint list and return the email that is associated with that list item. Can this be done?? I appreciate any assistance. Thank you.

PDF form as Content Type for SharePoint Document Library


Is there any way to use PDF form (.pdf)  template as Content type for document library??

I have a pdf form template and i want to make a content type of it, so i can use it for my Document Library. I defined a new content type of it with following settings:

Select Parent Content From dropdown: Special Content Types,
    Parent Content Type Dropdown: Unknown Document Type

Under Advance Settings i uploaded the pdf form template to server. Under Document Library Settings I add this content type to it, now when i click NEW button it gives me an error message saying:

"The Document couldn't be created. The required application may not be installed properly, or the template for this document library can't be opened"

Seems like SharePoint doesn't integrate with or support Adobe Reader to open PDF form as Content Type or I am missing something there (for example: dll ).

I would really appreciate if you help me on this. Thanks


How to attach Custome Edit form to Document library using Sharepoint designer 2007



I have created lot  of costom .aspx page using  sharepoint desgner 2007 and attached to custome list successfully .   tha same  approach i followed for document library in moss 2007 . but i tried to attach that form to docment libarary  its giving error "The page you have selected does not contain a reference to the correct SharePoint list".  i ahve googled  to sort out the problem  and find out  content type should be 'Item' type. but this is document library  so  content  type is document . ther is no ther option  for Item.

Please help me to come out from this   problem.

I have created custom form using sharepoint designer 2007 .


Thanks and regards

Jandel Singh 



Users unable to access IRM protected document in the target document library. Document being transfe



Iam using SharePoint 2007 on windows server 2003 R2 and RMS Server sp2.

A user (author) uploads a document in one (source) document library. Once uploaded it is rights managed by RMS. Another user (publisher) has to publish this document at another (target) document library. RMS is enabled on both these document libraries. whenever a user (reader) tries to read the published document from target document library, he gets an error which say's he doesn't have enough privileges. Reader has read permissions on all list items in the target document library. Here are the steps I follow.

1.       A user uploads a document into source document library. A publisher downloads this rights-managed document to publish it in target document library.
2.       SharePoint generates an issuance license (IL) for this document. The IL consists of:



"New Document" button not appearing in Sharepoint InfoPath form library


I have a sharepoint 2007 site that is accessed via 2 different urls.

  • http://inside network URL
  • https://outside network URL

When I browse the outside url and navigate to the InfoPath form library I created, I don't see the "New Document" button. If I browse to the same library using the Internal URL, the button appears as expected. what do I need to do to get the button to display?

I thought it might be a permissions issue because users need "contribute" in order to create a "New" instance of the form. I checked the permissions from the outside URL and everything seems correct.  

Externally, the site uses an ISA server and Forms Authentication to authenticate visitors via https, Windows server 2008 and the Sharepoint Moss 2007 backend.



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.

IE closing when user try to access the document library

<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} --> IE closing (crashing) when user try to access the document library in share point site.  here we are using WSS2.0.  this problem for not accursed all the users , this problem happening on some users. 

Can I open the "new" menu in a SharePoint Document Library using Dragon NaturallySpeaking?


When a user, who uses Dragon NaturallySpeaking, says "new" when viewing a Document Library the default content type is selected and the associated application (e.g. Microsoft Word) is launched. This scenario is okay for Content Type selection since the Microsoft Office applications will prompt for the metadata once the file is saved.

If the user needs to create new folders in the Document Library however they need to expand the "new" dropdown menu.

What is the best way for someone using Dragon NaturallySpeaking to expand the "new" menu for a Document Library in SharePoint?

File Attachments from info-path forms to Sharepoint document library


Hi Experts,

How to upload file attachements from info-path forms to Sharepoint document library?

I need to add attachement from local-PC/Any User to Sharepoint Document Library.


Any help please?? Appreciated




How to restrict folder access to users and theirs only


Hi. I created a web application using "Forms Authentication". 

There is a folder name "uploads", and it creates subfolders as username when they register. Web application stores users' files and images under their folder ("uploads/username")

I tried to find a way to restrict users to download and upload files to their folder only and couldn't find a good one. 

Then I came up with this idea that stores "web.config" file each time user registers and the web.config should look like below. Username will be changed dynamically according to username.

This method actually works but I am little worried if this is a good practice as far as performance wise. Because it'll create web.config files as many as users and there might be other holes that I don't recognize. 

I appreciate any advice or better suggestion for this problem.

--------web.config in "/Root/uploads/username directory"--------------

<location path="HRpages">

Infopath Brower enabled form not visible in the sharepoint library after being submitted

Hi, I have created a infopath browser enabled form to submit to a sharepoint form library, however the submitted forms are not visible in the sharepoint link structure.   I'm able to see them in the SPD structure.  I'm using infopath 2007 and MOSS. I actually created a SPD workflow which retrieves specific values from the submitted form and saves it to another sharepoint list. This works fine even if the forms are not visible. Appreciate any help. Thanks

InfoPath Form not showing up in Sharepoint Form Library

I have set up a template form setup that users can fill out and then by pressing the submit button sends an email.My current issue is, when I publish the form to sharepoint, I don't see it, I have sharepoint set to view all documents and I still don't see it.  I can get to the form by clicking the "view my form in browser" pop up after I'm done publishing it.  I would like the users to just be able to click on a link in the library, but I can't find where it was published.Any insight on this would be great thanks.

Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

Hi, Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :( I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.
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