Wednesday, May 16, 2012

SQL Express Connection Times Out Even Though It is Up

Symptom:

I can access the local SQL Express server instance without a problem using the SMSS, but from my application the SQL connection times out almost immediately.

Cause:

In my situation, it was a connection string issue. In production I use a mirrored connection. So just out of a laziness, I just change two of the hosts in the connection string to be the same.

Like this,

Data Source=localhost;Failover Partner=localhost;Initial....

Apparently the driver does not like this type of conneciton string and give you an immediate timeout error.

Fix

Just remove the Failover Partner part and try. It always does the trick to me.


Monday, May 14, 2012

WFC Services Runs OK on Visual Studio Web Server But Not on IIS When Deployed


Symptom:

You have created an WCF "web" service. It debugs and runs fine on the Visual Studio's web server, but when deployed the directory to the IIS 7 (even on the same local machine) you get a script error.

The Root Cause

The WCF is not fully enabled on your IIS 7.

The Fix

The complete fix is from this web site at Microsoft. http://msdn.microsoft.com/en-us/library/ms752252(v=vs.90).aspx 


  • Open the IIS manager and Go to the Default Web Site, Double-click Handler mappings in the Features View.
  • In the list of application mappings, verify that the .svc file for the .NET Framework in use (2 or 4) is mapped to the aspnet_isapi.dll. If the file has not been mapped:
  • Click Add Managed Handler.
  • Type *.svc into the Request path:.
  • Type System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 into the Type textbox.
  • Type svc-Integrated into the Name: textbox.
  • Click OK.
  • Click Add Script Map.
  • Type *.svc into the Request path:.
  • Type %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll into the Executable: text box.
  • Type svc-ISAPI-2.0 into the Name: text box.
  • Under the right "Actions" Panel, select "View Ordered List" then Using the Move Up/Move Down controls, ensure that the managed handler (svc-Integrated) appears before the aspnet_isapi (svc-ISAPI-2.0) handler in the list.
  • Click OK.
  • Give it a shot.


Visual Studio 2010 Reloads Microsoft.VisualStudio.IDE.ToolboxControlsInstaller,ToolboxInstallerPackage'{2C298B35-07DA-45F1-96A3-BE55D91C8D7A} Every Time

Symptom

When opening a forms designer on Visual Studio the following toolbox loads each time and it takes a long time by loading the toolbox with the following information.

Microsoft.VisualStudio.IDE.ToolboxControlsInstaller,ToolboxInstallerPackage'{2C298B35-07DA-45F1-96A3-BE55D91C8D7A}

Root Cause

When you installed a later version of Sliverlight SDK, it has corrupted some data in the older version of the SDK (it is rather complex matter that I fully do not, nor tired to, understand.)

Possible Solution:

There are various options on this, and the best discussion about this is at this URL:  But it appears that this is related to Silverlight SDK corrupting some data in the SDK based on this post.

There are other discussions on this post.

In my specific case, setting

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{2c298b35-07da-45f1-96a3-be55d91c8d7a}\Toolbox\DefaultItems to 0

made it worse.  I cannot recommend this.

Instead try un-installing and re-installing the Sliverlight SDK in the order of versions to fix the toolbox issue. Namely remove 5.0 SDK and 4.0 SDK then install the 4.0 first then 5.0 if you are still (having to) coding with Sliverlight.

As with anything, approach your fix with a big caution when dealing with config issues like this. Have a good back-out plan like backing up the registry settings etc.

If you don't care so much about Silverlight...

Because of my situation for needing to go beyond Mac and PC audience I have to avoid using Silverlight so I do not need it. If you are on the same camp as I am, just blow away the key altogether.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Packages\{2c298b35-07da-45f1-96a3-be55d91c8d7a}

For Additional Insights,


You may want to read this article from Infragistics people about How Visual Studio 2010 Toolbox Works.



Thursday, May 10, 2012

ATT Momentum 4G Adaptor Blue Screens Windows 7 X64

Symptom:

When you plug in ATT Momentum 4G (Sierra Wireless Momentum), you get a blue screen (with memory violation from a driver) when the driver in being installed.

Root Cause:

I do not know exactly which driver causes this, but...

It appears that the Sierra driver is not compatible with the USB-3 interface (at least on my ASUS u46s). Try plugging this into a USB-2 interface slot and start the installation over again.

Also, in my situation, I had to call the ATT's automated activation phone line to activate the SIM in it.