Thursday, 27 August 2009

Synchronization Issue in Sharepoint 2007 Servers


I got a small farm environment - 2 WFE's and 1 SQL Server. The Central Admin is configured on WFE-1, Every time I create a New Website it actually throws the error "Request Timed Out" in the end - and then we could see the application created on WFE-1 and not on WFE-2. I finally manage to find the error message from 12/LOGS (No error message in eventviewr) but not sure how to move on - Could anyone please help.
Error -
08/25/2009 16:32:16.42 w3wp.exe (0x09F8)0x16C0 Windows SharePoint ServicesGener al8nca Verbose Application error when access /_admin/extendvs.aspx, Error=Request timed out.

Here are my findings -
Analyzed Log files on Event Viewer

- App Logs - No Luck
- Sys Logs – No Luck
Analyzed Sharepoint Logs
- Timer Job Logs - No Logs
- Timer Job definition – Showed up Job failures Errors on WFE2 – (Bit relief some errors)
- 12 Logs started logging in errors after setting changes in CA
08/25/2009 16:32:16.42 w3wp.exe (0x09F8) 0x16C0 Windows SharePoint Services General 8nca Verbose Application error when access /_admin/extendvs.aspx, Error=Request timed out.
Started Suspecting on WSS Timer Service thought it might not have proper permission privileges for Site Creation on WFE2
- Analyzed Permissions on IISMetabase - No Luck
- Analyzed Permissions on WWWRoot – No Luck
- Found KB -
- Reset Farm Service Account – No Luck 
- Reset Farm Content Account – No Luck 
Every time when trying to create a new Website in WFE1 it throws an Error saying “Request Time Out “and creates the site only on WFE1 – I tried to extend the site and to my surprise it Synchronized in both the WFE’s creating the Root site and Extended site as well – This put me into more confusion; coz I was always suspecting the permissions on WSS Timer service.
Disconnected WFE2 from the farm
- Disconnected Reconnected – No Luck 
- Database Synch – No Luck 
Configured Central Admin on WFE2

Installed CA on both the WFE servers :
1. Run the PSConfig on the WFE1 until you see the Advanced button on one of the screens, click on it. Select the option of using this server for Central Admin. Click next and be done with it.
2. Repeat the same on WFE2.
Locate the following in Registry Editor and change the CentralAdministrationURL value to the desired server.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS.
And that fixed it - Websites are getting created and synchronizing on both the WFE’s now………..

Monday, 29 June 2009

Delete Error WSP Solution from Solution Store

Removing malfunctioning Windows SharePoint Services solutions
I got this fantastic article from i would share it for all.

It could happen that you (or whatever) accidentally break a deployed solution on a Windows SharePoint Services 3.0 (or MOSS 2007 for that matter) farm or site. If that happens, you can no longer retract and/or remove a solution by using the Operations part of the Central Administration website. It will show up as an error in the list of solutions under "Solution Management".
So how do you go about removing the solution entirely? You can use the command-line tool STSADM.exe which can be found under "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN" for a normal installation of WSS 3.0. Let's assume that the malfunctioning solution is called HelloWorldWebPart.wsp.
To see a list of all solutions that are on the server run the enumsolutions operation. Operations are the commands that STSADM.exe will take after the -o command-line argument. This is the way you run all operations. If you need help on a particular one, call STSADM.exe -help operationname.

Like in the output above, the solution (even if malfunctioning) could be deployed. You will need to retract the solution first. This is where you probably run into trouble. When you run the operation retractsolution like this:

Two things can happen at this point: you either panic or stay cool (or panic in a cool way). Should panic kick in, you probably will try to still forcibly delete the solution by running the deletesolution operation anyway.

Oh no, what to do now? Calm down. Run an enumeration over the scheduled deployments (retractions are considered deployments as well)

The JobId attribute of the deployment gives the GUID for the job that was scheduled but could not run. You can stop the scheduled retraction by running the operation canceldeployment (again, it's not cancelretraction).
stsadm -o canceldeployment -id 2529c788-971c-46a3-b69f-a2a0a1fcc851
At this point the scheduled retraction should be gone, which you can verify by using enumdeployments again.
Now you can read the message of the retractsolution operation again. You would have done so anyway if you just remained calm. The message says that the WSS Administration service hasn't been started yet. Not that strange, since by default it is configured to start manually.

Start the service and run the execadmsvcjobs operation to run all scheduled jobs.

There you go, no more deployed solution. Now it is just a matter of removing the solution. You can try using the Central Administation website again, because usually the error on the solution has disappeared.

Otherwise, run the deletesolution operation in STSADM.

Friday, 8 May 2009

How to Enable anonymous access in SharePoint 2007

Even though Microsoft has done a great job on improving the user interface in SharePoint 2007, some things are still buried and require a little “black magic” to get done. In this entry I’ll show you how to enable anonymous access on your site.
First, you need to enable anonymous on the IIS web site (called a Web Application in SharePoint land). This can be done by:
+ Launching Internet Information Services Manager from the Start -> Administration Tools menu Select the web site, right click and select Properties Click on the Directory Security tab Click on Edit in the Authentication and access control sectionInstead we’ll do it SharePoint style using the Central Administration section:
+ Then get to your portal. Then under “My Links” look for “Central Administration” and select it. In the Central Administration site select “Application Management” either in the Quick Launch or across the top tabs Select “Authentication Providers” in the “Application Security” section Click on the “Default” zone (or whatever zone you want to enable anonymous access for) Under “Anonymous Access” click the check box to enable it and click “Save”

NOTE: Make sure the “Web Application” in the menu at the top right is your portal/site and not the admin site.
You can confirm that anonymous access is enabled by going back into the IIS console and checking the Directory Security properties.

Now the second part is to enable anonymous access in the site.
Return to your sites home page and navigate to the site settings page. In MOSS, this is under Site Actions – Site Settings – Modify All Site Settings. In WSS it’s under Site Actions – Site Settings. Under the “Users and Permissions” section click on “Advanced permissions” On the “Settings” drop down menu (on the toolbar) select “Anonymous Access” Select the option you want anonymous users to have (full access or documents and lists only)Now users without logging in will get whatever option you allowed them.
A couple of notes about anonymous access:
You will need to set up the 2nd part for all sites unless you have permission inheritance turned on If you don’t see the “Anonymous Access” menu option in the “Settings” menu, it might not be turned on in Central Admin/IIS. You can manually navigate to “_layouts/setanon.aspx” if you want, but the options will be grayed out if it hasn’t been enabled in IIS You must do both setups to enable anonymous access for users, one in IIS and the other in each site

Thursday, 23 April 2009

Error in sharepoint best practices analyzer

I was getting this error when i tried to run sharepoint best practices analyzer in our sharepoint Farm.

An error has occurred while establishing a connection to the server. When conne
cting to SQL Server 2005, this failure may be caused by the fact that under the
default settings SQL Server does not allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
Completed Collecting Data phase.
Starting Postprocessing Rules phase.
Completed Postprocessing Rules phase.

The Webfarm was configured with SQLServer 2005 with a default instance, everything was fine until i decided to run the sbp in LIVE . It was working fine in my Dev machines and in other enviorments except LIVE, there it throws this stupid error.

Google search, tried all my might to make it work but nothing happend and got no much help from net. There were couple of guys saying they created the database alias and got it fixed but nothing was solid.

Spend 2 days on it and finally got the trick to resolve, thought of spending some time which might help someone.

This error happens when you have multiple instance of the database Server ( I think so !!). SPB takes the database settings from the HKEY_LOCAL_MACHINE -> SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ConfigDB\.

To fix the error you need to create a new ODBC > SYSTEM DSN with a proper alias.
This is what i did to fix this.

once its created click on the Created DSN and edit it

Click on the Client Configuration

Edit the instance with "\INSTANCE NAME"click next

Set the Config Database as Sharepoint_Config and Test it.

Check whether its successfully resolved.

Once this is done run the Sharepoint Best Practise Analyser again and Viola !!! it would start working .

Wednesday, 15 April 2009

Free WSS 3.0 BOOK

If you are looking for Free WSS 3.0 BOOK, you can download it here.

Tuesday, 31 March 2009

How to uninstall MOSS from a Farm

If you want to wipe out and create a new MOSS Farm here are the steps

+ Run the Configuration Wizard and, on the second page, select Disconnect from this server farm and click Yes on the warning dialog. This will delete the IIS web site and the application pool.

+ Then, run the uninstall from the Control Panel's Features and Programs application and click Yes on the warning dialog. This will take a reboot.

+ Then, if you really want to get rid of it all, go to the database server and delete the Config and Admin Content databases

Alternatively you can also disconnect the central admin from the 12 hive using cmd line if nothing works:

psconfig -cmd adminvs -unprovision

psconfig -cmd configdb -disconnect

Monday, 23 March 2009

Implement Form Based Authentication


The purpose of this document is to provide the step by step information about enabling the Form Based Authentication (FBA) for MOSS 2007 site. MOSS 2007 sites uses windows authentication by default. But some business needs form based authentication to fulfill the requirements.

Below section explains to enable Form Authentication for MOSS 2007 site.

Setting up ASP.Net 2.0 Forms Authentication User and Role Data Source

This section explains creation of database which is used to store user's information such as credentials and roles which is used for Form Authentication. This section also explains the configuration of Membership and Role providers in the web.config file and creation of users using ASP.Net configuration wizard. This article shows creating a user and which will be used for testing Form Authentication later.

Create Database

To create database, Microsoft has provided a tool/ utility called aspnet_regsql.exe that creates a database for us. This utility can be found in %windir%\Microsoft.Net\Framework\vx.x.xxxxx folder. Please see the image below:

Fig 1

Executing aspnet_regsql.exe file will open ASP.Net SQL Setup wizard that will walk through creating the ASP.Net 2.0 database. I have added the database name as FBAASPNetDb and configured it for windows authentication. Please see the image below:

Fig 2

Click on Next button. Please see the image below:

Fig 3

Select Configure SQL Server for application services option and click Next button. Please see the image below:

Fig 4

Click Next button. Now the database FBAASPNetDb is created successfully. Please see the image below:

Fig 5

Fig 6

Configure Membership and Role Providers

In the previous section, database is created successfully. Now we need to add a user in to database. Using ASP.Net Configuration Wizard, users can be added the database. This can be achieved by creating web site that will allow us to add the users and roles and also ensure the database connection strings, membership and role providers are correctly configured before we bring Sharepoint in to equation.

Below steps explains creating web site and configuring membership and role providers and executing ASP.Net Configuration Wizard.

a) Open Visual Studio 2005 and select File
New à Web Site. In the New Web Site dialog, select the ASP.Net Web Site template and enter the location to store the web site files. Please see the image below:

