sharepoint2007

Start SharePoint workflow only with new file versions

I am trying to create a workflow to send an e-mail whenever a new version of a file is uploaded to a Document Library. The Document Library has lots of fields that, if updated, will create a new version of the ListItem, but I don't want to start the workflow for this cases. Only when a new version of the document is uploaded (including...

solution for RPC_E_ATTEMPTED_MULTITHREAD error caused by SPRequestContext caching SPSites?

Hi, I'm developing a solution for SharePoint 2007, and I'm using SPSecurity.RunWithElevatedPrivileges a lot, passing in UserToken of the SystemAccount. After reading http://hristopavlov.wordpress.com/2009/01/19/understanding-sharepoint-sprequest/ I finally began to understand why I get these System.Runtime.InteropServices.COMException ...

MS-Sharepoint 2007: Custom Field Control, TemplateContainer.FindControl always returns NULL

I have SharePoint 2007 on Windows Server 2003 SP1 (in VM). I am running the web application here: http://vspug.com/nicksevens/2007/08/31/create-custom-field-types-for-sharepoint/ Part of it is below: using System; using System.Collections.Generic; using System.Text; using System.Web.UI.WebControls; using Microsoft.SharePoint; u...

Use one URL in SharePoint 2007 for both Windows authenticated users and FBA?

I have an extranet site setup using FBA and aspnetdb. All works fine, but I would like my internal users to be able to access the site using the same URL as a client would from the outside (for example, so they could send them a link and just to reduce confusion as people think these are two seperate "sites"). Is this possible using Alte...

What is a proper way to store site-level global variables in a SharePoint site?

One thing that has driven me nuts about SharePoint2007 is the apparent inability to have defineable settings that apply specifically to a site or site collection itself, and not the content. I mean, you have some pre-defined settings like the Site Logo, the Site Name, and various other things, but there doesn't appear to be anywhere to a...

Sending Email Asynchronously inside a SharePoint workflow

I'm getting a weird threading issue inside a SharePoint workflow that I'd like to learn more about. I'm trying to send an email using SPUtility.SendEmail asynchronously by firing up a new thread to do it. This successfully works at the end of a workflow for a summary email. I tried doing the same to replace a task notification email but ...

SharePoint 2007: Access denied - but only in one variant. How to determine the cause?

I got a call from a user who was trying to access the English variant of our simple portal and was getting an 'Access denied' message. As it turned out, she really wanted the German version and was happy when that worked ok. I would like to find out why she was not able to access the English variant. The error message contained no furth...

SharePoint 2007 Ajax problem

I have several data-driven custom built webparts that work fine in the visual studio. Followed a blog http://gj80blogtech.blogspot.com/2010/04/configure-ajax-in-sharepoint-2007.html to the letter to incorporate AJAX as some of my webparts use update panels and tab panels. My custom web parts are listed in the web parts library and when ...

Help with error creating SharePoint list (probably due to privilege issues)

I'm getting an error when trying to activate a webpart. It activates fine in one setup , but fails in a different one. Administrator in both. Seems like it fails because it's not able to create the list. The error is: Message: Value cannot be null. Stack Trace: at Microsoft.Sharepoint.SPRoleAssignment..ctor at ClientRequestHandler.C...

Logging to TextFile from SharePoint

I'm trying to debug a webpart installed on a client's SharePoint instance. I wanted a quick and easy logging feature, so I thought of writing messages to a text file in the temp directory. SharePoint doesn't seem to like it, so what are my options? ...

how to query a survey results in sharepoint 2007?

does anyone has any experience on querying the results from a sharepoint survey? my goal is to create a webpart to display a custom graph based on the results thanks, Oscar ...

Sharepoint SSRS: Unexpected Error Encountered

We are running an intranet website hosted on Sharepoint 2007, serving reports to users via SSRS. Recently, our users are experiencing error when trying to access certain reports with the error message "An unexpected error has occurred". After trying many things, to cut a long story short we manage to temporarily solve the problem by man...

Project 2007 to 2010 upgrade error Invalid object name in Reporting database.

A little background information first. I have restored all of our Sharepoint and Project databases into a VM in it's own domain. I have successfully upgrades the Sharepoint piece with 0 errors. I have now brought up another VM and have performed the installation of Sharepoint 2010 and Project 2010, and completed the config wizard with 0 ...

Problem with sharepoint search.

Hi, I have created the Contact list. I feed proper data where required in my personal sharepoint site. Bu when I look for the specific name or any key word that present in contact list it shows message : No results matching your search were found. Check your spelling. Are the words in your query spelled correctly? Try using synonyms. ...

Making a sharepoint site (2007) read only

I am getting ready to perform a migration of SharePoint 2007 to 2010, and during the migration horus, i will want to prevent anyone form adding content anywhere, but yet I would like for people to read the content. Is there a way to make the sharepoint 2007 site read only? ...

Deleting list items via ProcessBatchData()

You can build a batch string to delete all of the items from a SharePoint list like this: 1: //create new StringBuilder 2: StringBuilder batchString= new StringBuilder(); 3: 4: //add the main text to the stringbuilder 5: batchString.Append(""); 6: 7: //add each item to the batch string and give it a command Delete 8...

Is it possible to programmatically determine the type of a SharePoint object?

I'm using the SharePoint 2007 object model API to assign a role to a SharePoint object, however when you do this, you must know the type of SharePoint object beforehand, like this: // apply the new roleassignment to the folder. You can do this at the listitem level if desired (i.e. this could be SPfile.Item…. instead of SPFolder.Item...

Accessing web.config from Sharepoint web part

I have a VS 2008 web parts project - in this project is a web.config file: something like this: <?xml version="1.0"?> <configuration> <connectionStrings/> <system.web> <appSettings> <add key="MFOwner" value="Blah" /> </appSettings> ……. In my web part I am trying to access values in the appSetting section: I've tried ...

What are some recommendations for books, when talking strictly about programming against the Object Model API for SharePoint 2007?

I've read quite few books regarding programming for SharePoint 2007, but in reading these books*, and referencing the online MSDN documentation there still seem to be large gaps/flaws/errors in what is documented, and how the API works. Is there any book about the SharePoint 2007 API that delves deeply into everything? I would think tha...

Debugging feature activation in SharePoint 2007

I have a SharePoint feature that is activated under 'Site Collection Features' that is having some issues being activated. I've activated it through the stsadm as well as the SharePoint UI, both unsuccessful. The feature toggles from deactivated to activated, but the result that should be there is not. The result is some pages that shoul...