sharepoint-2007

User added\deleted event in sharepoint

孤街浪徒 提交于 2019-12-23 01:46:14
问题 How can i know when a user is added (or deleted) to a sharepoint site or to a group in a sharepoint site? I tried to attach an SPItemEventReceiver on the user information list, but the main problem is that i can't know when a user is added (removed) from a group... What is the best approach to do that?? noting that i'm using it for licensing purpose and i want to know when the number of users in a specific group passed the maximum of the allowed number. 回答1: This is an unexpected pain to

Sharepoint Workflow Fails When First Run But Succeeds When Run Manually

▼魔方 西西 提交于 2019-12-22 11:29:26
问题 We are using an infopath form that when submitted is supposed to fire off a custom .NET workflow. Basically, the information within the form is used to create a new sharepoint site. What I am seeing happen is that the first time the workflow runs (which is automatic after the form is submitted), the workflow errors out. When I run the workflow manually immediately after it fails, the workflow runs fine. this.workflowProperties.Item["Client Name"] I've debugged the issue down to the above line

How can you hook a SharePoint 2007 feature into the Application_Start of a site?

ぃ、小莉子 提交于 2019-12-22 06:33:58
问题 I was wondering if there is a good way to hook into the Application_Start of a SharePoint 2007 site when developing a feature? I know I can directly edit the Global.asax file in the site root, but is there a way to do this so that it gets deployed with the feature? Thanks! 回答1: This is actually possible, but it doesn't involve the Global.asax file. Many of Microsoft's examples demonstrate wiring code in via the Global.asax, but this is not a best-practices approach when it comes to SharePoint

Howto get SharePoint version using object model

旧巷老猫 提交于 2019-12-21 21:38:34
问题 With WSSv2 (SharePoint 2003) you could get the version of SharePoint you were working with e.g. SPGloablAdmin.Version gives you "12.0.0.6219" for WSSv3 SP1 However its now obsolete (although still works). Does anyone know the WSSv3 (SharePoint 2007) equivalent? You have things like SPWebService.ContentService.Version but that version number is just a timestamp and doesn't seem to relate back to build versions. 回答1: SPFarm.Local.BuildVersion would probably give you the same result without

How to query data in SharePoint from multiple lists

跟風遠走 提交于 2019-12-21 20:38:07
问题 I have multiple SharePoint lists and want to display data from them on to a gridview control. Please guide me. Grace 回答1: Two options that I can think of: SPSiteDataQuery Set up a search scope, metadata, and then query your Scope using Enterprise Search SQL and FullTextSqlQuery 回答2: Your question inspired me to develop a web part that demonstrates: How to query SharePoint data in the many ways offered by the API, and How to bind it to a grid view. It can be found on CodePlex here. Some of it

Could not load Assembly 'Microsoft.Office.Server.Search'

十年热恋 提交于 2019-12-21 12:33:53
问题 I have got following error: "Could not load file or assembly 'Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. An attempt was made to load a program with an incorrect format." Does anybody know solution for this? or Does anybody gonn through this error? Any input greatly appretiated? 回答1: its too late to answer this question, anyway, just for any other who face the same issue, make sure that you are targeting "X64"

How to get list of all document libraries from sharepoint site programatically

对着背影说爱祢 提交于 2019-12-21 05:36:09
问题 I am using below code which gives me both list & document library; but I am trying to get list of only document libraries. Please help me how to differentiate list & document library programatically using(SPSite oSite = new SPSite("https://server/site")) { using (SPWeb oWeb = oSite.OpenWeb()) { SPListCollection oLists = oWeb.Lists; foreach (SPList olist in oLists) { Response.Write(olist.Title+"<br>"); } } } 回答1: See this Post Try this ways : using(SPSite oSite = new SPSite("https://server

How is SharePoint perceived in your company? [closed]

让人想犯罪 __ 提交于 2019-12-20 09:35:06
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . UPDATE An interesting time to revisit this question. Is perception still the same now that SharePoint 2010 is beginning to take hold?

solution for RPC_E_ATTEMPTED_MULTITHREAD error caused by SPRequestContext caching SPSites?

纵饮孤独 提交于 2019-12-20 05:35:28
问题 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 (0x80010102): Attempted to make calls on more than one thread in single threaded mode. (Exception from HRESULT: 0x80010102 (RPC_E_ATTEMPTED_MULTITHREAD)) errors,

Open a web folder (Sharepoint 2007)through openFileDialog

旧时模样 提交于 2019-12-20 04:13:42
问题 I have the following snippet of code written in C#: openFileDialog1.InitialDirectory = "\\\\fwm-storage\\users\\" + curUser + "\\My Documents\\My Pictures"; openFileDialog1.Filter = "All Files (*.*)|*.*|Images (*.jpg)|*.jpg"; openFileDialog1.FilterIndex = 2; // blah, blah, blah Which works great and all, but, I want to be able to add/change the ability to have the openFileDialog.InitialDirectory be a web folder on our SharePoint server. Say, for example: "http:\intranet\company\division