Sharepoint: Changing Site Port

There are several ways to change a port of a web application in MOSS 2007, the easiest is as easy as performing two simple tasks:

  1. Open Start>Control Panel>Administrative Tools and select Internet Information Services (IIS) Manager or simply hit Windows+R and type "inetmgr" and enter. Drill down inside the directory of IIS>[local computer name]>Web Sites>[Name of Sharepoint Site] and right-click on it and click Properties... and there you can see TCP Port, change it to a new port you desired (for example: from 91 to 27).
  2. Open the Sharepoint Central Administration, go to the Operations Tab and click the Alternate access mappings (AAM) under Global Configuration. Click on [Name of Sharepoint Site]:91 and simply change it to [Name of Sharepoint Site]:27.
And you're done! Good luck, if you have any inquiries, please leave a message and I'll try to help you.


InfoPath 2007: Publishing Form to MOSS 2007

Continuing my previous post, to publish your InfoPath Form there are several method and here I will show you the easiest way to publish to Microsoft Office Sharepoint Server 2007 (MOSS 2007).

From you completed design on InfoPath which is fully web compatible and configured, you must save the file to a location (preferably on your local disk so you can update or edit at a later time when necessary).

If you closed the InfoPath 2007 application and want to open it again to publish it, right-click on the file you created and select Design.

To publish go to File>Publish... then a publishing wizard will appear. Select To a Sharepoint server with or without InfoPath Form Services then select next and enter your MOSS 2007 site (include the subsite and document library where you want to publish the form) then select next then check the Enable this form to be filled out by using a browser and select document library on the radio button below it then click next to continue.

Here you can select whether you want to create a new library or update a form template in an existing document library. I would suggest you to create a new library if you haven't prepared any yet and enter a name for it then click next, then in column name, you can enter which columns will appear on the document library list in the MOSS site then click next and click Publish to finish.

Once that is completed, you can finally close the InfoPath 2007 application and open web browser and go to your MOSS site to the document library where you published you InfoPath Form (usually ending with .../Forms/AllItems.aspx) then click on Settings on the top bar of the list and select Form Library Settings.

Under General Settings, click on Advanced Settings on the next page under the third category Browser-Enabled Documents select Display as Web Page then click OK.

Now open a new window, open the document library again and click on the downwards arrow just next to New on the topbar of the list, it should now show two options: New Document and New Folder, select New Document and the InfoPath Form should now appear as a webform instead of firing up InfoPath application. This way clients without Microsoft Office InfoPath can also open your form.

InfoPath 2007: Designing Web Browser-Enabled InfoPath Form

To enable Web Browser capable InfoPath Form, before you want to design anything ensure that all controls are browser enabled (meaning that it is web browser enabled) by going to Tools>Form Options... and select the Compatibility category which is the second last on the left listbox.

Check "Design a form template that can be opened in a browser or InfoPath". Then start designing your form using the available controls (the default controls will reduce and will only show web enabled controls). If you already designed your form and want to only check which controls are incompatible, go to Tools>Design Checker and click on the refresh button on the Design Checker toolbar. If all controls you are using are compatible, no error will appear.

