Tag Archives: Workaround

WCF projects set to run using IIS won’t load – Workaround

I’ve been working in service land for the last few weeks and have been noticing occasionally when I didn’t boot Visual Studio up in admin mode my WCF Service projects wouldn’t load. This only seemed to happen occasionally so I did a little digging and found out that it only occurs when you’ve set the project to run using IIS as the host.

The quick fix here is to run Visual Studio in elevated mode using the right click ‘Run as Administrator’ command, however that didn’t seem to solve the issue when running on my new Fujitsu tablet. If you’re loading up Visual Studio as an administrator and still getting the COM exception on your WCF project, try the following steps as a workaround…

1. Close the solution in Visual Studio

2. Ensure your .csproj (or VB equivalent) file is writable by opening the file properties and ensuring the read-only checkbox is unchecked.

3. Open the csproj file in your favourite text editor (I use Notepad++) and scroll right down to the bottom

4. Change the use IIS setting to false

5. Save the file and re-open the solution in Visual Studio (recommended to run as admin).

6. If you want to continue to publish to IIS go back to the project properties in Visual Studio and set it back to run under IIS. Otherwise it will run as normal with the WcfServiceHost.

That’s pretty much it. It’s a quick workaround to get your troublesome IIS hosted service open in visual studio again, ready for some development love.


ASP.Net AJAX Auto Complete Control Extension

Today while working on adding tagging to items, I came across an issue with the auto complete control extender available in the ASP.Net AJAX Control library.

The problem is that you can’t host the extender in a custom user control (ascx file) and make it call back to a Page Method to retrieve the auto complete list. The reason for this is that the PageMethod() function in the javascript that is used to drive this functionality only hooks into the page itself, not the hosted control.
I’ve got a quick and dirty workaround for this, which works for me in the short term but I’m going to work on refining. It goes a little something like this… Continue reading