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

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.

Looking back at getting lost near Grand Canyon

Having recently published my big Californian vacation video to YouTube I think it’s time to reminisce a bit about my adventures. As you already know from seeing the video and by photos in my photo album I went to Grand Canyon. Before traveling to the US, a colleague of mine mentioned the place where he visited Grand Canyon West and suggested I go there to.I looked up the place on Google Maps, found the GPS coordinates and plotted those into my GPS to get driving directions.My colleague warned me that the drive would seem a bit wrong because you would have to go onto some gravel roads, so when my GPS directed me onto a gravel road I didn’t think much of it.I did get […] Read more

Attention comment spammers

I have now added a nofollow attribute to all links in the comments section, so spammers will no longer get increased page ranks from Google or other search engines. For non-spammers, add the following to an anchor tag and google won’t follow that link: rel="nofollow"