Tuesday, June 21, 2011

More accurate method to disable Loop back

Method 1 (recommended): Create the Local Security Authority host names that can be referenced in an NTLM authentication request

To do this, follow these steps for all the nodes on the client computer:

1. Click Start, click Run, type regedit, and then click OK.
2. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
3. Right-click MSV1_0, point to New, and then click Multi-String Value.
4. In the Name column, type BackConnectionHostNames, and then press ENTER.
5. Right-click BackConnectionHostNames, and then click Modify.
6. In the Value data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click OK.

Note Type each host name on a separate line.

Note If the BackConnectionHostNames registry entry exists as a REG_DWORD type, you have to delete the BackConnectionHostNames registry entry.
7. Exit Registry Editor, and then restart the computer.

Thursday, April 7, 2011

Steps to deploy a SharePoint 2010 site

The basic steps to deploy a SharePoint 2010 site are as follows;

  • Create Web Application
  • Deploy the content packages 
    •  (using a powershell script)
  • Edit the web.config file 
    • Located in the C:\inetpub\wwwroot\wss\VirtualDirectories\<web_application_folder>
  • Do the IIS-Binding
    • Go to Start -> Run -> IIS-Manager  and select the desired website from the list and click Bindings. Add the url of the site as a new binding. 
  • Enable features
    • This is only required if you are not restoring a backup of a site collection.
  • (Optional) 

Wednesday, April 6, 2011

Restoring a sitecollection backup in SP 2010

In SharePoint 2010 Management Shell you can enter the following command in order to restore a site collection backup in to a SharePoint 2010 we application.

Restore-SPSite -Identity -Path [-DatabaseServer ] [-DatabaseName ] [-HostHeader ] [-Force] [-GradualDelete] [-Verbose]



For example in order to restore a site collection to a certain web application we can use the following command.

PS C:\> Restore-SPSite -Identity http://cd-sgunasena -Path C:\UpdateFw\sitecollectionbackup\abc.bak -HostHeaderWebApplication http://abcdemo.abcompany.com -Force


Reference: MSDN

Monday, April 4, 2011

Using Host Headers

We can use host headers to host different sites in the same port. We can access them using different host names assigned to the same port address in the host file of the machine.
You can find the host file in the following location;
C:\Windows\System32\drivers\etc 
Open it using a notepad and add the host address and the desired host name you wish to use.

E.G.:   
# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost

172.11.111.111    somesite.abcompany.com

Before deploying SP 2010 sites in powershell

I recently joined a release engineering management group for our SharePoint developments in the work place. And I'm now learning deployment related stuff.

Some quick facts:
  • Be sure to be logged in as a farm administrator (I get this confused sometimes as we meddle with a lot of test accounts in order to test SharePoint developments)
  • Make sure the DisableLoopback feature is enabled. You can do this by going to  Registry editor by typing regedit in start menu -> run. In registry goto HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> Control ->Lsa . Right Click on Lsa and select AddNewDWord (32bit) Value and enter "DisableLoopbackCheck" as the name and enter 1 when prompted to enter a value. 
Keep in mind to make sure the following services are enabled and started before running windows powershell to deploy SharePoint 2010 sites.
  • SharePoint 2010 Administration
  • SharePoint 2010 Timer
  • World Wide Web Publishing service

Thursday, January 27, 2011

Errors while running Pre-Upgrade Checker

Last week I was doing another test migration using the database - attach method. This time we were trying to simulate a multi-server farm environment.
Before upgrading, as usual :) , I ran the pre-upgrade checker on the SharePoint 2007 test farm we had created. But it returned several unfamiliar errors!






We found out by checking many things regarding permissions the following two were the reasons for causing erroneous reports.
  • Additional inactive server in the farm
  • insufficient permissions to continue
 This was later resolved by,
  • removing the additional inactive server from farm
  • re-running the pre-upgrade checker using a more privileged account
These errors occur due to misplacement of simple issues. But these things happen when we are thinking only about the big things and not concentrating on small details. Hope this will help a wanderer :)