Friday, October 24, 2008

The service cannot be activated due to an exception during compilation

The service 'myservice.svc' cannot be activated due to an exception during compilation. The exception message is: The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http base address. Either supply an http base address or set HttpGetUrl to an absolute address..

The story is:
My portal cannot consume the web service, then I saw this event log in window log.

I want to check whether the WS deployment is good, so I changed HttpGetEnabled from false to true so that I can see the metadata in IE.

But setting HttpGetEnabled=true also need set HttpGetUrl as an absolute address. To avoid this, I changed the HttpGetEnabled back to false and then this error is gone.

No comments: