Microsoft SharePoint EU Conference 2007

February 21st, 2007 by unclaimed blog

Last week, I attended Microsoft SharePoint EU Conference held in Berlin. It was fascinating moment for me to meet SPS gurus came for Europe and across America and Canada.

 

Most of the sessions were excellent except some of those presented by Microsoft Partners. Especially sessions of Patrick from U2U, Steve Smith from Combined Knowledge, Mike Ammerlaan, Steve Heaney from Ninetex, Bob Sutton from Microsoft, Arphan Shah was worth while to spend time and audience took special attention of the demos.

 

Below are some of the pics taken during the session and a dinner arranged by Microsoft.

 

 

 

 

 

 

 

 

 

Microsoft SharePoint EU Conference 2007

February 21st, 2007 by unclaimed blog

Last week, I attended Microsoft SharePoint EU Conference held in Berlin. It was fascinating moment for me to meet SPS gurus came for Europe and across America and Canada.

 

Most of the sessions were excellent except some of those presented by Microsoft Partners. Especially sessions of Patrick from U2U, Steve Smith from Combined Knowledge, Mike Ammerlaan, Steve Heaney from Ninetex, Bob Sutton from Microsoft, Arphan Shah was worth while to spend time and audience took special attention of the demos.

 

Below are some of the pics taken during the session and a dinner arranged by Microsoft.

 

 

 

 

 

 

 

 

 

Move MOSS 2007 Web Application to another server

January 26th, 2007 by unclaimed blog

How to migrate MOSS 2007 Web Application to across servers

SharePoint Portal Server 2007 central administration provides web interface to take Web Application (formerly called portal site in SPS 2003) backup and restore, but sometime, database restore fails due to number of reasons. The work around to move SharePoint 2007 web application is to take content database backup and restore it on destination (either same or different domain) and attach the database by using STSADM command line tool.

Steps required moving web application is defined below:

Step # 1: Identify Content Database (s) of Web Application

  • Open MOSS 2007 Central Administration
  • Go to "Application Management" Tab and Click link "Site Collection List" under "SharePoint Site Management".
  • You can Content Database Name under database column as shown in the figure below.

Step # 2: Content Database Backup

  • After identifying the content database in the previous step, take the identified database backup by using SQL Server 2005 Management Studio.

Step # 3: Restore Content Database on Destination Server

  • Logged into Destination Server and restore content database by using SQL Server 2005 Management Studio

Step # 4: Create New Web Application on Destination Server

  • Open MOSS 2007 Central Administration on destination server.
  • Go to "Application Management" Tab and Click link "Create or extend Web Application" under "SharePoint Web Application Management".
  • Next Screen click "create a new web application".

Step # 5: Detach/Remove Content Database of Web Application

  • Click "Content Databases" under "SharePoint Web Application Management" on Application Tab.
  • Next Page, Select you're newly created web application and then click content database as shown in the figure below.

Note:  Normally content database name is WSS_Content_[GUID].

  • Next Page, Choose "Remove Content Database", you will get a warning message.
  • Click "OK".

See figure below:

  • Click "OK" button at the bottom of the page to remove content database.

Step # 6: Attach Content Database of Web Application

  • Now there is no content database associated with web application.
  • In order to attach content database restored on Step # 3, we will use STSADM command line tool.
  • Open Command Prompt, navigate to folder "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN"

