Thursday 19 January 2012

WCF Error - This collection already contains an address with scheme http.

This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
I've found two solutions to this error depending on which version of the .NET framework you are using. You need to update the web.config with the following:

.NET 4.0

<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

.NET 2.0 - 3.5

<serviceHostingEnvironment>
  <baseAddressPrefixFilters>
    <add prefix="http://www.yourdomain.com"/>
  </baseAddressPrefixFilters>
</serviceHostingEnvironment>

Unknown server tag 'asp:ScriptManager'

Currently build a new portal using Ajax for asynchronous calls.  Had the following error:
Unknown server tag 'asp:ScriptManager'

This error has caused me a headache over the last few days.  I finally narrowed it down to a missing line in the web.config.

<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" 
            assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
  </controls>
</pages>

Tuesday 17 January 2012

SetSite failed for package [Visual Studio Class Designer Package]

When starting Visual Studio you get a pop up which contains the following error:
The package 'Visual Studio Class Designer package' has failed to load properly. GUID {DD1683A7-5A4C-4234-81B3-A4CC91DBEAC9}
Close Visual Studio.

Now start Visual Studio with devenv /log

Navigate to the log location, normally:
C:\Users\username\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml
If this log contains the following entries:

<entry>
 <record>208</record>
 <time>2012/01/17 15:06:00.310</time>
 <type>Information</type>
 <source>VisualStudio</source>
 <description>Begin package load [Visual Studio Class Designer Package]</description>
 <guid>{DD1683A7-5A4C-4234-81B3-A4CC91DBEAC9}</guid>
</entry>
<entry>
 <record>209</record>
 <time>2012/01/17 15:06:00.412</time>
 <type>Error</type>
 <source>VisualStudio</source>
 <description>SetSite failed for package [Visual Studio Class Designer Package]</description>
 <guid>{DD1683A7-5A4C-4234-81B3-A4CC91DBEAC9}</guid>
 <hr>8000ffff - E_UNEXPECTED</hr>
 <errorinfo>Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))</errorinfo>
</entry>
<entry>
 <record>210</record>
 <time>2012/01/17 15:06:00.415</time>
 <type>Error</type>
 <source>VisualStudio</source>
 <description>End package load [Visual Studio Class Designer Package]</description>
 <guid>{DD1683A7-5A4C-4234-81B3-A4CC91DBEAC9}</guid>
 <hr>8000ffff - E_UNEXPECTED</hr>
 <errorinfo>Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))</errorinfo>
</entry>
Now start Visual Studio with devenv /ResetSettings

If this doesn't work, then repair or re-install Visual Studio.