Search This Blog

Tuesday, November 30, 2010

Create a three tier SharePoint 2010 Development Environment.

Ok, so today we are going to look at setting up a three tier SharePoint 2010 Development environment real quick. I spent alot of time trying to figure out how to get this done and in the end it turned out to be real simple.

What you will need:
  • VMWare Workstation 7.1
  • 500GB External USB drive
  • Laptop with 8GB memory
  • Windows Server 2008 R2 64 Bit
  • Windows Server 2003 (optional)
  • SQL Server 2008 R2 64 Bit
  • SharePoint Server 2010

How to do this:

First thing you need to do is create 4 virtual machines


Server Name Memory Disc Space Processor
Domain Controller 512 MB 20 GB 1
Web Server 2048 GB 50 GB 1
Application Server 2048 GB 50 GB 1
SQL Server 2048 GB 50 GB 1

The Web, Application and SQL servers will form the three tier. For the Domain controller I chose to install Windows Server 2003. Microsoft have some great articles on how to configure a Domain Controller here http://technet.microsoft.com/en-us/library/cc759011%28WS.10%29.aspx


Step 1

For the other servers I installed Windows Server 2008 R2. You can create one windows server 2008 and then run SysPrep to ensure each copy you make of the original thereoff will be unique. This will be our template. Make 3 copies of the template.

Great, so at this stage you should have 3 Windows Server 2008 R2 servers and 1 Windows Server 2003 Domain Controller called "DomainController".

Step 2

Go ahead and install SQL Server 2008 on one of the servers and make sure you give the server a reasonable name, I have named mine "SQLServer"...literally, no confusion here! Also, ensure TCP/IP connections are set to allow for network configuration.

Step 3

Grab another copy of the Windows Server 2008 template and use this as the Application Server. We will call this "AppServer". On this server you will install SharePoint Server 2010 but will not configure SharePoint 2010 just yet.

Step 4

Grab another copy of the template and use it as the Web Server, call it "WebServer", and on this we will install SharePoint Server 2010 but will leave the configuration for later.

To give these servers a proper name go to Computer Properties and change the name accordingly but make sure you document everything.

Step 5

Now for the all important bit....to get 4 virtual machines talking to each other you will need to ensure that the "Network Adapter" setting in VMWare Workstation 7.1 for each VM is set to "Host Only".

Next, power on each of the Servers and log in with the default Administrator password (not the domain account but the local account).

Step 6

Starting with the Domain Controller, change the IP configuration details to the following sample configuration. Uncheck the Get Automatic IP Address and enter a manual one.

Domain Controller - "DomainController"

IP: 192.168.0.12
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.1
Preferred DNS Server: 192.168.0.34

For the Application Server - "AppServer"

IP: 192.168.0.13
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.3
Preferred DNS Server: 192.168.0.12 (notice the IP address here is the IP address of the Domain Controller)

For the SQL Server - "SQLServer"

IP: 192.168.0.11
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.2
Preferred DNS Server: 192.168.0.12 (notice the IP address here is the IP address of the Domain Controller)

For the Web Server - "WebServer"

IP: 192.168.0.14
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.0.4
Preferred DNS Server: 192.168.0.12 (notice the IP address here is the IP address of the Domain Controller)

Now reboot all the servers and login with the domain\Administrator account on each of the servers.

Step 7

To configure SharePoint 2010 is easy! Create 2 accounts (spAdminAcct and spFarmAcct) with least priviledges - meaning don't add them to the Admins group on the Domain Controller. Add the spAdminAcct to the Administrator group on the Application Server, Web Server and in the SQL Server, create a new Login for spAdminAcct and check the DBCreator and SecurityAdmin checkboxes. Do not add the spFarmAcct to the Adminstrators group on the servers.

Run the SP 2010 installation with the SPAdminAcct and use the SPFarmAcct as the Farm Account when prompted.

Kerberos Configuration

I used Kerberos Authentication which involved a couple of extra steps wherein I had to allow the two accounts and the AppServer to be trusted for delegation in Active Directory, and then I ran the following command: setspn -a http/appserver.domain.local domain\spAdminAcct. Download the SetSpn.exe from the Microsoft website (see suggested reading below).

Join Web Server to Farm

Next, run the SP 2010 configuration on the Web Server and during configuration make sure you select the "Add to existing farm" setting and follow the steps from there.

And there you have it, 4 virtual machines comprising of a Domain Controller, a Web Server, an Application Server and a SQL Server with SharePoint 2010.


This article was more about getting 4 virtual machines talking to each other with the basics of installing and configuring SharePoint 2010.

If you have any questions please feel free to ask, any suggestions please let me know.

Regards,

Derek



Suggested Reading:



Thought for the day: 

  • Learn to live a carefree life.



Monday, November 29, 2010

Cannot generate SSPI context

While working with MOSS 2007, you may come across the errors below while trying to open up your MOSS 2007 and Central Administration websites.

The error message "Cannot connect to the Configuration database" is displayed in the browser, while "Cannot generate SSPI context" is found in the Event Viewer.


 

Most of the online blogs and the solutions found on the Microsoft website are helpful, but none of them may be of any help to you.

One way to solve this problem is to:

  • Log into the SQL Server box, open up SQL Management Studio and once connected right click on the Server Name and select "Activity Monitor". This should tell you if there are any incoming connections to the SQL Server.
  • If you notice there is no activity from the Web Server, then it is pretty obvious the Web Server cannot make contact with the SQL Server.

