Pages

Friday, December 11, 2009

Length of Server name in Windows Server and K2 BlackPoint Configuration

Overview

I had installed one my VM with Win 2008, gave a long name, bumped up with DC and added DNS,Web roles. Dropped SQL 2008 and MOSS 2007 all went well. When I tried to Install K2 BlackPerl, the Configuration Manager kept on failing to successfully configure.

Issue

Then I noticed that the error message that K2 BlackPerl Configuration Manager log that the server could not be found!!!!!

The log complained this against the SQL Server and Web Server .

Solution

Here is the name of my server from Machine Properties:

image

 

Here is the name of my Server:

image

The Name of SQL Server:

image

Notice that the Win2008DevBoxx64 (4 is missing from the Server name  in the Server Manager and SQL Server above)

Then I went back to K2 BlackPerl Configuration Manager, correct the name  (Win2008DevBoxx6) and deleted the extra character(s) at the end as seen in the SQL Server/Web Server, everything went well.

Reference

Then my research lead to this reference on TechNet:

Active Directory Maximum Limits – Scalability (http://technet.microsoft.com/en-us/library/cc756101(WS.10).aspx)

Under the section “Additional Name Length Limitations"

NetBIOS computer and domain names are limited to 15 characters.

Thursday, December 10, 2009

Installing SPS 2010 Tips

Here I wanted to capture all issues or trick dealing with installation of SPS 2010. I will keep this updating as I find new issues/answers…

1. Single Server Install/Farm Mode install
Issue

For Single Server installation, you may choose Farm Install just to avoid SQL Express being installed. But the Farm Install mode restricts to having a domain account when you run Configuration wizard.

Solution

Once installation is complete, run SPS Powershell, run SP-NewConfigurationDatabase. This will accept the local account and create config db, and connected the server to Farm.

Next run the configuration wizard which will confirm that the server is connected to  a farm, now complete the creation of CA.

2. Single Server Install/SQL or SPS2010 first.
Issue

For stand alone (such as development) servers installations where you want to have SQL Server and SPS 2010 running on the same box, you may encounter following issue if you first install SPS 2010 and then try install SQL Server 2008.

An attempt was made to install (or update) SQL Server Native Client on a computer where SQL Server Native Client is already installed, and where the existing installation was from an MSI file that was not named sqlncli.msi.

Solution

Option 1: Simply uninstall “SQL Server Native Client” from the Uninstall Program option from Control Panel

Option 2: Given the choice or for your next single server installation try installing SQL Server 2008 first before SPS 2010.

3. An error occurred creating the configuration section handler for microsoft.identityModel:
Issue

You may receive an error while trying to first time install or create a new configuration database that is described as below:

Exception: System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for microsoft.identityModel: Could not load file or assembly 'Microsoft.IdentityModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebServices\Root\web.config line 4) ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

Solution

There are two aspects to this issue:

1. Ensure proper install of Windows Identity Foundation:  Make sure you have uninstalled Microsoft “Geneva” Framework.  This code is now renamed as “Microsoft Identify Foundation”. Find appropriate download for your platform from (Give attention to Instructions above the Files in the Download) "http://www.microsoft.com/downloads/details.aspx?FamilyID=eb9c345f-e830-40b8-a5fe-ae7a864c4d76&displaylang=en#filelist.

2. Microsoft.IdentityModel Version in coded in the web.config is incorrect:  Lets look at the Version Number in the Error message:  “Microsoft.IdentityModel, Version=1.0.0.0”.  Next lets follow the Class name space as registerd under the GAC:

image

As you can see the actual Version number for the Microsoft.IdentiyModel is 3.5.0.0

Now lets follow the web.config entry as pointed by the Error Message.

image

Lets update this version number in the web.config pointed by the Error message to 3.5.0.0, save the web.config.

image

Now continue your configuration, this step has successfully worked for me, I hope this helps others battling thus error.

Wednesday, December 9, 2009

Bootable VHD in Windows 7 for Win 2008 R2 x64, SQL 2008, SPS 2010, VS2010, WF4

You can refer to my other post on this effort. Finally I was able to get a bootable VHD under Windows 7. I wanted to share what finally worked for me.

  • With my base bootable image Windows 7 x64 Ultimate, only the Fixed VHD seems to work.
  • The Fixed VHD must be on the local drive, meaning no external connected drives through USB, ESATA (Yes this is possible see my other post).
  • So the above restriction put limit on my maximum size I could apply for my VHD (20GB)
  • Here are some of my recordings of space requirements:
    • Software Space Required
      Windows 2008 R2 x64+IIS 6.7GB
      VS.Net 2010 (C#,Web Dev, SPS Dev) Including all pre-requisites 3.3GB
      SQL Server 2008 2GB
      SPS 2010 2.3GB
  • After all the components installed and ready to go with SPS CA created, I had only about 3.3 GB left.
  • So I think if you are planning for this task, plan for your storage well in advance, I would say at least 25-40GB for the VHD if you can afford the space.
  • When I created the VHD as fixed disk, the install and booting went well. Finally when everything started working, I felt that I been missing my productivity tools where were on my base Windows 7 install.
  • So finally I am ended up going back to my VMware Workstation option, and here are couple of reasons.
    • Microsoft VPC 2007 did not support x64 bit OS.
    • VMWare Workstation 7 supported Windows 2008 x64 bit.

Monday, December 7, 2009

Bootable VHD in Windows 7 using Pre-Built Hyper-V VHD file

Overview

On my lap top currently I run Windows 7 x64  and MOSS 2007 and I am very happy with it (no more VPC, VMWare  or carry that heavy external Hard Drive). See Current Specs below.

I tried to install SPS 2010 on the same base install where I had MOSS 2007 already installed( see my other post before you try…)

This time I am trying to create new multi bootable  partition from a VHD that is attached on my base Windows 7 install.  While there are many good references to get started, I wanted to share my experience of how I got my build done.

My goal is to load create a new VHD where I can load all the next generation Beta products. This to include SPS 2010 Beta, VS2010 and all other supporting/necessary components.

Current Specs

Dell Latitude D630  (x64)
4GB RAM
Windows 7 x64 Ultimate
SQL Server 2008 SP1
VS.net 2008 SP1
MOSS 2007 SP2 Oct CU
Office 2010 Beta
SPD 2007

References
  1. http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx
  2. VHD-Extender toolkit
    1. http://vmtoolkit.com/blogs/announcements/archive/2007/01/17/vhd-expander-available.aspx
Solution

To start with I am repurposing Microsoft provided Windows 2008 R2 VHD pre built Hyper-V Virtual machine but has 180 day evaluation license, which is good enough at the movement  as SPS2010 and VS2010 are still in beta for at least next few months (3-6months).

  • So I downloaded the image, extracted and repurposed only the base VHD file.
  • The base VHD is only about 6.7GB.
  • Next attached the VHD in Windows 7 and I was able to see the content of the drive.
  • Following the bcdedit scripts I finished the dual bootable configuration.
  • Upon booting, the boot failed with the green screen error message says that the size of the drive is too small.
  • So next I utilized the VHD-Extender tool to extend the file, the version of the VHDExtender game an option extend only to minimum of 127GB. Which I did and this will be extended to a new file.
Steps
  1. Download the Windows 2008 VHD (Reference link 2)
    1. clip_image001 
  2. Run the xxx-part01.exe and let the extract complete.
    1.  clip_image002
    2. clip_image003
  3. The extract process will create a folder structure, which is a pre configured Hyper-V virtual machine.

    1. image

  4. From all of this all I am interested is the VHD file. So navigate to the following folder to find VHD file.

    1. image

    2. image

  5. Extending the original 6.7GB VHD to 127GB file using the VHDExtender

    1. image

    2. clip_image016

  6. Now from the Windows 7, from the Computer Manager, navigate to Storage>Disk Management, right click and choose Attach VHD
    1. clip_image005
    2. clip_image006
    3. clip_image007
    4. clip_image008
    5. clip_image009
    6. clip_image010
    7. clip_image011
  7. Using BCDEdit, create new Boot entry
    1. clip_image012
  8. Copy the new GUID  from above command
    1. clip_image013
  9. Now follow next steps of BCDedit commands as below
    1. clip_image014
  10. Validate the registration
    1. clip_image015
  11. Reboot and choose the new Windows 2008 partition to boot.
    1. image

  12. After choosing to boot from the new partition, I got below error with status code ”0xc000000e”
    1. image
  13. Reboot with Windows 2008 R2 DVD
  14. Choose Repair Windows
    1. photo
  15. Now notice that on the Windows 2008 partition, the drive size seems to be displayed as 0MB and the location is unknown.
    1. photo
  16. When I rebooted with the base Windows 7,  I noticed that the Attached VHD drive is no more in the list of drive under my storage management (Computer Management console).
  17. Now I tried attaching the drive and trying to reboot, it seems that the VHD from the Hyper-V is not quite recognizable under this Windows 7 VHD attach process.
  18. Further search led me to confirm that there might be an issue with this process with some one who had tried similar approach (http://blog.frankovic.net/2009/05/boot-win-2008-r2-rc-from-vhd/)
  19. After further through I realized why the System Recovery Option was not displaying the partition size and the location.
    1. The drive where I stored the VHD is on an external drive that is connected to my lap top via ESATA connection.
    2. When the lap top was rebooted, the BIOS does not know or have the ESATA drivers and hence the VHD was not at all identified.
  20. Next Steps
    1. So my next steps are to really create a new VHD from scratch, install OS and go from there.
      1. OR
    2. Try with the base prebuilt Win 2008 R2 VHD which is 6.7GB by copying the VHD to my local lap top drive.
      1. This option just did not work at all. When rebooted the windows never came up, always received BDOS.
  21. See my next post for my results.
  22. To clean up current configure simply ran bcdedit /delete as below:
    1. image 
Final Update

When I created the VHD as fixed disk, the install and booting went well. Finally when everything started working, I felt that I been missing my productivity tools where were on my base Windows 7 install.

So finally I am ended up going back to my VMware Workstation option, and here are couple of reasons.

Microsoft VPC 2007 did not support x64 bit OS.

VMWare Workstation 7 supported Windows 2008 x64 bit.

Saturday, December 5, 2009

Installing SPS 2010 side by side MOSS 2007

Overview

I have gone local with my Windows 7 install running MOSS 2007 (No more VPC/VMWare) on my lap top and I am really happy with it. I wanted to try and see what happens if I tried installing SPS 2010 Beta along side of MOSS 2007 install. I know Microsoft said it is not supported. But just for the kick…

Test results

I followed all the referenced as listed under the References section below to get through the Pre-Requisites which really went with no issues. (I will post my install experience when I finally get successful in another post). To save time of you all reading this post, finally when I got to the point when I ran the SPS 2010 install, this is what I saw…

image

I am not sure why Microsoft made this restriction but that's where I am being forced to try other option.

Next Steps

There is lot of buzz around the new Windows 7 support to load the VHDs as another bootable mount drive. So I am trying that option next to run the SPS 2010 as separate install and still make use of my Lap Top full potential. Will post my results in my next post….

Reference
  1. MSDN:
    1. Setting Up the Development Environment for SharePoint Server
    2. http://msdn.microsoft.com/en-us/library/ee554869(office.14).aspx
  2. MSDN Blog
    1. SharePoint 2010 Pre-Requisites Download Links
    2. http://blogs.msdn.com/opal/archive/2009/10/25/sharepoint-2010-pre-requisites-download-links.aspx

Installing SPD 2007 along with Office 2010 Beta

Issue

On my lap top I have Windows 7 x64 installed  and I run MOSS 2007+SQL 2008 (refer my other blog on how I got MOSS 2007 installed and running on my local Windows 7).  Next I went ahead to install Office 2010 x64 Beta as the bits became available. I got in to trouble with Office 2010 install complaining that previous version of Office programs were installed and that I must first uninstall in order to install Office 2010 and pointed to Office SharePoint Designer 2007.  This is documented and discussed issued with Office 2010. Well I still need SPD 2007 in order to work with MOSS 2007.

Solution

So I first took chance by first uninstalling SPD 2007  and continued with Office 2010 beta x64 install which worked pretty well.

Now I tried installing the SPD 2007 once again (there is only x86 version of SPD 2007), and it installed well and SPD 2007 is working as expected.

Follow up

On the above success next I am venturing in to installing SharePoint 2010 along side of my MOSS 2007 on my Windows 7 ( I know Microsoft says it is not supported, well MOSS 2007 install did the same until someone figured out why not?) , look for my next blog….

Installing MOSS 2007 on Windows 7

    Overview

    After Windows 7 was RTMed, I wanted to once again refresh my Lap Top with the released version as supposed to running the old RC version which would have timed out in July 2010. With the RC version I had the SQL Server 2008 and MOSS 2007 installed on my Windows 7 RC install. Worked very well.

    But this time once again I have to work through some of the challenges to get the MOSS install kick in. So I had followed all the steps as given in the below references, but wanted to add little more clarity to some of the steps and also share my steps that made it work finally.

    Also thanks to the Bamboo Solutions folks (Jonas Nilsson) for writing the program that fakes the MOSS installer that our Windows 7 really the server and let the install program continue. Randy Williamsfrom Synergy for sharing a small trick that did the one more trick that SharePoint.exe to be renamed back to setup.exe.

    Here goes my little contribution…

    References

    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2009/05/07/installing-wss-3-0-moss-sp2-on-windows-7-rc.aspx

    http://community.bamboosolutions.com/blogs/bambooteamblog/archive/2008/05/21/how-to-install-windows-sharepoint-services-3-0-sp1-on-vista-x64-x86.aspx

    http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=89

    Steps

    Follow all the steps in sequence as dictated by the first two links in my reference.

    Tip 1:

    In order to turn of the Application Compatibility, if you search “policy” in Windows 7 as below,

    image

    you will be search displayed as below…

    image

    Choose the “Edit group policy”, otherwise you can simply run “gpedit.msc

    Tip 2:

    If you have renamed the original “<your MOSS 2007 Install Folder>x64\setup.exe” to sharepoint.exe, I kept on getting the help menu for extract command, so when I tried renaming sharepoint.exe back to “setup.exe” in the Install got kick in…

    clip_image002

    Tip 3:

    Once all the above issues have been resolved, I was able to get the MOSS 2007 installed. Next I updated with latest SP 2 and the October 2009 CU, then ran config wizard and completed the Central Administration created.

    Now I fired up the Central Administration in a browser and found little strange display under the Topology and Services options. The “Services On Farm” was not displayed.

    clip_image003

    As second test I tried to create a New SSP…

    clip_image004

    and got below error…

    clip_image005

    After checking my Local Users Group>Administrators, my Windows 7 login account was already part of administrator group (which I had already set up before I started with SQL Server and MOSS install steps).

    Then I figure this must be something in the Windows 7 UAC that may have not set correctly. But there was no option to check any more details.

    Then I ventured in to Local Security Policy to see if there are any policies that are blocking my account though who is member of local Administrator to act partially and blocking my full access/permissions to above problem..

    Then I search for [not literally] “Can I turn off UAC?” and ended up with a nice guide from TechNet (http://technet.microsoft.com/en-us/library/cc709691(WS.10).aspx). Look for section “To disable Admin Approval Mode

    Now to run the Local Security Policy follow below steps:

    1. Click Start, click All Programs, click Accessories, click Run, type secpol.msc in the Open box, and then click OK.

    2. If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Continue..

    3. From the Local Security Settings console tree, double-click Local Policies, and then double-click Security Options.

    4. Scroll down and double-click User Account Control: Run all administrators in Admin Approval Mode.

    image

    Select the Disabled option, and then click OK.

    image

    Close the Local Security Settings window.

    Now refreshed my CA and there you see all the missing options…

    clip_image006

    And further I was now able to create SSP and continue my journey running MOSS 2007 locally on Windows 7 happily….

    Next I want to install and test Office 2010 Beta but still want to run SPD 2007.. see my next post..

Tuesday, November 24, 2009

Custom 401 for MOSS 2007

Overview

  • Handling 401 Error under the WSS 3.0/MOSS 2007 requires special handling.
  • Unlike other Error messages that occur after the user is authenticated, all the browser requests handled through complete  ASP.Net pipe line and further WSS SPRequesthandler/SPPageFactory.
  • In case of FileNotFound there is actually an object model property under the SPApplication object, which is unique and easier to handle.

How MOSS presents 401 Error Message?

  • Under the context of hawkeye portal, were the users are restricted by means of an active directory group, users who are part of the group will get authenticated and are allowed to browse the portal.
  • Users who are part of WSGC domain but are not part of the restricted AD group, will not get authenticated.
  • Upon login attempt with proper username/password entry, user will be redirected http://<PortalURL>/_Layouts/accessdenied.aspx page.
  • Above page is the standard MOSS Access Denied Error Message page.

How does Authentication work in IIS and Browser?

  • When user points the browser to the hawkeye portal, the browser first sends out the request without the user credential.
  • IIS checks to see if the request site is security enabled.
  • If the site is security enabled (in hawkeye case it is Windows Authentication), then IIS challenges the browser to provide the credentials by means of sending a 401 status code back to browser.
  • Browser then looks at 401 and understands that it is now required to provide a credential.
  • Browser then looks up if it has user credentials.
    • If the IE setting is set to Login using current user login then the browser sends the current user name/password.
    • If the IE setting is set to Prompt for login then the users are prompted for login.
    • If the browser does not have a credential then the browser displays the 401 error message by looking up the local 401 error message (This is a page from IE client side)
  • When the browser provide a credential, IIS server takes on checking for the authentication for given user/password.
    • If the user is authenticated, the requested page is served.
    • If the user is a valid Active directory account then the SharePoint redirects the user to http://<PortalURL>/_Layouts/accessdenied.aspx page which is SharePoint error page.
    • If the user is not valid Active directory account then the client side IE 401 error message is displayed.

What 401 error condition can you handle in SharePoint?

  • You can only handle the 401 error condition for a valid AD user accounts but which do not have access to the portal. This is the only condition that Server handles.
  • You can not handle the 401 error condition for non valid AD user accounts.

What are the challenges in SharePoint with handling 401 error?

  • When the 401 error condition occurs for a valid AD user account  with no access to the site, SharePoint page handler will take over the call and manages to redirect to /_Layouts/accessdenied.aspx">/_Layouts/accessdenied.aspx">/_Layouts/accessdenied.aspx">http://<PortalURL>/_Layouts/accessdenied.aspx.
  • Above SharePoint behavior process ignores any web.confg <CustomErrors> settings.
  • The only way to intercept this redirection is by implementing a custom Http handler.
  • Under the http handler, by subscribing to EndRequest event and by trapping for the page redirect where the url is /_layouts/accessdeined.aspx, and then redirecting to your custom error page.
  • You can implement your own custom error page under the sharepoint context  at the given below URL location for example.
  • /_layouts/<YourCompanyName>/MyCustomAccessDeined.aspx

Implementation

Below is the sample code base for http module. Substitute your <Company Name>. Compile this into a signed assembly.

   1:  using System;


   2:  using System.Collections.Specialized;


   3:  using System.Configuration;


   4:  using System.Web;


   5:   


   6:   


   7:  namespace Rajesh.MOSS401Redirector


   8:  {


   9:      public class RedirectorHttpModule : IHttpModule


  10:      {


  11:        


  12:          public void Init(HttpApplication context)


  13:          {       


  14:              context.EndRequest += new EventHandler(context_EndRequest);                


  15:          }


  16:   


  17:          protected void context_EndRequest(object sender, EventArgs e)


  18:          {


  19:              if (sender is HttpApplication)


  20:              {


  21:                  HttpApplication application = (HttpApplication)sender;


  22:                 


  23:                   


  24:                  if application.Request.HttpMethod == "GET")


  25:        {


  26:                      HttpContext context = application.Context;


  27:                      if (context.Request.Url.ToString().ToLower().Contains("/_layouts/accessdenied.aspx"))


  28:                      {


  29:                          HttpContext.Current.Server.ClearError();


  30:                          HttpContext.Current.Response.Clear();


  31:                          HttpContext.Current.Response.Redirect("/_layouts/<YourCompanyName>/AccessDenied.aspx", false);


  32:                      }


  33:   


  34:                   }


  35:   


  36:           }


  37:    }




Deployment and configuration




  1. Deploy the redirector assembly Rajesh.MOSS401Redirector.dll to the GAC on all FEWs.


  2. Deploy your custom error page under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\<YourCompanyName>\


  3. Add the following httpModule section to the web application web.config:



<configuration>

  <system.web>


    <httpModules>


      <add name="RedirectorHttpModule" type="Rajesh.MOSS401Redirector.RedirectorHttpModule, Rajesh.MOSS401Redirector, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4f1f85ae373342d6" />


    </httpModules>


  </system.web>


</configuration>



     4.Test by login in with user with portal access, and user with no portal access.



     5. This test solution do not have proper implementation of the Custom Error page, it was meant to be a sample test only. You will need to implement proper supported SharePoint page.

Wednesday, August 12, 2009

Improving performance of Virtual Machines on Lap Top [Developer]

As consultant I shuttle between clients, working at the corner of table, Starbucks, some time on train and some time at home. So I prefer to have my development system packaged as a Virtual Machine (My favorite is VMWare Workstation). Couple of thinks I like to high light here on how I made my VMs run much faster.

Where to place VM files?

When you place your VM files on a secondary hard disk than the main hard disk you will get better performance. You host OS and your VM machine running will not compete on the same hard disk. Thus you will have better I/O performance. Use secondary hard drive. to place your VM files.

What type of External Drive gives better performance?

Nowadays you get USB2/FireWire/eSata drive with different combination of ports. Below is the speed guide so you will know why I recommend eSata II (More details look at Wikipedia)

Port StandardSpeed
USB260 Mega Bytes/Sec
FireWire 80098 MB/s
SATA 150 (SATA I)150MB/s
SATA 300 (SATA II)300 MB/s

There are other standards but within the realm of Lap Top and the one that can fit in your bag I have listed only the possible choices.

How to connect?

You will need an SATA port on your lap top. If if you have a lap top that is based on PCI Bus standard, then you are limited with buying a PCIMCIA card. The PCI Bus standard that is 32 bit cam support only SATA I/150 type . Due to the PCI Bus limitation, you will get maximum of 150MB/S support.

If you have the most recent lap top with an eSATA port, check the support. If the port is of type SATA I then you get only 150 MB/s and if the port is of type SATA II then you get 300 MB/s support.

If you have a lap top that do not have an eSATA port, then you may have an expressCard slot, then you can buy an expressCard SATA PCI card. These expressCARD SATA cards support SATA II , ie, 300 MB/s.

Then you will also need a eSATA cable to connect the SATA ports between the External Hard Drive and your Lap Top or the PCI card.

Watch out for the port types, there are “I” type and “L” type. You will need one end to match your external hard drive port and the PCI card or the Lap top SATA port.

Again watch out for the SATA cable type, there available both in SATA I and SATA II.

What I did?
  • I have old lap top with PCIMCIA slot. So my choice is to buy a MCIMCIA card. Lantech card
  • At the time I shopped acomdata made better and cheaper eSata drives ( their case is made up of bamboo and aluminum). I bought 750GB USB2/FireWire 800/eSata II drive
    • Although at the present I have to stick with SATA I standard with my lap top, in future when I refresh my lap top then I can get double performance with SATA II port.
  • Then I matched the port type, in my case both side happens to be I type, so bought an I type cable made by LinkDepot.
What is the performance?

Below is the comparison you can see the differences between an USB 2 and eSATA I

USB2 (25MB/s)eSATA I (70 MB/s)
image image

Although the SATA I is supposed to be transferring up to 150MB/s, in reality I am getting 50% of the performance. Among all the research I have done, 50% performance seems be the case.

With the above setup I am finding that my VMs running off of VMWare workstation are satisfactory. Meaning you can get the machine started, shut down, coded, browsing, snapshoting, pausing , each taking few seconds to under a minute.

Happy VMing :-)

Wednesday, July 8, 2009

My Virtual Lab Gear (Developer)

As developer/architect if not already you would eventually want a place where you want to be able to load up all the necessary Microsoft stack of servers and applications and tinker with it. If you look the laptops that we all consultants carry around, they do not have all the horse power to run bunch of servers and all the versatility you would need. (Although the new Dell lap tops seems to show off support for more RAM like 16GB and more Processing power, but you will end up paying dearly). Then I started looking at the Server hardware.

Before we delve in to more server story, lets look at what is that we want in the lab system?

  • First of all I guessing you are thinking virtualization. Lets look at our options:
    • Although I liked the VMware ESX its lot more expensive (~$5K+ that is way to much money for me to shell out from my personal pocket).
    • So I choose the new Microsoft Hyper-V. That means you will be installing the Windows Server 2008. Then I chose the standard install and not the new CORE (With CORE, you will need to remotely manage your server and I don’t have an alternative Windows 2008 or Vista, at the movement there was no support for remote managing Windows Server 2008 CORE from Windows XP ) More on this later…
    • If you are a VMWare Workstation fan and have a license (VMware Workstation is not that expensive, I got it at discount price for ~$120+) you can install the Workstation software on your server hard ware alternatively.functionalities.
    • The why not MS VPC? Well there is no SNAP Shot option among other missing features.
  • You want to be able to have full fledged domain with DC, Exchange server, SQL Server, your specific technology services, a development box etc.
  • Then you want to be able to generate lot of snap shot, so you would need ton of cheaper hard disk space to keep the snapshots away.
  • You want more processers or core and more RAM to be able to host more machine instances.
  • Ok these are some very high level needs

Let look at my research details (Took about 6 months to finally order my hardware stuff).

I looked up many server/PC hardware and finally realized, either you end buying the server based hardware, bare bones or all custom. It all depends on how much you are willing to spend. Well I had cap from our finance controller (Yep my wife).

  • Server Hardware:
    • You can look up many pre build rack type servers, both from sources like Anadtech, NewEgg, Cnet etc.
    • At the time I was researching the cost was around $2500+ for the base models.
    • Then I started looking at barebones machine. Most of these lacked what I was looking for. (More RAM like in the range of 8-16GB and type of RAM supported, More CPU Core/Processors support, better FSB, support for port types.
    • Bottom line, the pre build server hardware were expensive.
    • I don’t want to spend ton of money on just the server hardware with base CPU and RAM.
    • You will need to spend a ton for RAM and other stuff (We will cover that below)
    • I don’t have to build a Class A server.
  • Mother board.
    • Then I started researching the motherboard market.
    • Lot of the motherboards are developed for the more PC enthusiastic oriented, specifically for gamers.
    • So you will see the South bridge and north bridge with type of Chip set supported and there capabilities etc.
    • This was all irreverent for what I wanted to get out of.
    • But these PC based motherboards are lot cheaper, like under $100!
    • So I dwelled more in to going with PC based mother board and building it up.
    • First choose which CPU you want to the mother board to support for. I choose AMD, they are lot cheaper than Intel.
    • Then the size matters. there are ATX and micro ATX (smaller). Refer to below The box for more details.
    • I researched the mother board that is more stable, (read the reviews) and is been in the market for while.
    • Some of these had in build RAID support with SATA ports. Be aware that some of these SATA ports are RAID only supported, you cannot simply have them connect to your external ESATA port and try to hook up an ESATA external hard drive. I ended up buying additional ESATA card and source it out to hook up my external ESATA hard disk.
    • Looked up other below relating factors.
  • RAM
    • For the mother board I looked I also looked at the maximum RAM supported
    • For the RAM I looked at type of possible speeds.
    • At the same time researched on the available RAM module denominations.
    • At the time I saw PC motherboards with maximum 16GB support but with the slots available and the compatible RAM modules available there was no way to get 16GBs loaded. So I concluded that I have to stick with the 8GB Max for which I saw many options.
    • So I ended up choose a mother board and the RAM that matched with the highest speed and maximum and still fit my budget.
  • Hard Drive
    • Now a days hard drives are very cheep.
    • So I chose a 10,000 RPM hard drive (these are usually smaller to just support the base OS boot) and it was about 120GB
    • The choose additional 7200RPM SATA drive with 1TB, to store all my VM stuff.
  • Graphics CARD:
    • Although not very relevant, I choose the basic with at least 512MBr on board RAM, and look out for the resolutions you are expecting. Weather you want to use multiple LCDs. I am sticking with just the host LCD for now.
    • Although my mother board supported dual graphics card, its not needed for what we are trying to do.
  • Network Card:
    • You could buy an additional network card to support for your virtual network alone. Look for Gigabit.
  • Power Supply:
    • For all the pieces you are buying, calculate power (the wattage).
    • I think for the most part around 500-800Watts is just sufficient for what we are doing.
    • Look for connector types you would need for all the peripherals you are buying and need power.
  • Other peripherals
    • You can choose any type of DVD drive, read write with light scribe as well. I think the market is just beginning with this technology, I am still sticking with my external hard drive with ISO images that I can directly mount. So its really your choice and they are cheaper.
    • Floppy drive is not necessary unless you want to create a Windows Recovery Disk.
  • The box:
    • I choose the Tower style. This would take less space on the ground to keep. Also these are lot less noisy that the rack style and I don’t have a rack to place it in.
    • With tower there are ATX and micro ATX sizes.
    • I choose ATX as I could place any mother boards and gives me more room inside to attach various components you would need to buy and more room to ventilate.
    • Look for all the front and back fan options, ability to open and close the box, be prepared to be able to open and close as you would need to until you get everything settled which will be for long time.
    • And again read the reviews.
  • Keyboard, monitor, mouse.
    • You can choose what ever you like and is not relevant in this discussion.

Here is what I bought for my year old server from NewEgg.com:

Product DescriptionPrice
COOLER MASTER Centurion 5 CAC-T05-UW Black Aluminum Bezel , SECC Chassis ATX Mid Tower Computer Case - Retail53.99
Item #: N82E16811119068
Seagate Barracuda ES.2 ST31000340NS 1TB 7200 RPM SATA 3.0Gb/s 3.5" Internal Hard Drive - OEM289.99
Item #: N82E16822148278
Western Digital Raptor WD1500ADFD 150GB 10000 RPM SATA 1.5Gb/s 3.5" Hard Drive - OEM169.99
Item #: N82E16822136012
Arctic Silver 5 Thermal Compound - OEM5.99
Item #: N82E16835100007
Sony Optiarc Black IDE DVD-ROM Drive Model DDU1615/B2s - OEM17.99
Item #: N82E16827101131
ABS Tagan BZ Series BZ700 700W ATX12V / EPS12V SLI Ready CrossFire Ready 80 PLUS Certified Modular Active PFC Patent Piperock ... - Retail179.99
Item #: N82E16817814015
MSI K9A2 Platinum AM2+/AM2 AMD 790FX ATX AMD Motherboard - Retail154.99
Item #: N82E16813130136
Patriot Viper 4GB (2 x 2GB) 240-Pin DDR2 SDRAM DDR2 1066 (PC2 8500) Dual Channel Kit Desktop Memory Model PVS24G8500ELK - Retail ( Two Quantity)229.98
Item #: N82E16820220299($114.99 ea)
AMD Phenom 9850 BLACK EDITION 2.5GHz Socket AM2+ 125W Quad-Core Processor Model HD985ZXAGHBOX - Retail235
Item #: N82E16819103249

Subtotal

1337.91

Tax

97

FedEx

91.38

Total

1526.29

If you research now, you may end up with entirely new set of products as market changes every day and there are new and better choices available. Hope this helps get your that dream project started…

I will cover in the next post how I build up the server …(rather building it still)

Monday, July 6, 2009

Batch Script for creating Test Site Collections [MOSS 2007] (Developer)

As a SharePoint developer there may be an occasion that you wanted to quickly create a SharePoint Site Collections of all the basic templates and test something. You might get to it by having some one or in a spare time (not that we have any) give it a shot and start creating some sites. Well now that you have taken the time (pain) to do so, your server hits a problem (Believe me I have been experienced with random SharePoint development environment anomalies, that some took time to figure out and fix it or simply roll back-Yep I use VMWorkstation my favorite) . Gosh what do you do now? Wish you had backed up the DB (Ya you could have done that if it was a small DB). If not you had it all scripted it out.

Well, I had the very same need quite frequently and ended up writing a small (well rather long) batch script. This script will create all the site collections based on all the basic WSS 3.0 site templates. It even goes one level further by creating all set of template based site collections for each of the basic set of template root site collections.

Remember to upgrade the email id and the login on the following lines (line numbers 13 and 14 )

SET owneremail=OwnerEmail@YourDomain.com
SET ownerlogin=yourdomain\OwnerLogin

Click below to download the script file.

Auto rename Upgrade.log [SPS 2003-MOSS 2007 Upgrading] (Developer)

If you are planning for in upgrading your SharePoint 2003, you are probably first trying to give it shot in the test or development environment. That would lead to running several test upgrade trials until you perfect your upgrade. Every time you perform your upgrade, MOSS 2007 will generate the Upgrade.log (under the 12\Logs hive).

Every subsequent Upgrade activities will use the same Upgrade.log and will continue to append the log to the same Upgrade.log. Apart from upgrade jobs, the same Upgrade.log is also used by activities such as the initial steps used by upgrade configuration “Set target web application” , installation of hot fixes and Service Packs which are observed by the MOSS as an Upgrade job.

This will lead to a bloated Upgrade.log file (depending on your upgrading content log can vary) which would be much heavier for slow for the Notepad.exe (default) to load and do a quick check.

In order to simplify, I ended up writing a simple batch script that would rename the Upgrade.log file to something else ( I used appending date and time to the file name). There by after every unit of test I did I would simply run my RenameUpgradeLog.bat script. This would give me an empty Upgrade.log. Remember, you will need an existing Upgrade.log file for the Upgrade job kick in, otherwise you will see the appropriate error.

Anyway, here is the script I have used, you can paste the below text and make up your own filename renaming script.

:: ------------------------------------------
:: Author : Rajesh Agadi
:: Date Version Update
:: 2/25/2008 1
:: -----------------------------------------
ECHO OFF
ECHO ">>>Begin Script Rename Upgrade Log"

SET WSS12Hivepath=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12

::----------------------Get Current date time for filename-------------
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
for /f "tokens=1" %%u in ('time /t') do set t=%%u
if "%t:~1,1%"==":" set t=0%t%
set timestr=%d:~0,2%-%d:~3,2%-%d:~6,4%-%t:~0,2%-%t:~3,2%
::---------------------Rename old Update.log--------------------------------
ECHO "Renaming Upgrade.log to >>Upgrade-%timestr%.log<<..."
COPY "%WSS12Hivepath%\LOGS\Upgrade.log" "%WSS12Hivepath%\LOGS\Upgrade-%timestr%.log"
ECHO > "%WSS12Hivepath%\LOGS\Upgrade.log"

ECHO "<<<END Script Rename Upgrade Log"

Application Configuration Guidance (Part II) [MOSS 2007]

As SharePoint Architect, often I have to deal with various MOSS 2007 installation and configuration scenarios for each of the clients I have consulted. Eventually I ended up with my quick cheat sheet. Eventually they resulted with two sets of information, one is more focused on Architecture Definition (Part I) and then one that is focused on Application Configuration focused.

Most of the information I have collected and put together are from various Microsoft produced content. It was just easier for me to quickly look it up and have a very high level idea of the focused area.

1. Prior to install
  • This section assumes you have performed the capacity planning for the MOSS Farm and have selected appropriate MOSS server(s) and configurations.
  • Consider following prior to installation:
  • There is no direct upgrade from a stand-alone installation to a farm installation.
  • Installing Office SharePoint Server 2007 on a domain controller requires additional configuration steps.
  • The Run WWW in IIS 5.0 isolation mode check box is only selected if you have upgraded to IIS 6.0 on Windows Server 2003 from IIS 5.0 on Microsoft Windows 2000. New installations of IIS 6.0 use IIS 6.0 worker process isolation mode by default.
  • You must enable ASP.NET 2.0 on all Office SharePoint Server 2007 servers.
  • Server Farm or Database access account
  • The server farm account is used to access your configuration database.
  • It also acts as the application pool identity for the SharePoint Central Administration application pool.
  • It is the account under which the Windows SharePoint Services Timer service runs.
  • The SharePoint Products and Technologies Configuration Wizard adds this account to the SQL Server Logins, the SQL Server Database Creator server role, and the SQL Server Security Administrators server role.
  • The user account that you specify as the service account must be a domain user account, but it does not need to be a member of any specific security group on your Web servers or your back-end database servers.
  • Specify a user account that is not a member of the Administrators group on your Web servers or your back-end servers.
  • SQL Server service account
  • This account is used as the service account for MSSQLSERVER and SQLSERVERAGENT

  • Installation Account
  • This account needs to be a member of the Administrators group on every server on which you install Office SharePoint Server 2007.
  • You can, however, remove this account from the Administrators group on the servers after installation.
2. Installation Guidelines

Recommended Order of installation

1. Central Administration Site

  • The Central Administration site be installed on an application server.
  • In a server farm that includes more than one application server, install the Central Administration site on the application server with the least overall performance load.
  • If your farm will have an application server, install Office SharePoint Server 2007 on that server first. This also installs the Central Administration site.
  • All your front-end Web servers.

2. The index server (if using a separate server for search queries and indexing).

  • It is not recommended that you install Office SharePoint Server 2007 on an index server first.
  • In farms with more than one index server, you should stop the Central Administration service on all index servers.
  • This service is used for the Central Administration site and is not required on index servers.
  • Stopping this service on index servers can help avoid URL resolution problems with indexing.
  • In the other hand, you must be sure that this service is started on the server that hosts the Central Administration Web site, even if that server is also an index server. You do not need to stop this service for installations where the farm has only one index server.

3. The query servers, if separate from the index server.

  • To configure more than one query server in your farm, you cannot configure your index server as a query server.

4. Other application servers (optional).

3. Other installation and configuration guidelines
  • You should disable the Windows SharePoint Service Web Application service on all servers that are not serving content, especially index servers. On the other hand, you must be sure that this service is enabled on the servers that are serving content.
  • All of the Web servers in your server farm must have the same SharePoint Products and Technologies installed. For example, if all of the servers in your server farm are running Office SharePoint Server 2007, you cannot add to your farm a server that is running only Microsoft Office Project Server 2007. To run Office Project Server 2007 and Office SharePoint Server 2007 on your server farm, you must install Office Project Server 2007 and Office SharePoint Server 2007 on each of your Web servers. To enhance the security of your farm and reduce the surface area that is exposed to a potential attack, you can turn off services on particular servers after you install SharePoint Products and Technologies.
  • You must use the Complete installation option on all computers you want to be index servers, query servers, or servers that run Excel Calculation Services
  • If you place a query server beyond a firewall from its index server, you must open the NetBIOS ports (TCP/User Datagram Protocol (UDP) ports 137, 138, and 139) on all firewalls that separate these servers. If your environment does not use NetBIOS, you must use direct-hosted server message block (SMB). This requires that you open the TCP/UDP 445 port.
  • If you want to have more than one index server in a farm, you must use a different Shared Services Provider (SSP) for each index server.
  • Run Setup and then the SharePoint Products and Technologies Configuration Wizard on all your farm servers. Do this on all farm servers before going on to create a Shared Services Provider (SSP).
  • We recommend that you run Setup on all the servers that will be in the farm before configuring the farm.
  • You can add servers to the farm at this point, or after you have created and configured an SSP. You can add servers after you have created and configured an SSP to add redundancy, such as additional load-balanced Web servers or additional query servers. It is recommended that you run Setup and the configuration wizard on all your application servers before you create and configure the SSP.
  • Because the SSP configuration requires an index server, you must start the Office SharePoint Server Search service on the computer that you want to be the index server, and configure it as an index server before you can create an SSP. Because of this, you must deploy and configure an index server before other servers. You can choose any server to be the first server on which you install Office SharePoint Server 2007. However, the Central Administration Web site is automatically installed on the first server on which you install Office SharePoint Server 2007.
  • You can configure different features on different servers. The following table shows which installation type you should use for each feature set.

Server type

Installation type

Central Administration Web application

Complete or Web Front End

Application server (such as Excel Calculation Services)

Complete

Search index server

Complete

Search query server

Complete

Web server

Web Front End (subsequent servers must join an existing farm) or Complete

If you choose the Web Front End installation option you will not be able to run additional services, such as search, on the server.

  • When you install Office SharePoint Server 2007 on the first server, you establish the farm. Any servers that you add you will join to this farm.
  • Setting up the first server involves two steps: installing the Office SharePoint Server 2007 components on the server, and configuring the farm. After Setup finishes, you can use the SharePoint Products and Technologies Configuration Wizard to configure Office SharePoint Server 2007. The SharePoint Products and Technologies Configuration Wizard automates several configuration tasks, including: installing and configuring the configuration database, installing Office SharePoint Server 2007 services, and creating the Central Administration Web site.
  • In farms with more than one index server, you should stop the Central Administration service on all index servers. This service is used for the Central Administration site and is not required on index servers. Stopping this service on index servers can help avoid URL resolution problems with indexing. On the other hand, you must be sure that this service is started on the server that hosts the Central Administration Web site, even if that server is also an index server. You do not need to stop this service for installations where the farm has only one index server.
  • Before stopping the service on the index server, make sure that the service is running another server.

UPDATED

Hardware Related

(I will keep this updated as I find more relevant information….)