Fig 7

In the above image, location shows Z:\Inetpub\FBA. This is because Sharepoint server root directory is mapped to my system as Visual Studio 2005 is not installed in server machine. You can choose any location whichever is comfortable for you.

b) Add a new web.config file to web site project. Please see the image below:

Fig 8

c) By default, you will see a <connectionStrings/> node within <configuration> node. Specify the connection string to the database which has been created in the previous section. Please see the image below:

I have mentioned server as EC4-NETP-148429. This is the server in which SQL Server 2005 is installed. Please mention the respective server name.

d) After setting up the connection string, we need to specify the membership and role providers in the web.config file. In this article, I am using ASP.Net SQL Membership and Role providers. So specify the provider's information within the <system.web> tag. Please see the image below:

One thing we need to make sure that is, the provider name and connection string attribute specified in the web.config file should not be same as specified in the machine.config file. When we install .Net Framework 2.0, default connection string and providers are specified in the machine.config file.

e) Save web.config file and launch the ASP.Net Configuration Wizard by clicking on Website à ASP.Net Configuration. Please see the image below:

Fig 9

Fig 10

f) Set the authentication type in the above wizard. To do this, click Security link. In the Security tab, under Users section, click Select authentication type link. Select From the internet option and press Done button which is available in the bottom right corner. By selecting this option, which means that site will use form authentication to identify users. Please see the image below:

Fig 11

g) To test the membership and role providers, click on Provider tab. In the Provider tab, click on Select a different provider for each feature (advanced) link. Select right / correct membership and role provider and click Test link to ensure that providers are communicating to right database. Please see the image below:

Fig 12

Fig 13

At this point, we configured web.config file with connection string and providers information. Also we tested the providers with the database. Next section will explain adding users to database.

Create a User

a) To add users, click on Security tab. In Security tab, under Users section, click Create user link. Here I am adding user as testFBA and password as password which will be used for testing form authentication later. Please see the image below:

Fig 14

Now we have created a user successfully. Do not worry about creating roles at this time and will be explained later.

Creating Web Applications

This section explains creating web application using Sharepoint Central Administration. In this article I am creating two IIS web sites; one is extranet site which will be used by the content owners and configured to windows authentication. Another site is internet site specifically for internet users and configured to form authentication. Below section explains creating of two sites.

Creating extranet IIS Web site

Before creating new site, we need to create new web application. Below is the step by step information for creating new web application.

a) Click Start à All Programs à Microsoft Office Server à Central Administration.

b) In the Application Management tab, under Sharepoint Web Application Management section, click Crate or extend Web application link.

c) In Create or Extend Web Application page, click Create a new Web Application link. Provide the information to create new web application and click OK button. Please see the image below.

Fig 15

Fig 16

