none
WCF stuck on load RRS feed

  • Question

  • I use IAuthentication to do my own credential handling via another WCF-service on the same IIS. Now it seems, that under load the system is blocked. Is it generally a bad idea to call a service at that stage? Or do anything heavy? 

    Generally speaking: WCF-services can call other services without problems?


    Thomas Steiner

    Tuesday, August 29, 2017 8:03 PM

All replies

  • Hi EIFrogo,

    >>WCF-services can call other services without problems?

    What are the other services? In general, there is no problem to other services like WCF Services, Web API and etc. from WCF Service.

    It would be helpful if you could share us a simple project and detail steps to reproduce your issue.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 30, 2017 1:29 AM
  • Hi Edward

    Its all WCF-Services.
    We also use for each Method a parameter-inspector (IParameterInspector) and have overrides of ServiceAuthorizationManager and ServiceAuthenticationManager.

    See this snippet of web.config for "CallWrapper" which uses IParameterInspector:
     
     <system.serviceModel>
      <extensions>
       <behaviorExtensions>
        <add name="CallWrapper" type="Clx.Epayment.ServiceSecurity.CallWrapperServiceElement, Clx.Epayment.ServiceSecurity"/>
       </behaviorExtensions>
      </extensions>
     ...

    See this snippet of web.config for "CallWrapper" which uses IParameterInspector:

     <behavior name="ServiceBehaviorWithUserName">
      <CallWrapper/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
       <serviceCredentials>
        <userNameAuthentication userNamePasswordValidationMode="Custom"
         customUserNamePasswordValidatorType="Clx.Epayment.ServiceSecurity.CustomValidator, Clx.Epayment.ServiceSecurity"/>
       </serviceCredentials>
      <serviceAuthorization
       principalPermissionMode="Custom"
       serviceAuthorizationManagerType="Clx.Epayment.ServiceSecurity.CustomAuthorizationManager,Clx.Epayment.ServiceSecurity">
       <authorizationPolicies>
        <add policyType="Clx.Epayment.ServiceSecurity.AuthorizationPolicy, Clx.Epayment.ServiceSecurity"/>
       </authorizationPolicies>
      </serviceAuthorization>
      <serviceAuthenticationManager
       serviceAuthenticationManagerType="Clx.Epayment.ServiceSecurity.CustomAuthenticationManager, Clx.Epayment.ServiceSecurity"/>
      <serviceThrottling
       maxConcurrentCalls="10000"
       maxConcurrentSessions="10000"
       maxConcurrentInstances="10000"/>
       ...
      ...
     ...

    The underscored parts indicate where we use our own implementation.
    Since all these custom-code is executed before the actual method we think that this could have an impact


    Thomas Steiner

    Wednesday, August 30, 2017 9:45 AM
  • Hi EIFrogo,

    Could you share us a simple project through OneDrive which could reproduce your issue?

    Per to your description, I only could know your WCF Service is stuck and you implement custom IParameterInspector. Without reproducing your issue, I am afraid I could provide the help is limited.

    I would suggest you debug your code line by line to check which code make it stuck, and check whether it is stuck on the first service or second service.

    If you create a new method in first service without calling the second service, will it be stuck on load?

    If you create a new service without custom authentication, and call it from the first service, will it be stuck?

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, August 31, 2017 2:31 AM