none
Cannot host WCF in Windows Server 2008 R2

    Question

  • I have develop a WCF service using Visual Studio 2008 and windows 7.  Now when i have deployed the WCF oin a Windows Server 2008 R2, i got hthis error:

    Field not found: 'System.ServiceModel.Activation.HostedServiceTransportSettings.IisExtendedProtectionPolicy'.

     

    I have try numerous solution but in vain... can you please help in in solving this problem

     

    Thanks

    Heveen


    Heveen Sharma KEJIOU Software Engineer
    Wednesday, October 06, 2010 11:00 AM

Answers

  • Hi

    Have you this line within your config file

    <extendedProtectionPolicy policyEnforcement="Never" />

    The complexity resides in the simplicity
    Wednesday, October 06, 2010 7:21 PM

All replies

  • Hi

    Have you this line within your config file

    <extendedProtectionPolicy policyEnforcement="Never" />

    The complexity resides in the simplicity
    Wednesday, October 06, 2010 7:21 PM
  • Hi

    Can you tell me where to put this line in the config file.

    Will it be inside System.ServiceModel.Activation?


    Heveen Sharma KEJIOU Software Engineer
    Friday, October 15, 2010 7:16 AM
  • Hi

    You put this in the custom binding that is used

    <security mode="Transport">
    <transport clientCredentialType="None" proxyCredentialType="None" realm="">
    <extendedProtectionPolicy policyEnforcement="Never"/>
    </transport>

    The complexity resides in the simplicity
    Friday, October 15, 2010 9:02 AM
  • The problem is not solved if i use the above code.

    1st, in the config file, under custom binding, i only get httpTransport or httpsTransport.

    The transport attribute does not exist.  Maybe am miising something. 

    <

     

    security mode="Transport">

    <

     

    transport clientCredentialType="None" proxyCredentialType="None" realm="">

    <

     

    extendedProtectionPolicy policyEnforcement="Never"/>

    </

     

    transport>

     

     

     

     

     I have developed the WCF service and host it on the Visual Studio Web Server.  And i have implement a Test project which i use to call my WCF service which is hosting on the VS Web Server.  Everything is fine and works perfectly.

     

    But when i put my WCF service onto IIS of my own laptop, i got the following error:

    Server Error in '/lime' Application.

    Field not found: 'System.ServiceModel.Activation.HostedServiceTransportSettings.IisExtendedProtectionPolicy'.

     

     

    Did i really missed something in the web config?

     

     

     

     

    <bindings>
       <customBinding>
        <binding name="LIMEAPUnsecureCustomBinding" closeTimeout="00:20:00"
         openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00">
     <textMessageEncoding messageVersion="Soap11WSAddressing10">
      <readerQuotas maxDepth="104857600" maxStringContentLength="104857600"
             maxArrayLength="104857600" maxBytesPerRead="104857600" maxNameTableCharCount="104857600" />
     </textMessageEncoding>
     <httpTransport manualAddressing="false" maxBufferPoolSize="104857600"
             maxReceivedMessageSize="104857600" maxBufferSize="104857600" authenticationScheme="Basic"/>
    </binding>
    
    </customBinding>
    </bindings>
    
     <services>
      <service behaviorConfiguration="LIMEService.ResourceBehaviorNoSecurity"
        name="LIMEService.ResourceService">
        <endpoint address="" binding="customBinding" bindingConfiguration="LIMEAPUnsecureCustomBinding"
          contract="eu.peppol.lime.api.interfaces.Resource" >
         <identity>
          <dns value="localhost" />
         </identity>
        </endpoint>
        <host>
         <baseAddresses>
          <add baseAddress="http://dev.mailedi.mu/lime/ResourceService.svc"/>
         </baseAddresses>
        </host>
       </service></services>
    
    <behaviors>
     <serviceBehaviors>
     <behavior name="LIMEService.ResourceBehaviorNoSecurity">
         <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
         <serviceMetadata httpGetEnabled="True" />
         <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
         <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
     </serviceBehaviors>
      </behaviors>
    

     Or did i miss something in the IIS?

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.MissingFieldException: Field not found: 'System.ServiceModel.Activation.HostedServiceTransportSettings.IisExtendedProtectionPolicy'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [MissingFieldException: Field not found: 'System.ServiceModel.Activation.HostedServiceTransportSettings.IisExtendedProtectionPolicy'.]
      System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.ProcessWindowsAuthentication(String siteName, String virtualPath, HostedServiceTransportSettings& transportSettings) +0
      System.ServiceModel.WasHosting.MetabaseSettingsIis7V2.CreateTransportSettings(String relativeVirtualPath) +105
      System.ServiceModel.Activation.MetabaseSettingsIis.GetTransportSettings(String virtualPath) +140
      System.ServiceModel.Activation.MetabaseSettingsIis.GetAccessSslFlags(String virtualPath) +4
      System.ServiceModel.Activation.MetabaseSettings.GetAllowSslOnly(String virtualPath) +7
      System.ServiceModel.Activation.HttpHostedTransportConfiguration.GetBaseAddresses(String virtualPath) +87
      System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetBaseAddresses(String virtualPath) +114
      System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +130
      System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +42
      System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +493
    
    [ServiceActivationException: The service '/lime/ResourceService.svc' cannot be activated due to an exception during compilation. The exception message is: Field not found: 'System.ServiceModel.Activation.HostedServiceTransportSettings.IisExtendedProtectionPolicy'..]
      System.ServiceModel.AsyncResult.End(IAsyncResult result) +5754770
      System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +196
      System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +214
      System.ServiceModel.Activation.HttpModule.ProcessRequest(Object sender, EventArgs e) +267
      System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
      System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    

    Heveen Sharma KEJIOU Software Engineer
    Friday, October 15, 2010 12:00 PM
  • Hi

    I'm not sure but try to see if WCF  still not be registered yet on your box by default

    in the run zone

    c:\…>"%windir%\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r

    I repeat, Im not sure so be good documented an aware about ServiceModelReg.exe -r before executing it. I hope that helps


    The complexity resides in the simplicity
    Friday, October 15, 2010 1:26 PM
  • i have tried all these things....
    But still its not working...

    I cant understand how it work on the Buit-in Web Server of VS 2008 but not on IIS 7.5..

    An there is nothing like this on MSDN...


    Heveen Sharma KEJIOU Software Engineer
    Monday, October 18, 2010 12:19 PM
  • Heveen - I'm having the exact same problem as far as it running fine in VS2010 but not under IIS.  It does work under my localhost Windows XP but not on Windows Server 2008.  I have see that error you had but now all I get is a generic "you suck" error.

    Did you ever solve this?

    Wednesday, June 22, 2011 9:08 PM