Archive for June, 2012

WCF RESTful Service URL Cannot be Found HTTP Error 500

June 13, 2012

I am taking my first noob steps into creating a RESTful WCF Service which means you can benefit from all my obvious blunders and mistakes.
Here’s the first one:

Slavishly following the excellent article ‘Create RESTful WCF Service API : Step By Step Guide’ I was shocked to find that I got a HTTP 500 error when accessing the Service URL. The problem was merely that I had omitted the webHttp element from the endpointBehaviour configuration.

In my web.config for the service I had:

endpointBehaviors
behavior name="web"

/behavior
/endpointBehaviors

But what I needed was:

endpointBehaviors
behavior name="web"
webHttp/
/behavior
/endpointBehaviors

So now you know.
Keep on noobing!

Advertisements

Google Maps Does Not Print.

June 4, 2012

Tadpolers,

If your Google Maps does not print then perhaps your Print CSS is to blame. Mine, inherited from our esteemed clients, had this thermonuclear option embedded within it:

* {
position: static !important;
overflow: visible;
}

What you see there is the ‘asterisk’ selector applied at the top-level of the DOM which means it applies to every element on every page. Great, except that Google Maps rely on a combination of relative and absolute positioning, not static positioning and, most evil, the css had specified !important on the asterisk style, giving it a very high precedence.

To knock out the asterisk selector for Google Maps without disturbing the rest of my client’s Print CSS I had to declare a new selector for elements within Google Maps. This was:

#map_canvas * {
position: relative !important;
}

#map_canvas * > div {
position: absolute !important;
}

This seems to go OK.