Programmatically Add User to SharePoint Group

To assign the user to group in MOSS 2007

The following code will add the user to site and to specified group.

private void AddUser(string strSite,string webGroup)
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
using (SPSite site = new SPSite(strSite))
{
using (SPWeb web = site.OpenWeb())
{
Boolean allowUnsafeUpdate = web.AllowUnsafeUpdates;
try
{
web.AllowUnsafeUpdates = true;

web.SiteUsers.Add(loginName, MailId, loginId, “”);
web.Groups[webGroup].AddUser(loginName, MailId, loginId, “”);

}
finally
{
web.AllowUnsafeUpdates = allowUnsafeUpdate;
}
}
}
});
}

WinCE Update releases for the month of November 2007

The Microsoft® Windows® CE update rollup will be released the second Tuesday of every month, the latest release occurring on or around December 11th, 2007.

The following updates for Windows CE have been recently released and are available for download. More information for each update is provided in the Readme document available after the individual update(s) has been installed.

Windows CE 5.0
Update name: Windows CE 5.0 Platform Builder Monthly Update (November 2007)
Download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=B9B800E5-DD00-46DC-8380-0425C8FCEAFB&displaylang=en
Description: This is a set of updates for Windows CE Platform Builder released during the period of November 1 – November 30, 2007. These Microsoft Windows CE updates are fixes for Windows CE operating system problems you run into during the development and maintenance of your custom platform.

Windows CE 6.0 – Update name: Windows CE 6.0 Platform Builder Monthly Update (November 2007)
Download link: http://www.microsoft.com/downloads/details.aspx?FamilyId=009E67FE-A447-4035-9B13-49489992832F&displaylang=en
Description: This is a set of updates for Windows CE Platform Builder released during the period of November 1 – November 30, 2007. These Microsoft Windows CE updates are fixes for Windows CE operating system problems you run into during the development and maintenance of your custom platform.

MOSS 2007 & WSS 3.0 Service Pack 1

Today Microsoft Released the Service Pack 1 for
Microsoft Office SharePoint Server 2007 & Windows SharePoint Services 3.0

Get It here for WSS 3.0 SP1
Get it here for MOSS 2007 SP1

WebCast : Advanced SharePoint Document Workflow with Visual Studio 2008

Microsoft Webcast : Advanced SharePoint Document Workflow with Visual Studio 2008
Time : Friday, December 14, 2007 1:30 PM Eastern Time (US & Canada)

Join Robert Shelton for a 90 minute demonstration (i.e., Very few if any PowerPoint slides) on building Document Workflows for SharePoint (MOSS 2007) with Visual Studio. For this demonstration, Robert will be using the soon to be released Visual Studio 2008 (showing new features for Workflow Developers), however all of the demonstrations could also be accomplished using Visual Studio 2005 with Workflow Extensions.

What you will learn:

• New features for SharePoint Workflow Developers in Visual Studio 2008
• New SharePoint API’s for SharePoint workflow
• How to debug SharePoint Workflow’s using the Visual Workflow Designer
• The new single-click deployment of workflows using Visual Studio 2008
• How to send emails from a SharePoint Workflow using Visual Studio (2005 & 2008)
• How to (programmatically) assign users Tasks (think Outlook Tasks) and track their progress
• How to enable users to re-assign/delegate tasks, and track that this was done

Register Here

Turn Off UnExpected Error Occurred in MOSS 2007 To Display Exception Detail

MOSS 2007 by default will display the custom error page for all errors occurred in page

In Development phase it will be difficult for the developers to understand the exact error. Change the following Modifications with the web.config of the web application. Then it will display the exception details in the error page.

  • Turn the call stack on by searching for and change it to CallStack=”true”.
  • Turn off the SharePoint error pages by turning off custom error pages: to mode=”Off”.

Dont do this modification with the production site.

Coz…..the users may get scared of long errors. 😉

