Tuesday, 6 October 2009

Visual Studio 2008 SP1 crashes when switch to Design View

When switching to design view for an ascx control, Visual Studio would close without any warning. In the Application event log, is the error:

.NET Runtime version 2.0.50727.4016 - Fatal Execution Engine Error (72336028) (80131506)

With some reading aross similar problems I came across the following command line that seems to solve the problem by deleting the native images of managed assemblies.

The following command needs to be run from the Visual Studio 2008 command prompt.

ngen /delete *

Thursday, 3 September 2009

Broken .designer files

Occasionally I somehow manage to break the designer files, which eventually flag up errors like:

The name 'xxxx' does not exist in the current context.

To fix this, delete the .designer file then right click on the aspx or ascx and select 'Convert to Web Application' this will rebuild the designer file and include all the necessary references to controls.

Tuesday, 18 August 2009

Sitecore website with such name has already been installed in this computer

If you develop lots of Sitecore sites, you no doubt have to install, un-install and re-install different versions of Sitecore and have probably come across the following error:

Sitecore website with such name has already been installed in this computer

If this is the case, you need to check in the registry at
HKLM\Software\Sitecore

In this folder is a list of all the versions you have installed using the installer (not applicable if you have used the zipped folder structure)
If you are certain that the site has been deleted previously, you can remove the entry here.

Wednesday, 29 July 2009

Sending email via the command line

Log on to the server you are sending the mail from, then in a command prompt enter the following
telnet <smtp server> 25
HELO <domain sending from>
MAIL FROM:<email from>
RCPT TO:<email to>
DATA
<message>
.
QUIT

This will enable you to test that the server can send email via the architecture you are using.

Friday, 24 July 2009

Switch IIS to 32bit mode

I've just tried installing a 32bit application in to IIS which was running in 64 bit mode. This didn't work, we had to switch IIS to run in 32 bit mode.

IIS to 32 bit mode


To do this, in a command prompt enter the following
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 1

You will have to reconfigure ASP.NET by using the following command depending on the version of ASP.NET you have installed.

ASP.NET 1.1

%SYSTEMROOT%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe -i

ASP.NET 2.0

%SYSTEMROOT%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i

IIS to 64 bit mode

cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0

You will have to reconfigure ASP.NET by using the following command depending on the version of ASP.NET you have installed.

ASP.NET 1.1

%SYSTEMROOT%\Microsoft.NET\Framework64\v1.1.4322\aspnet_regiis.exe -i

ASP.NET 2.0

%SYSTEMROOT%\Microsoft.NET\Framework64\v2.0.50727\aspnet_regiis.exe -i

This Mircosft KB explains more.

Thursday, 16 July 2009

Sitecore - ASP Panel default button not firing

When I was converting a rendering to a sublayout in Sitecore, the ASP:Panel default button event was not firing. The problem was the rendering had the caching settings turned on when it was original assinged to an item. For sublayouts, the caching has to be turned off to enable .NET to bind the controls to events.

The technical problem is when the html for a control is cached, it is not going through the .Net rendering engine, and therefore the control will be missing in the hidden __Eventvalidation field.

So ensure Sitecore caching is turned off for the sublayouts.

Monday, 13 July 2009

Default password for VMWare Server 2.0 Web Console

After installing VMWare Server 2.0, you load up the Web Console to be prompted with the following screenshot. At no point in the install are you asked to setup any user accounts.


To login to VMWare Server 2.0 Web Console, logon with an administrative account’s user name for Windows or Linux (Administrator or root) and the corresponding password. A password is required, even if the built-in Administrator account does not have password by default.

Wednesday, 8 July 2009

Resource not found for the segment 'xxxx'

I've received a "Resource not found for segment 'xxxx'" whilst using Azure.

This error appears to be triggered in the where clause when I am looking by primary key. I have found some resources that say it will throw an error when looking for a primary key that doesn't exist, rather than null.

The current solution is to wrap the query in an exception block:

try  
{  
  var person = from item in Connection.Persons
  where item.ID == id
  select item;  
  return person;
}  
catch( DataServiceQueryException ex )  
{  
  return null;
}  

Thursday, 2 July 2009

Multiple controls with the same ID 'RadSpell$DialogOpener$OverImg'

When using the Sitecore Content editor, the following error constantly keeps appearing.

Multiple controls with the same ID 'RadSpell$DialogOpener$OverImg' were found. Trace requires that controls have unique IDs.

This has been acknowledged by Sitecore as a bug. The workaround is to disable trace. This can be done in the web.config

<trace enabled="false" requestLimit="50" pageOutput="false" traceMode="SortByTime" localOnly="true" />

Thursday, 25 June 2009

ASP.NET 2.0 start up times

There appears to be a bug with the 2.0 framework, when a managed application that uses an Authenticode signature can take longer than usual to start. See http://support.microsoft.com/kb/936707.
Adding the following to your web.config knocked minutes off startup time.
<configuration>
<runtime>
<generatePublisherEvidence enabled="false"/>
</runtime>
</configuration>
Using Sitecore this trimmed up to a minute off the start up times.