Fig 17

d) Create site under the above web application. To do this, in Application Management tab, under Sharepoint Site Management section, click Create site collection link.

e) In Create Site Collection page, select the web application which have been created in the previous step and provide other information to crate the site and click OK button. Please see the image below.

Fig 18

Fig 19

Now we created the web application and site successfully. Next section explains creating internet site.

Creating internet IIS Web site

This section explains extend our web application to another internet site which has been created in the previous sections. This site is for anonymous or internet users.

a) Click Start à All Programs à Microsoft Office Server à Central Administration.

b) In the Application Management tab, under Sharepoint Web Application Management section, click Crate or extend Web application link.

c) In Create or Extend Web Application page, click Extend an existing Web application link. Provide the information to extend the web application and click OK button. Please see the image below.

Fig 20

Now we have successfully created extranet and internet site. Below is the URL for these sites.

For extranet site: http://ec4-netp-148429:4040

For internet site:


Open the browser and test both the site by typing the URL. But these two sites are asking about windows authentication because these sites are not yet configured to form authentication.

Below section explains configuration of web.config file of each site with connection string and providers information.

Configure Web Application to communicate with Form Authentication Data Store

In this section, we are modifying the web.config file of two sites. Web.config file resides in the root directory of the site i.e. c:\Inetpub\wwwroot\wss\Virtual Directories. Under this, two folders i.e. 4040 and 4041 are available. Web.config file of specific site is available inside these folders.

Configure web.config file of extranet site

The web.config file of extranet site is available in c:\Inetpub\wwwroot\wss\VirtualDirectories\4040 folder.

a) Open web.config file, specify the <connectionStrings> node defined in the section 2.2.c just after the closing </SharePoint> tag and opening <system.web> tag. Please see the image below:

Fig 21

b) Add the membership and role provider node which is defined in the section 2.2.d, just after opening the <system.web> tag. Please see the image below:

Fig 22

c) Save the web.config file.

Configure web.config file of internet site

The web.config file of internet site is available in c:\Inetpub\wwwroot\wss\VirtualDirectories\4041 folder.

a) Open the web.config file and follow the same step specified in the Section

Configure SharePoint Central Administration

The web.config file of Central Administration site is available in c:\Inetpub\wwwroot\wss\VirtualDirectories\13035 folder. To find the virtual directory open IIS. Under Web Site folder, find Sharepoint Central Administration v3. Right click to open properties. In the Properties pop up, click Home Directory tab and find the Local Path.

a) Open the web.config file and follow the same step specified in the Section

b) Here we need to very careful while specifying defaultProvider information for Role Provider. In the Role Manager attribute, add AspNetWindowsTokenRoleProvider as defaultProvider. This is necessary because Central Administration still uses Windows Authentication for the role provider. Please see the image below:

Fig 23

c) Save the web.config file.

Enable Form Authentication for Internet site

Enabling Form Authentication to internet site using Central Administration is very simple. Below steps explains the enabling form authentication.

a) Browse to Central Administration web site. Select Application Management Tab.

b) In the Application Management Tab, under Application Security section, click on Authentication Providers link. Please see the image below:

Fig 24

c) Select the Extranet Web Application. You could see Default and Internet zone for the extranet web application. In this we are configuring form authentication for Internet application. Please see the image below:

Fig 25

d) Click on Internet zone option. Edit Authentication page will open. Select Authentication Type as Forms. Check the enable anonymous
access check box and provide membership and role manager name. After providing the information, click on Save button. Please see the image below:

Fig 26

Now we successfully enabled the form authentication for the internet site. To prove form authentication is actually working with our data store, we need to add the user to the site. Below step explains to adding user to site.

e) Browse to extranet web site. In our case it is http://ec4-netp-148429:4040

f) Click Site Actions à Site Settings à People And Groups. Please see the image below:

Fig 27

g) Click on New à Add User.

h) In the Add User page, enter user name as testFBA which we created in the previous steps and provide the permission for the user. Please see the image below:

Fig 28

Now we created a user and granted the permission successfully. Below steps explains testing form authentication.

i) To test Form Authentication, Browse the internet site. In our case it is http://ec4-netp-148429:4041

j) Now system will redirect to Sign In page. Please see the image below:

Fig 29

k) Enter testFBA as user name and password as password and click on Sign In button. Please see the image below:

Fig 30

Fig 31

Now we successfully log in into internet site with form authentication.

SharePoint Template Sites

  SharePoint look book Get inspired Discover the modern experiences you can build with SharePoint in Microsoft 365 https://lookbook.microsof...