Jan 15, 2008

MOSS 2007 / WSS 3.0 site on Port 80 Internet and Intranet

Introduction
This post describes on how to configure Microsoft Office SharePoint Server (MOSS) 2007 site on port 80 for internet and intranet scenario.
It has following main five task:-

  1. Create Web application
  2. Extend Web application
  3. Configure IIS 6.0
  4. Alternate access mappings
  5. FQDN entry in DNS server

Prerequisites

  • Stop ‘Default web site’ in IIS 6.0.

Task1: Create Web application
In this task you will create web application.

  1. Central administration > Application Management > Create or Extend web application > Create web application
  2. The below table consists of values which will be required during the course of creating the “MOSS80” web application.

IIS Web Site 1. Create a New Web Site:
Description : ‘MOSS80’
Port : 80
Host Header: MYHOME
Security configuration 1. Authentication provider : NTLM
2. Allow Anonymous Access : No
3. User Security Socket Layer: No
Application Pool 1. Configurable
User name: <DomainAccount>
Password:<password>
Database Name and Authentication Database Server : MYDBSERVER
Database Name: MYHOME_Content_80
SQL Authentication: sa/password

Task2: Extend web application
In this task you will extend existing web application (the one which is created in task1)
  1. Central administration > Application Management > Create or Extend web application > Extend an existing web application
  2. The below table consists of values which will be required during the course of creating the “MOSS80Ex” web application.

IIS Web Site 1. Create a New Web Site:
Description : ‘MOSS80Ex’
Port : 80
Host Header: MYSTUDIO
Security configuration 1. Authentication provider : NTLM
2. Allow Anonymous Access : No
3. User Security Socket Layer: No
Load Balanced URL ZONE : Extranet

Task3: Configure IIS6.0
In this task you will enter additional host header values for two web applications which were created in task 1 and 2.

  1. Start > Run > inetmgr.exe
  2. Right click propertiese on “MOSS80” and then click ‘Advanced’ button as show below.
  3. Click Add and enter port 80 and host header MYHOME.datamatics.com as shown above.
  4. Right click propertiese on “MOSS80Ex” and then click ‘Advanced’ button.
  5. Click Add and enter port 80 and host header MYSTUDIO.datamatics.com as shown below

Task4: Alternate access mappings (AAM)
In this task you will add AAM for ‘MOSS80’ web application in SharePoint administration.

  1. Central administration > Operations > Allternate Acces mappings > Click on http://MYHOME
  2. Click Cancel button
  3. Click “Edit Public Zone URLs” as shown below

Task5: FQDN entry in DNS server
In this task you will enter host(MYHOME/MYSTUDIO) entries in DNS server
Adding Address and Pointer Records. The A record maps a host name to an IP address and the PTR record creates a pointer to the host for reverse lookups. Address and pointer records can be created together using the New Host option or separately using the New Record option.
Create a new host entry with A and PTR records by doing the following:

  1. In DNS Manager, right-click on the zone you want to update and then choose New Host from the pop-up menu. This opens the dialog box shown below.
  2. Enter the host name(MYHOME/MYSTUDIO) and IP address and then select the check Associated PTR Record check box as shown below.
  3. Click Done when you are finished.

That's it, this will enable your MOSS 2007 site on port 80 for internet and intranet scenario.

Jan 14, 2008

How to write quality code? Tip1, StringOperations

  1. Use StringBuilder instead of string variable in case of concatenations.

C# Code (Wrong)

C# Code (Correct)

String xXml = “”;
for(Int32 nRep = 1; nRep<=Reps; nRep++ )
{
sXml += "<Order orderId=""
+ nRep
+ "" orderDate=""
+ DateTime.Now.ToString()
+ "" customerId=""
+ nRep
}

// make sure that the StringBuilder capacity is large enough for the resulting text
StringBuilder oSB = new StringBuilder(165);
for (Int32 nRep = 1; nRep <= Reps; nRep++)
{
oSB.Append("<Order orderId="");
oSB.Append(nRep);
oSB.Append("" orderDate="");
oSB.Append(DateTime.Now.ToString());
oSB.Append("" customerId="");
oSB.Append(nRep);
}

Note:

  • Use + When the Number of Appends Is Known or Fixed (String str = str1+str2+str3)
  • The StringBuilder class starts with a default initial capacity of 16. Strings less than the initial capacity are stored in the StringBuilder object.

  1. Use the Overloaded Compare Method for Case-Insensitive String Comparisons as shown below.

C# Code (Wrong)

C# Code (Correct)

// Bad way for insensitive operations because ToLower creates temporary strings
String str="New York";
String str2 = "New york";
if (str.ToLower()==str2.ToLower())
// do something

str.Compare(str, str2, false);

Useful links on string:-

Jan 13, 2008

Presentation and Demo C# Code

Here is the presenation and demo C# code for session held on 11-Jan-07 on following topics:-

  1. Singleton pattern
  2. MVC pattern
  3. Visual Studio Class diagrams
  4. .NET code best practices

Jan 6, 2008

.NET Knowledge sharing session

Topic: .NET Knowledge sharing session
Target Audience: Developers
Date: 11-Jan-07 - Friday
Time: 12:00 to 13:30
Venue: MIDC 3 Conference room
Speaker: Marshal Nagpal

Agenda:

  • Singleton pattern
  • MVC Pattern
  • VS.NET 2005 Class diagrams
  • .NET coding best practices

p.s. Participants should seek approval from concern PM.

EAI project Knowledge sharing

Topic: EAI project Knowledge sharing / lessons learnt
Target Audience: PM, TL, TA
Date: 10-Jan-07 - Thursday
Time: 12:00 to 13:30
Venue: MIDC 3 Conference room
Speaker: Marshal Nagpal

Agenda:

  • Introduction
  • Client background
  • Problem statement / Project overview
  • System integration (Typical EAI project)
  • Solution recommendation
    • Microsoft BizTalk 2006
    • Windows SharePoint Services 3.0
  • Approach
    • Team structure
    • RA
    • Design
    • Implementation
    • Testing
    • UAT
    • External partner
  • Challenges
    • Resources(technology, people, documentation, reference project)
    • Client handling
    • External partner communication
    • Processes (estimation, team collaboration)
  • Lessons learnt

Jan 3, 2008

Kick Off

Now its time to start blogging!
You can say New Year resolution, no actual reason is that few good people
has strongly recommended me to start blogging.

I shall be sharing my experiences on following areas:-

1. Architecture and Design
2. .NET 2.0, 3.0, 3.5
3. SharePoint 2007 and WSS 3.0
4. BizTalk 2006
5. Troubleshooting
6. Best practices in software development

You can subscribe to this blog via Email or
 RSS.