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:
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 occurring, 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!