Thanks to my mate Des for this helpful suggestion.

To test this theory, on the Web Server Desktop create a temporary "Test.UDL" connection file and try to connect to the SQL Server, first using the IP Address of the SQL Server and then using the Name of the SQL Server. Also, use either Windows Authentication of a dedicated SQL Account to connect.

You may be able to connect with the IP Address but not the name of the server or vice versa. This is a DNS issue which is preventing the Web Server from making contact. Immediately get in touch with your Network Administrator to resolve the DNS issue.


The problem may have occurred after installing updates on the Server.

A .UDL file must be able to connect to the SQL Server with the IP Address or the Name of the SQL Server. The .UDL file is created to test connection between the servers only and not for any other purpose.


Any questions please just ask.

Regards

Derek




Helpful links:  

Other solutions:
  • Check the Application Pool accounts for the Central Administration website and the MOSS 2007 website in IIS and ensure that the domain account used has proper rights on the SQL Server box, and has access to all the MOSS 2007 databases with the DBCreator and Security Admin permissions included.
Thought for the day:
  • Believe you are the best and work just like that!















Wednesday, October 6, 2010

List does not display in Datasheet view

When you open a List, it won't open in Datasheet view.

Category: SharePoint 2010

You see the following error message:

The list is displayed in Standard view. It cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Microsoft SharePoint Foundation is not installed, your browser does not support ActiveX controls, a component is not properly configured for 32-bit or 64-bit support, or support for ActiveX controls is disabled.

To solve this problem simply download and install the following on the user PC:

2007 Office System Driver: Data Connectivity Components which can be found at the link below.


Approximately 25 MB in size


Any questions please just ask. Any alternative suggestions please let me know.

Cheers

Derek

How to display the List item ID at the top of the List Item window

Display the List item ID at the top of the List item window.

Category: SharePoint 2010


This is useful when you need to print out a single List item (see how to print a single List item) and share with your team.

Thank you to Christophe@PathToSharePoint.com for the code to display the List Item ID.

a.      Open the List
b.      Hit the List tab
c.      Click the Form Web Parts dropdownlist
d.      Choose “Default Display Form”
e.      At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part.
f.       From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page
g.      Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window.
h.      In the window add the following code to display the Item ID at the top of the list item window.
i.       <code>
<script type="text/javascript">
               //
               // Item ID in DispForm.aspx and EditForm.aspx
               // Feedback and questions: Christophe@PathToSharePoint.com
               //
               function DisplayItemID()
               {
               var regex = new RegExp("[\\?&]"+"ID"+"=([^&#]*)");
               var qs = regex.exec(window.location.href);
               var TD1 = document.createElement("TD");
               TD1.className = "ms-formlabel";
               TD1.innerHTML = "<h3 class='ms-standardheader'>Issue ID</h3>";
               var TD2 = document.createElement("TD");
               TD2.className = "ms-formbody";
               TD2.innerHTML = qs[1];
               var IdRow = document.createElement("TR");
               IdRow.appendChild(TD1);
               IdRow.appendChild(TD2);
               var ItemBody = GetSelectedElement(document.getElementById("idAttachmentsRow"),"TABLE").getElementsByTagName("TBODY")[0];
               ItemBody.insertBefore(IdRow,ItemBody.firstChild);
               }
                
               _spBodyOnLoadFunctionNames.push("DisplayItemID");
               </script></code>
j.      Ignore any Warnings! Next hit the Page tab at the top of the page and view the list item. Done!

Any questions please just ask.

Derek 

Print a single List item in SharePoint 2010

How to print a single list item in SharePoint 2010

Category: SharePoint 2010


You may need to print a single list item in SharePoint 2010. However, this functionality does not exist unless you print with Excel, which isn't what you are looking for anyway.


So, how do we go about accomplishing this?

  1. Open a List
  2. Hit the List tab
  3. Click the Form Web Parts dropdownlist
  4. Choose “Default Display Form”
  5. At the top of the Page – Insert Tab, Click the Web Part button to add a new Content Editor web part (CEWP).
  6. From Categories choose “Media and Content” > “Content Editor” and add it to the main section of the page.
  7. Click the “Click here to add content” and then click the HTML button in the Ribbon to bring up the Edit source code window.
  8. In the window add the following code to display a Print Button at the top of the list item window.
    <code>
        <input type="button" value=" Print this page " onclick="window.print();return false;" /> 
    </code>

  9. Ignore any warnings.

  10. Next, hit the Page tab at the top of the page to view the List item. You should see the Print button.

  11. Hit the Print button to print just the list item.
So there you go, with just a little tweaking you can print a single List item.

Any questions please just ask.

Derek






























Wednesday, May 26, 2010

SharePoint 2007 Installation

Installation steps:

  1. Install Windows Server 2003 plus IIS from Additional Components
  2. Install SQL Server 2005 + Service Pack 3
  3. Install .NET Framework 3.5
  4. Install SharePoint 2007
    • Configure servers
    • Configure services
    • Configure shared services provider
  5. Create a top level site, do not pick '/sites' from the dropdownlistbox. Pick '/' instead to create a top level site so when you type in the url of the web server 'http://myserver' this should bring up your top site.
  6. Install Visual Studio 2010 but first make sure you have Windows Server 2003 Service Pack 2 installed on your server.