sharepoint-2007

FileNotFoundException with the SPSite constructor

淺唱寂寞╮ 提交于 2019-12-04 22:26:09
I try to instantiate an instance of SPSite on the farm server in a custom process (MyApp.exe) and I give it as parameter the whole URI ( http://mysite:80/ ). I also made sure that the account running MyApp.exe is Site Collection Administrator . However, I can't make an instance of SPSite whatever I am trying to do. It always throws a FileNotFoundException . Anyone got an idea? StackTrace: at Microsoft.SharePoint.SPSite..ctor(SPFarm farm, Uri requestUri, Boolean contextSite, SPUserToken userToken) at Microsoft.SharePoint.SPSite..ctor(String requestUrl) at MyCompanyName.Service.HelperClass

Accessing SharePoint content (list) from a WCF service

自闭症网瘾萝莉.ら 提交于 2019-12-04 19:28:56
I've written a WCF service which tries to read the list items from a particular list in SharePoint. For testing purposes I run the WCF service using Visual Studio ASP.Net Development server. I pass the Site ID to the web service and from the web service I try to open the List and read the items. But when I try to read the items I'm getting the following error - This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint

Sharepoint 2013 REST API not returning all items for a list

放肆的年华 提交于 2019-12-04 18:33:24
问题 The title states my problem quite exactly. If I try to gather all 400+ items from a list using sharepoint's REST API, I only get first 100. I have read http://msdn.microsoft.com/en-us/library/office/dn292552(v=office.15).aspx and in the "Working with list items by using REST" part, they're stating that The following example shows how to retrieve all of a list’s items. url: http://site url/_api/web/lists/GetByTitle(‘Test')/items method: GET headers: ... I have highlighted word all, because

How to query the SPView object

半世苍凉 提交于 2019-12-04 16:39:53
I have a SPView object that contains a lot of SPListItem objects (there are many fields in the view). I am only interested in one of these fields. Let's call it specialField Given that view and specialField, I want to know if a value is contained in specialField. Here is a way of doing what I want to do : String specialField = "Special Field"; String specialValue = "value"; SPList list = SPContext.Current.Site.RootWeb.Lists["My List"]; SPView view = list.Views["My View"]; //This is the view I want to query SPQuery query = new SPQuery(); query.Query = view.Query; SPListItemCollection items =

VBA SharePoint authentication for drive mapping

天大地大妈咪最大 提交于 2019-12-04 16:30:25
I've had success using VBA in Excel to map a drive to extranet SharePoint to download files, however in deployment it works in one location but not another (different environments possible). I'm curious if anyone has any insight as to what user or system setting would cause this. In the code below I try to map the drive to SharePoint, if it errors out the handler creates a new instance of excel and saves it to the SharePoint site. By nature this forces IE to open and prompt the user for their login details, once submitted it authenticates them and uploads the file. They are then able to map

Howto get SharePoint version using object model

丶灬走出姿态 提交于 2019-12-04 16:26:21
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. SPFarm.Local.BuildVersion would probably give you the same result without having to refer to a SPWebService. Cheers :) SPWebService.ContentService.Farm.BuildVersion http://msdn.microsoft

Is there a good reference SharePoint's databinding syntax?

亡梦爱人 提交于 2019-12-04 05:42:35
I'm putting asp server-controls into my SharePoint XSLT using SharePoint Designer. I've found it's really handy for pre-populating values into the form, or providing a different experience than the SharePoint defined layout (hidden fields, etc). For example, I can use a asp:TextBox control instead of the SharePoint:FormField control if I define it as such: <xsl:stylesheet ... xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"> <xsl:param name="Name" /> <xsl:template match="/"> <!-- omitted for clarity --> <asp:TextBox id="txtName" runat="server" Text="{$Name}" __designer

Restaurant review site in SharePoint

对着背影说爱祢 提交于 2019-12-04 02:07:56
问题 I'm totally new to SharePoint but my company has adopted it for internal use. As a learning exercise I thought it would be fun to create a local restaurant review site. Can anyone point me to an example or tutorial to get me started? What I have in mind is a simple site where users can enter the restaurant name, cuisine style, address, a simple 5 point rating and price scale, and a short review. Other users could search for restaurants by cuisine and add their own reviews. We have SharePoint

WCF - use without app.config

旧时模样 提交于 2019-12-03 21:56:59
问题 I have a SharePoint workflow which calls a WCF service. This works fine so long as the workflow runs under IIS and is not shifted to the Timer Service. The problem is that the Timer Service does not have access to the web.config settings it needs to setup the WCF connection from the context of the Timer Service. Could not find endpoint element with name endpointname' and contract 'servicecontractname' in the ServiceModel client configuration section I am setting up all the info WCF needs to

Sharepoint Conditional fields in Edit.aspx

匆匆过客 提交于 2019-12-03 21:32:30
I would like to display certain meta data fields in the edit form based on the value of a fields. Example: Users upload a document to the Doclib to be approved by there manager. They are allowed to change the meta data Name,Case No, Location until the item is approved by the manager. Once the item is approved I would like to set Name and Case Number to read only. What is the best way to meet this requirement? If approved = yes set Name and Case No = Read only Else do nothing. I have tried this method for about 5 hours. I believed this may be different for ModerationStatus. Might require