Once In A White Moon - by Gina Therese Hvidsten
© 2023
Once In A White Moon

Transitioning to WordPress

This site will be the next homepage of me, Gina Therese Hvidsten. I’m currently in the process of transitioning all my content from my old site to this one, and I’m now using WordPress as my CMS instead of my crappy old homemade one. The appearance and content of this site will be somewhat crappy looking until everything is converted and transferred and search engines shouldn’t index any of the content, so I’ll be surprised if you find this site at all (without me having given you a direct link ;)). So as usual, stay tuned for more content.

Moving the users folder on Windows to another drive or partition

I’ve seen this on several site, and I also have this written down on pieces of paper all over my office, both at home and at work, so I figure it’s about time I get it somewhere more digital where I always know where I have it, as well as share this knowledge with other people who come by. For this example I assume that Windows is installed on the C-drive, and you want to move the users folder to the D-drive. To make sure you’re not touching files that are in use, boot from the Windows installation disc (or USB) and start a command prompt. The instructions here are for Windows 7, but they’re not very different from Windows 8.x: First you need to […] Read more

Webservice calls hangs and gets a timeout exception

Recently I encountered a problem using webservices in .Net. At irregular intervals the code suddenly threw the following exception when calling a webservice: System.Net.WebException: The operation has timed out There was nothing magical in the code around the calls to the webservice where it was handled in the usual fashion:

When the code reached ws.Foo() it just waited there for over a minute before throwing the previously mentioned exception. Since using webservices is extremely streamlined and standardized in Visual Studio I initially thought the problem had to lie somewhere else than my application, like maybe there were networking issues or the ISS server that hosted the webservice had some problems. When troubleshooting all of the above and nothing panned out I was back to […] Read more

Printing XPS files to a physical printer

I had the need to programatically print an XPS file, but a couple of hours of Google searches only returned examples of how to print TO an XPS file. It was extremely difficult to find how to send a XPS file to an actual physical printer. Eventually something turned up and the solution seemed to be the XpsDocument class. Look at this simplified example to see how easy it turned out to be:

As you can see, reading a XPS file and then sending the contents to a printer is not very hard at all.