wcf - The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the HttpGetUrl property is a relative address, but there is no http baseadd -
i have adfs enabled asp.net mvc2 application , configured https binding (port no:443) in iis. site configured defaultwebsite in iis .i have wcf service: chartsservice.svc within asp.net mvc2 project used silverlight project nowadays in same solution. after finish testing in local development environment, have deployed code higher environments. worked without issues in environments. of sudden in staging server when tried smoke silverlight project, getting wcf error mentioned below:
system.invalidoperationexception httpgetenabled property of servicemetadatabehavior set true , httpgeturl property relative address, there no http base of operations address. either supply http base of operations address or set httpgeturl absolute address.
system.servicemodel.serviceactivationexception: service '/chartsservice.svc' cannot activated due exception during compilation. exception message is: httpgetenabled property of servicemetadatabehavior set true , httpgeturl property relative address, there no http base of operations address. either supply http base of operations address or set httpgeturl absolute address.. ---> system.invalidoperationexception: httpgetenabled property of servicemetadatabehavior set true , httpgeturl property relative address, there no http base of operations address. either supply http base of operations address or set httpgeturl absolute address. @ system.servicemodel.description.servicemetadatabehavior.createhttpgetendpoints(servicedescription description, servicehostbase host, servicemetadataextension mex) @ system.servicemodel.description.dispatcherbuilder.initializeservicehost(servicedescription description, servicehostbase servicehost) @ system.servicemodel.servicehostbase.initializeruntime() @ system.servicemodel.servicehostbase.onopen(timespan timeout) @ system.servicemodel.channels.communicationobject.open(timespan timeout) @ system.servicemodel.servicehostingenvironment.hostingmanager.activateservice(serviceactivationinfo serviceactivationinfo, eventtraceactivity eventtraceactivity) @ system.servicemodel.servicehostingenvironment.hostingmanager.ensureserviceavailable(string normalizedvirtualpath, eventtraceactivity eventtraceactivity) --- end of inner exception stack trace --- @ system.runtime.asyncresult.end[tasyncresult](iasyncresult result) @ system.servicemodel.activation.hostedhttprequestasyncresult.end(iasyncresult result) @ system.web.httpapplication.callhandlerexecutionstep.onasynchandlercompletion(iasyncresult ar) the staging webserver using iis7.0. have next configuration in web.config:
<behaviors> <servicebehaviors> <behavior name="vatscan.web.chartsservicebehavior"> <servicemetadata httpgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="true" /> </behavior> </servicebehaviors> </behaviors> <services> <service behaviorconfiguration="demoapp.web.chartsservicebehavior" name="demoapp.web.chartsservice"> <endpoint address="" binding="basichttpbinding" bindingconfiguration="servicesbinding" contract="demoapp.web.ichartsservice" /> </service> </services> what surprises me still working fine in higher environment except in staging same configuration mentioned above.
can help me resolve issue?
i have modified httpgetenabled httpsgetenabled in below code in web.config , resolved issue.
<behaviors> <servicebehaviors> <behavior name="demoapp.web.chartsservicebehavior"> <servicemetadata httpsgetenabled="true" /> <servicedebug includeexceptiondetailinfaults="true" /> </behavior> </servicebehaviors> </behaviors> <services> <service behaviorconfiguration="demoapp.web.chartsservicebehavior" name="demoapp.web.chartsservice"> <endpoint address="" binding="basichttpbinding" bindingconfiguration="servicesbinding" contract="demoapp.web.ichartsservice" /> </service> </services> wcf silverlight-5.0
No comments:
Post a Comment