January 30, 2009

Silverlight User Group in Bulgaria

There is a new Silverlight User Group starting in Bulgaria. Their first meeting will be on 03 Feb 2009 at hotel Greenville in Sofia (next to Microsoft Bulgaria office).

The first session will be about “Creating a Silverlight Application – Manager, Designer, Developer”.

For more information please read the invitation and visit the event page.

You can register on the web site to receive future updates.

January 28, 2009

IIS 7.5 Features

A nice list of all new features in IIS 7.5 (the one in Windows Server 2008) is located in Michael Pietroforte post - Windows Server 2008 R2 new features - the complete list - Part 3: IIS 7.5 and Performance.

Internet Information Services 7.5 (IIS)
  • PowerShell provider for IIS 7 has more than 50 new cmdlets
  • Administration Pack extensions: Database Manager (SQL Server management within IIS Manager), Configuration Editor (generate scripts with a GUI to automate administrative tasks), IIS Reports, Request Filtering (HTTP filtering, URL rewriting, etc.)
  • One-click publishing in Visual Studio 10
  • Web Deployment Tool (formerly MS Deploy): Deployment, management, and migration of Web applications, sites, and entire servers
  • Configuration Tracing: track configuration changes to IIS and applications
  • New performance counters
  • .NET support for Server Core
  • WebDav integration (was available before as a separate extension)
  • URLScan 3.0 integration: restricts the types of HTTP requests (was available before as a separate extension)
  • FTP server services: integrated in the IIS administration interface; new .NET XML-based *.config format; virtual host names for FTP sites; improved logging
  • Integrated extensions: new kind of extensions that appear to be an integral part of IIS

 

See more detailed info at the IIS team post - IIS7 in Windows Server 2008 R2.

VS 2010 September CTP download

Do you want to try the new branching features in the upcoming VS Team Foundation Server and .NET 4.0? Do you want to see the new WPF based editor in VS 2010? Do you want to try out the new historical debugger?

These features and also many more are available for free trial download from Microsoft.

Please note that these images expire on 1 Jan 2009 so you need to run off the time synchronization in VPC or Hyper-V.

There is also Visual Studio 2010 and .NET Framework 4.0 Training Kit.

You will also need the following passwords to login to the VPC:

  • Administrator: TFSSETUP, password: 1Setuptfs (use this account to explore the CTP)
  • Administrator: Administrator,password: P2ssw0rd
  • User: TFSREPORTS, password: 1Reports
  • User: TFSSERVICE, password: 1Service

January 23, 2009

TypeInitializationException in EPiServer CMS SP3

I recently got the stack trace below in one of the web sites that we are building.

The site is running EPiServer CMS and it seemed that the problem is caused by a change in the module loading logic in EPiServer CMS SP3.

Quote from SP3 Uppgrading problems post in EPiServer Forum.

With SP3 there was some remodelling in how a EPiServer handles the initialization of the application.

These changes however made it so that it's not possible to hook into the datafactory events in Application_Start.
Instead we first hook into Application_FirstBeginRequest and then we have a instance of the DataFactory to work with.

Debugging the problem was a little PITA, because of all these static and non static constructors that just fail to load and eventually hide the real exception. Instead a more general TypeInitializationException is returned.

As the commercial says: Do not this at home. Avoid putting logic that loads resources and does some heavy work in the constructors, either non static or worse – static ones. You will spend hours debugging such a code.

Here is the stack trace itself:

Server.GetLastError() returned System.TypeInitializationException: 
The type initializer for 'EPiServer.DataAbstraction.UnifiedPathInfo' threw an exception. --->
System.TypeInitializationException: The type initializer for 'EPiServer.CacheManager' threw an exception. --->
EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized
   at EPiServer.BaseLibrary.ClassFactory.get_Instance()
   at EPiServer.BaseLibrary.ClassFactory.IsRegistered(Type baseType)
   at EPiServer.CacheManager..cctor()
   --- End of inner exception stack trace ---
   at EPiServer.StaticCacheKey.EnsureKey()
   at EPiServer.StaticCacheKey..ctor(String keyName)
   at EPiServer.DataAbstraction.UnifiedPathInfo..cctor()
   --- End of inner exception stack trace ---
   at EPiServer.DataAbstraction.UnifiedPathInfo.Load(String path)
   at EPiServer.FileSystem.DefaultAccessControlList..ctor(String path)
   at EPiServer.Web.Hosting.DirectoryAccessControl..ctor(String virtualPath)
   at EPiServer.Web.Hosting.UnifiedDirectory.get_DirectoryAC()
   at EPiServer.Web.Hosting.UnifiedDirectory.QueryAccess()
   at EPiServer.Web.Hosting.UnifiedDirectory.QueryDistinctAccess(AccessLevel access)
   at EPiServer.Web.Hosting.VirtualPathVersioningProvider.GetDirectory(String virtualPath)
   at EPiServer.Web.Hosting.VirtualPathHandler.InitializeProviders(ProviderSettingsCollection providers)
   at EPiServer.Web.InitializationModule.InitializeVirtualPathProviders(VirtualPathElement vpElement)
   at EPiServer.Web.InitializationModule.Initialize(EPiServerSection config, Settings settings,
ConnectionStringSettingsCollection connectionStringSettings)
   at EPiServer.Web.InitializationModule.StaticInitialization()
   at EPiServer.Web.InitializationModule.Application_BeginRequest(Object sender, EventArgs e)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Fixing this was actually easy, finding the root of the problem.


I wrote a small module that makes the required initializations that did not have a chance to start yet. It looks like this:

public void Init(HttpApplication context)
{
    EPiServer.Web.InitializationModule.Initialize(EPiServer.Configuration.EPiServerSection.Instance,
EPiServer.Configuration.Settings.Instance);
if (!EPiServer.BaseLibrary.ClassFactory.IsRegistered(typeof(EPiServer.Diagnostics.ITransformer)))
    {
        EPiServer.BaseLibrary.ClassFactory.RegisterClass(typeof(EPiServer.Diagnostics.ITransformer),
typeof(EPiServer.Diagnostics.DefaultTransformer));
    }
}

No guarantees it will work for you though :)

January 16, 2009

MSDN Forums Offline Client CTP released

Microsoft just announced the CTP release of a offline client for MSDN Forums. The client provides just read only access for now, but posting will be also implemented in future. This is much anticipated tool that the MVP community has been requesting for years, so it is good that it is finally alive.

You can download it here: MSDN Forums Client.

It requires that you have also installed Windows Live ID Client SDK, SQL CE 3.5 and .NET 3.5.