SharePoint Monitoring Toolkit

Microsoft Released the SharePoint 2007 Monitoring Tookit Get it Here

Overview
The SharePoint Monitoring Toolkit helps you manage Microsoft® SharePoint® environments of all sizes with two new management packs for System Center Operations Manager 2007:

  • Windows® SharePoint Services 3.0 Management Pack
  • Microsoft Office SharePoint Server 2007 Management Pack

These packs monitor the health state of the components in your SharePoint environment that affect performance and availability. When there is an issue that may cause service or performance degradation, Operations Manager 2007 uses the management packs to detect the issue, alert you to its existence, and facilitate diagnosis and corrective actions.The management packs monitor:

  • Windows SharePoint Services 3.0 related services (Timer, Tracing and Search)
  • Windows SharePoint Services 3.0 related Events
  • Web server applications such as Internet Information Services (IIS)
  • IIS-related Events
  • Microsoft SQL Server® database-related events
  • WSS Server performance

The SharePoint Monitoring Toolkit Management Packs have been rewritten from the ground up to take advantage of the latest features of System Center Operations Manager 2007. Major improvements from previous packs include:

  • Extended rules
  • New and improved reports
  • Additional actions
  • New views
  • Elimination of backward compatibility dependencies
  • Increased reliability
  • Noise reduction through tuning and event suppression
  • Thoroughly tested compatibility of management packs with:

System Center Operations Manager 2007
System Center Essentials
Microsoft Office SharePoint Server 2007 SP1

Programmatically Read List & View Content in SharePoint

I got a task to work on developing the windows application which will fetch the List View data from sharepoint and process the data in win forms app.

Previously i used to fetch the data using Lists.asmx,views.asmx.

Now i came to know there is other way to fetch the data from List View.

Syntax:
https://myserver.com/_vti_bin/owssvr.dll?Cmd=Display&List={list Id}&View={View Id}&XMLDATA=true

Example URL:

https://myserver.com/_vti_bin/owssvr.dll?Cmd=Display&List={EA1BD05B%2DDB5B%2D434B%2DB2FC%2DB9AB9EE18A91}&View={B959F555%2D798B%2D4F47%2D9FBB%2D81513B85F906}&XMLDATA=true

Now it will give the xml data as response.

write the response to xmldoc and process the data.

HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(“https://myserver.com/_vti_bin/owssvr.dll?Cmd=Display&List={EA1BD05B%2DDB5B%2D434B%2DB2FC%2DB9AB9EE18A91}&View={B959F555%2D798B%2D4F47%2D9FBB%2D81513B85F906}&XMLDATA=true”);

myRequest.Credentials =
System.Net.CredentialCache.DefaultCredentials;
HttpWebResponse response = (HttpWebResponse)myRequest.GetResponse();
XmlDocument doc = new XmlDocument();
doc.Load(response.GetResponseStream());

Microsoft BizTalk Server 2006 VHD

Hi Devs,

Are you looking for BizTalk Server 2006 Development Environment.
Dont worry(Windows XP is enough for you to host VHD)

Get it here for BizTalk Server 2006 VHD.

Download Virutal PC to Host the VHD File.

Microsoft Office SharePoint Server 2007 VHD

Hi Devs,

Are you looking for the Development Environment to Learn MOSS 2007.

Here is the way. Microsoft Gives Preconfigure VHD for MOSS 2007.

Get it here

If you have any issues in configuring VHD please post here.

Download Virtual PC to Host the VHD.

Increase Upload File size in Moss 2007

To Increase Upload File size in Moss 2007

By Default Moss will allow us to upload File size up to 50 MB.
If you want to increase upload file size.

Follow the Below Steps:
Open Central Administration

  • Open Web Application General Settings

  • Change the Maximum Upload Size to Required Size
  • Upload File size can be up to 2 GB

Now you have done with change of upload file size.

Enjoy uploading 🙂