I am creating a logging object that will take all logs sent to it and, via WCF and MSMQ (netMsmqBinding), send them over to our database. This logging object has a Service Reference to the LoggingHost (which contains the contract and all the obligatory WCF stuff).
I have a test class consisting of a simple web form that I enter a message into and it is sent to this logging object and then to our database. The problem I'm running into is that the only way I am able to get this simple functionality working is if this test class also has a Service Reference to the same LoggingHost class, which somewhat kills the entire point of this logging object (I want to encapsulate all WCF and MSMQ functionality inside this logging object so that I can just hit Logger.Debug("message") and it will take care of sending the message to our database).
Any ideas would be great. Let me know if I need to clarify what I'm trying to accomplish.
EDIT
Sorry, should have put the error that comes up when I use my test page to send the logger a message. If the test page does not have a Service Reference, this is the error I get. If it does have a reference, everything works as it should.
Could not find default endpoint element that references contract 'ServerLogger.ILoggingService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.