Sunday, February 28, 2010

The page cannot be found on Windows Server in a .Net MVC site

Did you forget your wildcard mapping?

It seems I did.

Wednesday, February 10, 2010

Publishing PDF's from Visual Studio 2008

Here's something that annoyed me for a while. In VS2008 even when you include PDF's in the solution, when you hit publish, it doesn't copy them to the destination.

Here's how to fix it.

In the Solution Explorer, right-click the file and select Properties.
In the Properties window change Build Action to "Content"
Change Copy to Output Directory to "Copy always".


*Hint you can select multiple files but you cannot select a folder.

Tuesday, February 2, 2010

Freeing up space on Windows Server

Yesterday we went to install service pack 2 on a Windows Server 2008 machine. It turns out you need at least 5GB free on C: which we didnt have. After deleting everything we possibly could, including running CCleaner and making the Page File non-existant we were still 400MB off the mark.

Then I noticed a system file c:\hiberfil.sys which was 3GB.

Well it turns out that Windows Server 2008 still allocates space for a hibernate file. Who would want to hibernate their Live server?

Anyway, this is how to gain an exta 3GB...

C:\Users\Administrator>powercfg.exe /hibernate off

That's it!