Finally, if you want a submit button (for better user experience since most of forms usually automatically closes and automatically saves data and do all sorts of stuff, go to Tools>Submit Options... and check the Allow users to submit this form. Many options will become available.

To perform a basic submit and save to a sharepoint list, in the Send form data to a single destination, select Sharepoint document library. By selecting this, you must first create a data connection to your sharepoint list.

Click the Add... button and in the Document Library textbox, enter your sharepoint list url, and for the filename, it is recommended entering key information such as ID or anything unique from one another to differentiate form entries. Also include date and time as the filename to prevent duplicates. To do this click on the Fx button beside the filename.

Here you will be presented with a formula textbox. Click Insert Function... select Text from the Category in the left listbox, and select Concat in the Function listbox on the right. You will then be automatically redirected back to the previous formula textbox. Double click on the guide text "double click to insert field" and select which textbox form you want to include as the filename (I would suggest anything about ID). Once selected, the guided text will be replaced by the field you have selected. Now to add date, single click on the second "double click to insert field" and click Insert Function and select Date and Time as the Category on the left side and select Now in the Function on the right side. Delete the third guided "double click to insert field" text or if three is not enough for your preferences, you can add more seperated by coma. It should look something like the following:

concat(field1, now())

This will be the filename of each submitted form using the InfoPath Form Services generated by Sharepoint. Then click next until everything is verified and correct and you will be redirected back to Submit Options. Click on Advanced and more options will show, on the After submit dropdown menu, select Close the form and finally click OK and you almost done.

Save your form before publishing by clicking File>Save.

Sharepoint: Moving a Site Level Up / Down

Let’s say you created a sharepoint site your root level (ie http://intranet/website) and six months later you decide it really should be contained under your IT subsite (http://intranet/it/website). You can use the program STSADM to move a site from one location to another.

Steps to move a WSS subsite.

1. Create the new target URL (I created a blank site @ http://intranet/it/website)

2. Fire up the command line

3. type the following including the quotes:

cd\"Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN"

4. Export the old URL using the following Command (this will export and backup the whole site to a single file):

stsadm -o export -url http://intranet/website -filename c:\test\backup.cmp

5. Import the file back into Sharepoint using the the following command (this restores a previously backed up file to a defined site):

stsadm -o import -url http://intranet/it/website -filename c:\test\backup.cmp

That’s it! You have moved your website. You need to check user permissions especially if you are moving to a new subsite!

OTHER COOL STUFF: There is an option to -includeusersecurity while you do the export. You can also choose whether or not to pull all the revisionhistory over with the doc libs or not…

For a full view of options for Export / Import, run the following commands to see all your options:

stsadm -o export

stsadm -o import

These will print out all your possible options for doing these two operations!

Basic Table for layout

I would like to explain several things regarding html basics which some people probably knew already or not. No matter, what you should know is that layouts of any website, I mean any website with good layout are organized in tables. Tables are easier to manage with specifying rows and columns. Rows are defined as <tr> and columns inside rows are <td>. So it will not show if you define <td> before <tr>. For a single row with three column will show as the following:


which would look like:

| a | b | c |

Now, what would really look cool is if you have some sort of image or text which could appear right in the middle of the web browser no matter if the browser is resized, it could maintain the 'middle'-ness.

For that you can define tables to align everything to the middle.

For the record, there are several versions of HTML document definition which you could read from W3C, but basically, the higher the HTML version, the more features it has. The latest version to date is HTML version 4.01 which has cool features that you can read from W3C.

Unfortunately, when you create a HTML page in Dreamweaver whether blank or template, it defines the version of HTML as version 1.0. So what you need to do is change the DocType before the <head> tag by replacing everything before <head> with the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<!-- $Id: cover.html,v 1.2 1999/12/24 23:37:45 ijacobs Exp $ -->

If you do not however, the page height would not be detected since HTML version 1.0 does not include this feature therefore rendering the page to be aligned on top of the page.

Once completed, your HTML document will be recognized as version 4.01 which supports table height. Now once you create a table, you should set the height to 100% and set the column to align center and valign middle. The following example shows the text "Hello World" right in the middle of the page regardless setting the browser height by the visitor:

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<td align="center" valign="middle">Hello World</td>

Notice the table is set height and width to 100%, this means the table adjusts itself to 100% for the height of the browser and 100% for the width of the browser allowing it to fill the entire browser area. Notice also that the <td> align is set to center and valign to middle meaning that the content in that column is horizontally centered and vertically aligned in the middle. This example is a 3x3 table if you notice 3 <tr> (row) and 3 <td> (column) inside each <tr> (row).

Happy layout-ing!

Publishing Sharepoint 3.0 with Active Directory through ISA 2006

Microsoft technology can be quite complex but pretty much straight forward. Here I would like to explain how to publish Microsoft Office Sharepoint Server 2007 (Sharepoint 3.0) on an active directory (joined domain) with Microsoft Internet Security and Acceleration Server 2006. Before we get going let me explain a little bit about it:

Microsoft Office Sharepoint Server 2007 (Sharepoint 3.0) is something of a content management solution (think joomla, phpnuke, etc where you need not develop a website from scratch but simply customize whats available and focusing on content you wish to deliver. The concept of sharepoint is quite different from joomla and other CMS as this is meant for enterprise solution, it is usually for intranet because it handles file sharing, forms and lots of features which requires huge bandwidth but of course you would want to publish some content you feel fit to be broadcast. Sharepoint main components are farms (think land/area in which many sites are placed in), site collections (think houses which are placed on the land/area, which can also be considered as website) and of course sites (think rooms inside the house, which is also considered as webpages).

Active directory is something like a domain consist many users inside it which holds user profiles, preferences as well as many other things. The benefit of using active directory is once registered, a user can use any computer (including server) joined in that domain using their username, profile and password stored in the active directory. Users of course are grouped accordingly to their roles such as administrator, approver, etc. and are cotained in a domain controller server.

Microsoft Internet Security and Acceleration Server 2006 is the main gateway for the internet to an internal network. Its hardware consist of 2 Network Interface Cards holding 2 ip adresses (1 for internal and the other for internet). ISA combines many features and roles, mainly firewall and NAT. Think of it as the main gate of a village which is well-guarded and secured.

So, to continue, you must already set all three components in your network as each will play a role in this article.

To start, lets say you have configured Windows Server 2003 R2 on all servers and all are joined in a domain set up in your domain controller server using a single administrator from that domain. On a server lets say you have installed Microsoft Office Sharepoint Server 2003 successfully including the site collection (which holds the main website for example access to the server can be reached by entering: sps.samplesite:80 in the address) and working locally within your network. On another server, lets say you have installed ISA server and configured it and is currently working properly (meaning the firewall rules are working and users in your network can browse the internet).

Now it would be unlikely to tell your network users to access your site by entering sps.samplesite:8011 because it would seem odd and difficult to remember. Go to the Sharepoint 3.0 Administrator, head for Operations>Global Configuration and find alternate access mappings. This holds the information of the url which is allowed to be used to access your website. Set a new public url and enter a good name, in this case sps.samplesite.com and set it as default. Once completed, your website can be accessed locally by entering sps.samplesite.com. However not on other computers. Please note that you should keep the default sps.samplesite:80 11 as if you change it, the whole site will change to the new name which in some cases could cause some problem.

Now head for the Domain Controller Server and go to Administrative Tools>DNS and inside Forward Lookup Zones, you will find your domain name, for example samplesite.com and you will see a list of names of computers registered in your domain. Now, right click on samplesite.com and select Add New Host (A) and enter sps so the FQDN (Fully Qualified Domain Name) would appear as sps.samplesite.com. Enter your Sharepoint server ip address and hit Add. Now you can browse to your website from any computer within the network by entering sps.samplesite.com.

Ok, your website is up and running locally and users can access and share information within the network. So lets take this website to another level so it can be accessed from anywhere in the world with internet access.

Head for ISA server, open ISA Server Management and inside Arrays, you will find the name of your ISA Server and inside it find Firewall Policy (Server_Name). You will find a set of rules created earlier which allows internet access, block specific sites, etc. Now right click on the Firewall Policy and enter new>Sharepoint Publishing Rule. You will be introduced with a wizard, follow it.

First you must set the name, lets say Publish sps.samplesite.com and hit next.

Now you are asked for your publishing type. If you wish to only publish a single web site, well, select it. But I would recommend you to select Publish a server farm of load balanced web servers which allows you to publish other sites within your sharepoint farm without having to configure it again.

Once you click next, you are asked whether you are using SSL or non-secured connections. Since SSL are quite slow and you already have ISA configured, I would suggest you to select Use non-secured connection because you are trying to publish a high-bandwidth website and you dont want to make it slower.

Next you are asked to enter Internal Site Name, enter sps.samplesite.com which you have just set in your DC-server.

Next you are to enter your sever farm name, click on new to add your farm. A New wizard will appear, enter your server farm name and click next, now inside it, add your server by clicking Add, enter your computer name or ip address. Once done, hit next. Now you must enter a method of the ISA to monitor the connectivity of your sharepoint server, I would suggest Send a ping request as it would be the fastest and easiest solution to check. Hit next and your done.

Click next again would allow you to enter the public name details. Enter your public name which is sps.samplesite.com (assuming you have registered the name sps.samplesite.com in your ISP). Hit next to continue.

Now you are asked to select a web listener. This means ISA would redirect users from this listener to your sharepoint website. Hit new, and enter your web listener name. You are once again then asked whether you want to use SSL or not, but if you selected non-secure connection previously, select Do not require SSL secured connection and hit next. Now you are presented with a list of sources which would access your website. Since you want to publish your site, you must assign 1 free public ip address provided by your isp. Click on External and click on Select IP Addresses. A popup will appear, select the third one since you don’t want all traffic heading to your website. Add a new ip and enter your free public ip address provided by your ISP and click add. Then on the web listener click next, which then would allow you to choose how your users are able to login, as starters, I se HTML Form Authentication which then allow users to login using a login page provided by ISA. On the bottom, you are asked how ISA will validate the credential, select Windows (Active Directory) since you have DC-server configured and all users are logged in using joined domain. Hit next and uncheck the Enable SSO since you dont need it and your done.

Next you will be asked for Authentication Delegation, select NTLM Authentication if you have set it in the sharepoint administrator 3.0 or leaved it as default.

Next you will be asked for Alternate Access Mapping Configuration, select Sharepoint AAM is already configured as you have set it in the beginning from sps.samplesite:80 to sps.samplesite.com and hit next.

You will be presented with user sets, if All Users is already in the list hit next, if not then add All Users. Hit next and your done!

You can check your sharepoint website and make sure its working, if not, see if you missed something or if you’re still stuck feel free to leave comments here. Have fun!

Moving Blog

So, I'm moving my old blog here instead as it is more visible than the other one.