forms - WCF service not accessible in Windows Server 2008 -


i built wcf service, , i'm deploying windows server 2008. right now, don't have secure protocol turned on. will. i'd working either way. in site, i've had anonymous authentication enabled forms authentication. reason did prevent authentication popup on ipad, android , internet explorer. login screen. oh , did activate wcf in windows features. if you're knowledgeable making https ready, i'd figure out. thanks!!

i'm getting error when try pasting in *.svc path url.

system.servicemodel.serviceactivationexception: service '/wcfservices/accessioning/quickdataentryservice.svc' cannot activated due exception during compilation

here web.config configuration far.

<system.servicemodel>     <servicehostingenvironment aspnetcompatibilityenabled="true">         <!--<baseaddressprefixfilters>             <add prefix="http://localhost/" />         </baseaddressprefixfilters>-->     </servicehostingenvironment>     <behaviors>         <endpointbehaviors>             <behavior name="aspnetajaxbehavior">                 <enablewebscript />             </behavior>         </endpointbehaviors>         <servicebehaviors>             <behavior name="servicebehavior">                 <servicedebug includeexceptiondetailinfaults="true" />                 <servicemetadata httpgetenabled="true" />             </behavior>             <!-- watch section when adding new wcf service!  new behaviors added; delete them , use "servicebehavior" -->         </servicebehaviors>     </behaviors>     <services>         <service behaviorconfiguration="servicebehavior" name="a.lims.ui.web.wcfservices.accessioning.quickdataentryservice">             <endpoint behaviorconfiguration="aspnetajaxbehavior" binding="webhttpbinding"                 contract="a.lims.ui.web.wcfservices.accessioning.quickdataentryservice" />             <endpoint address="mex" binding="mexhttpbinding" contract="imetadataexchange" />         </service>         <!--<service name="a.lims.ui.web.wcfservices.accessioning.iquickdataentryservice"                  behaviorconfiguration="servicebehavior">             <endpoint behaviorconfiguration="aspnetajaxbehavior"                       binding="webhttpbinding"                       contract="a.lims.ui.web.wcfservices.accessioning.iquickdataentryservice" />         </service>-->         <!-- watch section when adding new wcf service!  duplicate "quickdataentryservice" above example, change qualified name -->     </services> </system.servicemodel> 

i have no clue caused exception above, here final verdict. there lot of things required wcf , using ssl certificate (https protocol). pardon formatting.. don't how stack overflow puts code block , doesn't.

the following required web.config on https:

here places required "requiressl" attribute:

<authentication mode="forms"> <forms loginurl="login.aspx" timeout="30" protection="all" requiressl="true" /> </authentication> <httpcookies httponlycookies="false" requiressl="true" domain="" />

notice "s" in "httsgetenabled" below:

<behaviors> <endpointbehaviors> <behavior name="aspnetajaxbehavior"> <enablewebscript /> </behavior> </endpointbehaviors> <servicebehaviors> <behavior name="servicebehavior"> <servicedebug includeexceptiondetailinfaults="true" /> <servicemetadata httpsgetenabled="true" /> </behavior> </servicebehaviors> </behaviors>

bindings (missing in non-ssl web.config):

<bindings> <webhttpbinding>
<binding name="webbinding">
<security mode="transport"> </security>
</binding>
</webhttpbinding> </bindings>

services (notice "s" in "mexhttpsbinding"):

    <services>         <service behaviorconfiguration="servicebehavior" name="a.lims.ui.web.wcfservices.accessioning.quickdataentryservice">             <endpoint behaviorconfiguration="aspnetajaxbehavior" binding="webhttpbinding" bindingconfiguration="webbinding" contract="a.lims.ui.web.wcfservices.accessioning.quickdataentryservice" />             <endpoint address="mex" binding="mexhttpsbinding" contract="imetadataexchange" />         </service>      </services> 

last not least. i'm not using .net 4.0, did try .net on different machine. .net 4.0 couldn't wcf services work without having configured actual url being used. if there 2 domains same ip, wcf worked domain in block inside system.servicemodel xml block in web.config. did not test https in .net 4.0, i'm assuming protocol on url https below:

<servicehostingenvironment aspnetcompatibilityenabled="true"> <baseaddressprefixfilters> <add prefix="http://subdomain.domain.com/" /> </baseaddressprefixfilters> </servicehostingenvironment>

oh, had turn on wcf on windows server 2008 box. , required server reboot!


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -