SharePoint 2007

Configurting BizTalk WS Adapter with ISAPI redirects work-around.

We recently encounted a problem trying to configure the BizTalk WS Adapters in our production environment and we were at a stand still until we ran into the below posted link that helped us rolling out our project to the production environment... We received the below error message when we tried to configure the Windows sharepoint services adapter on a Load balanced Windows Server 2003 Environment. "Error encoutered while querying virtual server state for URL: http//myserver/. Make sure the site ......

Ajax Enabled Webparts in MOSS: Work Arounds

Error Message: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request. Solution: Disabled the view state for control. this.[ControlName].EnableVi... = false; Error Message: Script controls may not be registered before ......

Export HTML Table to Excel with JS

<html xmlns="http://www.w3.org/19... runat="server"> <script Language="javascript"> function TableToExcel() { var strCopy = document.getElementById("de... window.clipboardData.setDat... strCopy); var objExcel = new ActiveXObject("Excel.Applic... objExcel.visible = true; var objWorkbook = objExcel.Workbooks.Add; var objWorksheet = objWorkbook.Worksheets(1); objWorksheet.Paste; } function exportToExcel() { var oExcel = new ActiveXObject("Excel.Applic... ......

How to assign an exiting SharePoint group to a site using the SharePoint object model?

The below code demonstrates how you can assign a SharePoint Group to a SharePoint site using the SharePoint object model. SPSite spsite = new SPSite("Site_Name"); try { using (SPWeb web = spsite.OpenWeb()) { web.AllowUnsafeUpdates = true; SPGroup sgrp = web.SiteGroups["Group_Name"]; SPRoleDefinition roleDefinition = web.RoleDefinitions.GetByTy... SPRoleAssignment roleAssignment = new SPRoleAssignment((SPPrincip... roleAssignment.RoleDefiniti... ......

CAML Query Utility by U2U

This is a great utility which i have used countless times to generate CAML Queries.

Enjoy....

http://www.u2u.net/res/Tools/CamlQueryBuilder.aspx

Anonymous Access

We had a issue with Anonymous Access in our production environment. Each time a user would go to that list information there would be prompted to login. We followed the the step below to get around it... List Permission Settings 1. Stsadm -o deactivatefeature -url http://site.url.name -filename ViewFormPagesLockdown\featu... 2. Break the inheritance for the list 3. Uncheck the anonymous access for the list and save 4. Reapply the anonymous access for the list and save 5. Stsadm -o activatefeature ......

Reading Content From a SP List Web Service

The following code below enables you to read the response from MOSS List Web Service... MOSSListWS.Lists list_svc = new MOSSListWS.Lists(); list_svc.Credentials = new System.Net.NetworkCredentia... // The URL property for WebService retrieve list_svc.Url = "http://ilocalhost/_vti_bin... XmlNode itemCollection = list_svc.GetListItems("list... string.Empty, null, null, "0", null, ""); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(itemCollecti... DataSet ......

SharePoint List WebService to Insert Item

Using the SharePoint List WebService to insert an item into a list... WebService Reference: http://<servername>/_... try { ws_list.Lists list = new ws_list.Lists(); list.Credentials = new System.Net.NetworkCredentia... "password", "domain"); XmlDocument doc = new XmlDocument(); XmlElement batch_element = doc.CreateElement("Batch"); string item = "<Method ID=\"1\" Cmd=\"New\">" + "<Field Name=\"ID\">New</Fiel... + "<Field Name=\"Title\">This is ......

Microsoft SharePoint Office Server (MOSS) UserProfiles

Has anyone ever had a problem trying to retrieving the userprofile utilizing the Microsft.SharePoint.UserPro... reference and received an error "Server Context parameter cannot be null". The work around solution that I found out was to make a call to the SharePoint Web Services and retrieving the user’s information... Make a reference to: http://<ServerName>/_... UserProfileSvc.UserProfileS... profileService = new UserProfileSvc.UserProfileS... profileService.UseDefaultCr... ......