Referencing a sharepoint site via a dns alias

19 December 2006

If a sharepoint virtual server is referenced via a dns a-record (and not an actual machine name), you may get the following error message when you try to instantiate an SPSite object via the dns name: The server instance specified was not found. Please specify the server's address and port.


According to a knowledgebase article: "This problem may occur if the virtual server is assigned a specific IP address in Microsoft Internet Information Services (IIS) and the host name of the virtual server is mapped in DNS. In this situation, the host name is not mapped in the metabase, and Windows SharePoint Services does not query DNS to resolve the host name".


The solution is to create a host header name for the relevant virtual server.


The following articles discuss and outline this solution:
http://support.microsoft.com/?kbid=832816
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=726395&SiteID=1
Note - i am not sure, but you may need to also set the Intranet URL via the "Configure Alternate Portal Access Settings" page in Sharepoint central admin.

Internet Zones (so users arent prompted for login when accessing an intranet site)


If a virtual server is aliased via a dns record contain a dot (e.g. mydnsname.local), internet explorer will assume that the website is not part of your local intranet and hence will not log you in using your current credentials - instead, you will be prompted for your credentials. This can be particularly annoying with Sharepoint.


To stop this occuring, the user must add the dns url to their local intranet zone in internet explorer.

  • In internet explorer select Internet Options from the tools menu
  • Click the security tab and within this click the Local Intranet graphic and then the Site button
  • Leave all three checkboxes ticked and click advanced
  • Fill in the url in the Add textbox, then click add

Thanks to Luke Smith for this tip!

post a comment / view comments   (currently 0 comments)

Virtual PC: Changing mac address

13 December 2006

Just a quick note, as this is the kind of thing I will forget in 6 months, to change the mac address of a Virtual Machine, simply edit the associated vmc file in notepad and alter some of the heximal digits for the mac number (the long one).

EDIT: you are actually must better off just creating a new VMC file and attaching it to the VHD



post a comment / view comments   (currently 0 comments)

SharePoint 2003: Overriding Validation

13 December 2006

ROUGH NOTE: It is possible to perform custom field validation in SharePoint 2003 by inserting some JavaScript in add / edit pages (below where ows.js is referenced).


Note that SharePoint field validation functions are contained in ows.js (in 60/templates/layouts/1033). If you wanted, you could just alter these in situ, but its not recommended that you edit this file.



post a comment / view comments   (currently 0 comments)

Sharepoint 2003: Creating a custom theme

13 December 2006

A very brief note (because I always forget at least one step!)


Copy a theme folder from C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\Themes and rename it to the desired name for your new theme. Customise the theme accordingly - add your images and edit the various css files (theme.css is the most important).

Rename the .inf file in your current theme folder to the name of your new theme (same as folder name) and replace all instances of the old theme name with the new theme name in this folder.

Edit C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\60\Template\Layouts\1033\SPTHEMES.XML adding a node for the new theme. Eg:

<Templates>
  <TemplateID>MyThemeName</TemplateID>
  <DisplayName>MyThemeName</DisplayName>
  <Description>Description of theme</Description>
  <Thumbnail>../images/MyThemeName.png</Thumbnail>
  <Preview>../images/MyThemeName.jpg</Preview>
</Templates>

Perform an iisreset.

Obviously you will need to apply the theme at http://server/your/current/web/_layouts/1033/themeweb.aspx. Note if the theme you have just edited and wish to apply is currently selected, you will need to apply another theme before reapplying this theme (as sharepoint caches themes with webs).

This article includes setting up of the thumbnail for when the theme is being applied http://www.graphicalwonder.com/?p=19 (as im feeling too lazy to explain it).

This is a good guide to the various css elements http://www.sharepointcustomization.com/resources/tipstricks/wss_cssguide.htm



post a comment / view comments   (currently 0 comments)