WCF workaround for WebMatrix Beta 1
IIS Developer Express Beta doesn’t work with WCF out-of-the-box. If you run a WCF application and browse to it, you will see the following error message:
“Could not load file or assembly 'Microsoft.Web.Administration, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.”
This will be addressed in a forthcoming release. Meanwhile there are a couple of simple ways you can workaround this limitation.
Workaround 1: Copy assemblies to the app’s bin folder
Copy the following assemblies from the WebMatrix install location to your application’s bin directory.
- Microsoft.Web.dll
- Microsoft.Web.Administration.dll
By default, WebMatrix gets installed in “%ProgramFiles%\Microsoft WebMatrix” or “%ProgramFiles(x86)%\Microsoft WebMatrix”, depending on your machine architecture.
Workaround 2: GAC the required assemblies
Installing the above assemblies in the GAC will work as well, but requires you to be an administrator. From an administrator prompt, switch to the WebMatrix install location. Then run the following commands:
gacutil /i Microsoft.Web.Administration.dll
gacutil /i Microsoft.Web.dll
One of the above workarounds will hopefully resolve the issue. If not, please let us know and we’ll be happy to investigate.