C# - Service Reference skips security key validation Behavior
===

I have a WCF Webservice with a custom added behavior to do a security key validation. The key is passed in the uri (?key=XXXX) and we validate it against the DB.

When we do manual calls to the service via Fiddler or equivalent, the webservice verifies the security key just fine but when we create a Service Reference, the security behavior is skipped altogether.

The Global.asax.cs file has a rewrite rule that looks like this:
    
    private void RegisterRoutes()
    {
    RouteTable.Routes.Add(new ServiceRoute("MyService", new WebserviceHostFactory(),    
    typeof(MyWebservice)));
    }

The uri to the service wsdl looks like this:

    http://localhost/MyWebservice/MyWebservice.svc

Is there a way to access the webservice methods using a URI along the lines of "http://localhost/MyWebservice/MyWebservice.svc/SOMETHING" rather than going through the URI definition specified on the RouteTable? 

How is it possible that clients created via a Service Reference can access the webservice without providing the "?key=value" query string?

Thanks in advance!