ú         Run the following Command:

        stsadm -o addcontentdb -url [http://webapplication:port] -databasename [WSS_Content_GUID] -databaseserver [Database Server Instance]

  • Replace URL, databasename and database server name according to your scenario.
  • After running the command you will get a message “Operation completed successfully”.
  • Now restart IIS by running IISRESET Command on command prompt.

Browse the web application again and you will see that web application is restored successfully with full functionality.

Move MOSS 2007 Web Application to another server

January 26th, 2007 by unclaimed blog

How to migrate MOSS 2007 Web Application to across servers

SharePoint Portal Server 2007 central administration provides web interface to take Web Application (formerly called portal site in SPS 2003) backup and restore, but sometime, database restore fails due to number of reasons. The work around to move SharePoint 2007 web application is to take content database backup and restore it on destination (either same or different domain) and attach the database by using STSADM command line tool.

Steps required moving web application is defined below:

Step # 1: Identify Content Database (s) of Web Application

  • Open MOSS 2007 Central Administration
  • Go to "Application Management" Tab and Click link "Site Collection List" under "SharePoint Site Management".
  • You can Content Database Name under database column as shown in the figure below.

Step # 2: Content Database Backup

  • After identifying the content database in the previous step, take the identified database backup by using SQL Server 2005 Management Studio.

Step # 3: Restore Content Database on Destination Server

  • Logged into Destination Server and restore content database by using SQL Server 2005 Management Studio

Step # 4: Create New Web Application on Destination Server

  • Open MOSS 2007 Central Administration on destination server.
  • Go to "Application Management" Tab and Click link "Create or extend Web Application" under "SharePoint Web Application Management".
  • Next Screen click "create a new web application".

Step # 5: Detach/Remove Content Database of Web Application

  • Click "Content Databases" under "SharePoint Web Application Management" on Application Tab.
  • Next Page, Select you're newly created web application and then click content database as shown in the figure below.

Note:  Normally content database name is WSS_Content_[GUID].

  • Next Page, Choose "Remove Content Database", you will get a warning message.
  • Click "OK".

See figure below:

  • Click "OK" button at the bottom of the page to remove content database.

Step # 6: Attach Content Database of Web Application

  • Now there is no content database associated with web application.
  • In order to attach content database restored on Step # 3, we will use STSADM command line tool.
  • Open Command Prompt, navigate to folder "C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN"

ú         Run the following Command:

        stsadm -o addcontentdb -url [http://webapplication:port] -databasename [WSS_Content_GUID] -databaseserver [Database Server Instance]

  • Replace URL, databasename and database server name according to your scenario.
  • After running the command you will get a message “Operation completed successfully”.
  • Now restart IIS by running IISRESET Command on command prompt.

Browse the web application again and you will see that web application is restored successfully with full functionality.

HOWTO: Restore deleted user profiles of SharePoint Portal Server 2003

July 14th, 2006 by unclaimed blog

Restoration of SharePoint is always a mission critical task. You need to give full attention to the procedure that you will follow and you need rollback plan as well, if anything goes wrong.

I face this problem, when someone deleted (I presume) the user profiles and approx. 100 users already updated their profiles. So, I look for internet to find out the way to restore only user profile instead of whole _PROF database. But, unfortunately, I was unsuccessful.

So, I decided to test the whole action plan on virtual machine. Once, I satisfied the behavior of SharePoint that was expected, so I decided to restore the _PROF database from the backup that was taken last night.

The only way to recover user profiles with My Site is to restore the previous backup.

I restarted the SQL server services from SQL Server 2005 Management Studio in order to give exclusive access to restore activity. Once _PROF database is restored, I reset the IIS to clear the cache and here you go.

 

 

HOWTO: Restore deleted user profiles of SharePoint Portal Server 2003

July 14th, 2006 by unclaimed blog

Restoration of SharePoint is always a mission critical task. You need to give full attention to the procedure that you will follow and you need rollback plan as well, if anything goes wrong.

I face this problem, when someone deleted (I presume) the user profiles and approx. 100 users already updated their profiles. So, I look for internet to find out the way to restore only user profile instead of whole _PROF database. But, unfortunately, I was unsuccessful.

So, I decided to test the whole action plan on virtual machine. Once, I satisfied the behavior of SharePoint that was expected, so I decided to restore the _PROF database from the backup that was taken last night.

The only way to recover user profiles with My Site is to restore the previous backup.

I restarted the SQL server services from SQL Server 2005 Management Studio in order to give exclusive access to restore activity. Once _PROF database is restored, I reset the IIS to clear the cache and here you go.

 

 

Installation Steps and Pre-requisite: SharePoint Portal Server 2007 Beta 2

June 3rd, 2006 by unclaimed blog

SharePoint Portal Server 2007 installation is not straight forward and there are steps that need to follow to do the proper installation and configuration. There is a list of pre-requisite that should be considered before installing SharePoint Portal Server 2007.

Yesterday, I installed and configured SharePoint Portal Server 2007 Beta 2 on Virtual PC, It all goes fine without any much difficulty. I am summarizing each step, so you guys can follow it and I am open to receive any comment or suggestion, if you point out any changes in the installation guide or any suggestion or any problem that you face according to your scenario.

The following steps are especially written for Single Box installation, but it should work with small server farm scenario as well.

Pre-Installation Guide

There are several things that you should install and configure prior to SharePoint Portal Server 2007.

  • Windows Server 2003 with Service Pack with all latest windows update
  • IIS 6.0 with ASP.NET Component Enabled
  • Disk Partition should be NTFS (SPS installation does not support FAT partition)
  • Install SQL Server 2000 SP4 or SQL Server 2005 (Typical Installation)
  • Create a domain account that you will use to logged in and installed SharePoint Portal Server 2007 Beta 2
  • Add domain account as local administrator on Virtual Machine
  • Use the same account for application pool identity, SharePoint Administrator, Index Crawler Account etc
  • Assign domain user to DB creator, sysadmin and security admin rights on SQL Server
  • Join Virtual Machine to a domain controller.
  • Install Windows Workflow Foundation
  • You can download it from: http://www.microsoft.com/downloads/details.aspx?FamilyId=A2151993-991D-4F58-A707-5883FF4C1DC2&displaylang=en

 

SharePoint Portal Server 2007 Installation Steps

You are now ready for SharePoint Portal Server 2007 beta 2 installations. Follow the following steps:

  • Insert SharePoint Portal Server 2007 Beta 2 CD (if you have ISO Image, then make CD First)
  • First step, it will ask you to enter CD Key and license agreement
  • In the next screen choose Advanced as it Basic installation will install MSDE version of SQL Server
  • On next screen, installation program will give warning that it will stop services mostly related to IIS, click Yes to proceed.
  • Next screen, you will be asked to create farm configuration, select No, I want to create new server farm
  • Next screen, provide database server name and database account details (DOMAINUSERNAME)
  • Leave database name as default. Click "Next"
  • Next screen you will see the summary screen, click Next to start the installation.
  • Installation step can take around 30 to 45 minutes to install SharePoint Portal Server depending on the VM configuration and RAM
  • In the end, you will get a screen, click Finish to end installation.

Common Issues:

  • Install error: This product requires ASP.net web server extensions to be enabled in Internet Information Services (IIS). Enable this setting and re-run setup.

            Resolution: Run  aspnet_regiis -i  on command prompt

 

 

I do hope these steps are correct in the best of my knowledge, please give you comments and feed back on this article.

Best of luck

Adnan

 

 

 

Installation Steps and Pre-requisite: SharePoint Portal Server 2007 Beta 2

June 3rd, 2006 by unclaimed blog

SharePoint Portal Server 2007 installation is not straight forward and there are steps that need to follow to do the proper installation and configuration. There is a list of pre-requisite that should be considered before installing SharePoint Portal Server 2007.

Yesterday, I installed and configured SharePoint Portal Server 2007 Beta 2 on Virtual PC, It all goes fine without any much difficulty. I am summarizing each step, so you guys can follow it and I am open to receive any comment or suggestion, if you point out any changes in the installation guide or any suggestion or any problem that you face according to your scenario.

The following steps are especially written for Single Box installation, but it should work with small server farm scenario as well.

Pre-Installation Guide

There are several things that you should install and configure prior to SharePoint Portal Server 2007.

  • Windows Server 2003 with Service Pack with all latest windows update
  • IIS 6.0 with ASP.NET Component Enabled
  • Disk Partition should be NTFS (SPS installation does not support FAT partition)
  • Install SQL Server 2000 SP4 or SQL Server 2005 (Typical Installation)
  • Create a domain account that you will use to logged in and installed SharePoint Portal Server 2007 Beta 2
  • Add domain account as local administrator on Virtual Machine
  • Use the same account for application pool identity, SharePoint Administrator, Index Crawler Account etc
  • Assign domain user to DB creator, sysadmin and security admin rights on SQL Server
  • Join Virtual Machine to a domain controller.
  • Install Windows Workflow Foundation
  • You can download it from: http://www.microsoft.com/downloads/details.aspx?FamilyId=A2151993-991D-4F58-A707-5883FF4C1DC2&displaylang=en

 

SharePoint Portal Server 2007 Installation Steps

You are now ready for SharePoint Portal Server 2007 beta 2 installations. Follow the following steps:

  • Insert SharePoint Portal Server 2007 Beta 2 CD (if you have ISO Image, then make CD First)
  • First step, it will ask you to enter CD Key and license agreement
  • In the next screen choose Advanced as it Basic installation will install MSDE version of SQL Server
  • On next screen, installation program will give warning that it will stop services mostly related to IIS, click Yes to proceed.
  • Next screen, you will be asked to create farm configuration, select No, I want to create new server farm
  • Next screen, provide database server name and database account details (DOMAINUSERNAME)
  • Leave database name as default. Click "Next"
  • Next screen you will see the summary screen, click Next to start the installation.
  • Installation step can take around 30 to 45 minutes to install SharePoint Portal Server depending on the VM configuration and RAM
  • In the end, you will get a screen, click Finish to end installation.

Common Issues:

  • Install error: This product requires ASP.net web server extensions to be enabled in Internet Information Services (IIS). Enable this setting and re-run setup.

            Resolution: Run  aspnet_regiis -i  on command prompt

 

 

I do hope these steps are correct in the best of my knowledge, please give you comments and feed back on this article.

Best of luck

Adnan

 

 

 

Security Consideration for Custom Web Part Development

June 1st, 2006 by unclaimed blog

 

Web Parts can be deployed in two different places:

    • Deploy a Web Part library DLL inside a virtual server's in directory.
    • Deploy a Web Part library DLL in the Global Assembly Cache (GAC). A Web Part library DLL in the GAC can be loaded into any virtual server on the hosting Web server machine.

 

The fact that Web Part Pages are stored inside the SharePoint content database poses a security risk. In order to overcome security threat, WSS protects itself by processing Web Part Pages in safe mode. The Web Part architecture only loads Web Parts and ASP.NET controls that have been explicitly configured as a safe control.

We can configure Web Parts and ASP.NET controls using the <SafeControls> section of the hosting virtual server's web.config file that look like this.

 

<!- In web.config of hosting virtual server –>

<configuration>

  <SharePoint>

    <SafeControls>

      <SafeControl Assembly="MyWebParts"

                   Namespace="MyWebParts"

                   TypeName="*"

                   Safe="True" />

   </SafeControls>

  </SharePoint>

</configuration>

 

 

 The security layer provided by the Web Part architecture goes beyond requiring that Web Parts and ASP.NET controls are configured as safe controls. A Web Part library DLL running inside the in directory is further restricted in what actions it can perform by the <trust> element defined within the web.config file that look like this.

 

<configuration>

  </system.web>

    <!– set trust level to (1) WSS_Minimal (2) WSS_Medium or (3) Full –>

    <trust level="WSS_Minimal" originUrl="" />

  </system.web>

</configuration>

 

 

The <trust> element contains the level attribute. The value of the level attribute configures Code Access Security (CAS) permissions that restrict Web Part library DLLs from performing potentially dangerous actions such as connecting to a SQL Server database and accessing the local file system. The <trust> element's level attribute is set to WSS_Minimal by default.

These three trust level can be categorized as below:

    • WSS_Minimal (by default)

A setting with WSS_Minimal trust severely restricts Web Part libraries.

    • WSS_Medium

A setting of WSS_Medium trust usually allows for testing and debugging Web Part without security-related problems.

    • Full

A setting with Full trust completely disables all CAS-related security restrictions

 

Note:

Keep in mind that a <trust> element's level attribute setting in a web.config file only affects Web Part library DLLs running within the in directory. It does not affect Web Part library DLLs that have been installed in the GAC. Web Part library DLLs in the GAC are considered to be fully trusted and always run without any CAS restrictions.

 

Best Practices for Custom Web Part Deployment

  • Use WSS_Medium trust level to enforce security on Web Part Library DLLs.
  • Only deploy those Web Part Library DLLs to GAC that are coming from fully trusted source.

 

Security Consideration for Custom Web Part Development

June 1st, 2006 by unclaimed blog

 

Web Parts can be deployed in two different places:

    • Deploy a Web Part library DLL inside a virtual server's in directory.
    • Deploy a Web Part library DLL in the Global Assembly Cache (GAC). A Web Part library DLL in the GAC can be loaded into any virtual server on the hosting Web server machine.

 

The fact that Web Part Pages are stored inside the SharePoint content database poses a security risk. In order to overcome security threat, WSS protects itself by processing Web Part Pages in safe mode. The Web Part architecture only loads Web Parts and ASP.NET controls that have been explicitly configured as a safe control.

We can configure Web Parts and ASP.NET controls using the <SafeControls> section of the hosting virtual server's web.config file that look like this.

 

<!- In web.config of hosting virtual server –>

<configuration>

  <SharePoint>

    <SafeControls>

      <SafeControl Assembly="MyWebParts"

                   Namespace="MyWebParts"

                   TypeName="*"

                   Safe="True" />

   </SafeControls>

  </SharePoint>

</configuration>

 

 

 The security layer provided by the Web Part architecture goes beyond requiring that Web Parts and ASP.NET controls are configured as safe controls. A Web Part library DLL running inside the in directory is further restricted in what actions it can perform by the <trust> element defined within the web.config file that look like this.

 

<configuration>

  </system.web>

    <!– set trust level to (1) WSS_Minimal (2) WSS_Medium or (3) Full –>

    <trust level="WSS_Minimal" originUrl="" />

  </system.web>

</configuration>

 

 

The <trust> element contains the level attribute. The value of the level attribute configures Code Access Security (CAS) permissions that restrict Web Part library DLLs from performing potentially dangerous actions such as connecting to a SQL Server database and accessing the local file system. The <trust> element's level attribute is set to WSS_Minimal by default.

These three trust level can be categorized as below:

    • WSS_Minimal (by default)

A setting with WSS_Minimal trust severely restricts Web Part libraries.

    • WSS_Medium

A setting of WSS_Medium trust usually allows for testing and debugging Web Part without security-related problems.

    • Full

A setting with Full trust completely disables all CAS-related security restrictions

 

Note:

Keep in mind that a <trust> element's level attribute setting in a web.config file only affects Web Part library DLLs running within the in directory. It does not affect Web Part library DLLs that have been installed in the GAC. Web Part library DLLs in the GAC are considered to be fully trusted and always run without any CAS restrictions.

 

Best Practices for Custom Web Part Deployment

  • Use WSS_Medium trust level to enforce security on Web Part Library DLLs.
  • Only deploy those Web Part Library DLLs to GAC that are coming from fully trusted source.