Blog Projects
Escape Keys
A ColdFusion and Web Development Blog by Tom de Manincor
 

If you don't know by know I am a VMWare fanatic. I love virtualization and VMWare has never disappointed.

VMWare offers their Player as a free solution for the PC. Unfortunately, VMWare Fusion, the Mac version comes at a cost.

However, they are currently offering a $30 rebate. It is regularly an $80 product. I couldn't resist, and just added the license to my collection.

The offer expires in March, so hurry up.

For the record, I get no kick-back or referral fee.

I was recently prompted by the following error message while attempting to connect to a MS SQL Server instance:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)

It had been working previously, what could have changed to cause the problem?

I did a quick google but the suggested fixes had mixed results, and none solved my problem.

I stumbled on this article: SQL SERVER – FIX : ERROR...

It wasn't the answer to my problem, but it led me down the right path.

I was connecting to a MS SQL Server instance on a Virtual Machine I had running locally. Recently, I installed tethering software for my mobile phone which had corrupted my windows network configuration. Not saying that this you did the same, or were using a VM, but it helps explain the cause a bit. I had to re-install my VM software, and the VM networking components were re-configured in doing so.

The IP address of my VM had changed.

That was the culprit.

The solution:

Go to the SQL Configuration Manager. (You can refer to the link above for a walk through with screen shots to get there)

Expand the SQL Network Configuration and click on the PROTOCOLS node

Right click on TCP/IP and open up the PROPERTIES panel

Select the IP ADDRESS tab

Make sure the values for the IP ADDRESS fields are correct and match the system it is running on.

Restart the service, and you should be back in business, I was.

On a side note, this is also the same place where lots of people get hung up when setting up remote access to a SQL Server instance.

Make sure you fill in the TCP PORT, even if you are using the default 1433.

I had posted a while back about setting up a Subversion Server on a Windows machine. However, now I am running my SVNSERVE on a Windows 2003 Server Virtual Machine with VMWare. With the Shared Folders feature I am able to access my repositories from the HOST machine.

When I tried to set it up as a service using the code provided in my earlier post, I kept getting errors when starting the service. I tried mapping a network drive, in order to avoid the double slashes in the URN path to the share, but no dice.

After a good noggin knock it was apparent the syntax needed to be tweaked when using the URN path to allow for the double slashes.

Use the following single-line command:

sc create "svnserve" binpath= "\"C:\Program Files\Subversion\bin\svnserve.exe\" --service --root \"\\.host\Shared Folders\DEV\repo\"" displayname= "Subversion Repository Server" depend= Tcpip start= auto

If you are running a VM with VMWare and using Apache, you may run into some trouble mapping your Virtual Host.

Try doubling your slashes.

For example

"\\.host\Shared Folders\My Drive"

would be

I am running ColdFusion on my Windows 2003 Server VM. I have my files on my local machine, available to my VM via a shared folder. Meaning, IIS and CF see it as \.hostShared FoldersWebroot When Coldspring is initialized it runs theshrinkFullRelativePath method in the DefaultXmlBeanFactory.cfc

If you are passing in an expanded path then Coldspring will thrown an error because of the rebuilding of the path and the '\' before '.host' gets stripped down to '/' and is not a valid path.

Or, you are sending in a relative path and its just not found at all.

In the meantime modify this check before the return of the shrinkFullRelativePath method to:

<!--- Modified for Shared Folders in VMs --->
<cfif left(retVal,2) is "/.">
<cfset retVal = "/" & retVal>
</cfif>
<!--- Modified to Allow Relative Path --->
<cfif not directoryExists(getDirectoryFrompath(retVal)) and not directoryExists(getDirectoryFrompath(expandPath(retVal)))>
<cfthrow message="You have specified an invalid directory" detail="The directory path specified, #getDirectoryFromPath(retVal)# does not exist." />
</cfif>

If your're not dealing with a VM but still want to use Relative Paths, only use the second if statement.

** This may only be good for people using ColdFusion 7 and Up. (Application root mapping support issues)