none
Could not load file or assembly System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089; or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. RRS feed

  • Question

  • Hi,

    1) I have a WCF service configured for WS-HTTP, Transport Mode, ClientCredentialType = Windows and relevant configuration in IIS (HTTPS Certificate and Windows authentication) which was working fine.

    2) Then, when I used Fiddler ( a tool to monitor HTTP(S) traffic here) to see the communication, Fiddler created a number of certificates where one of the certificate had the same name (i.e. IssuedTo field was same) as that of the one I had configured for HTTPS in IIS.

    3) This (two certificates with same IssuedTo field) caused an error. So I shut down Fiddler and deleted the Fiddler created certificate from the certificate store in order to revert it back to a state as it was before when the WCF Service was working.

    4) Now I am getting another error "Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)".

    5) I tried to reset IIS and even restarted my computer. But still I get the error said in point 4.

    6) I then tried to add ".ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;".

    7) But still I get the error.

    Can anybody tell me why this error is happening and/or how to fix it?

    Regards

    Ram



    Thursday, May 31, 2018 8:17 PM

All replies

  • Hi Ram,

    When did you get this error, access the wcf wsdl from web browser?

    If you launch the WCF Service from VS, will you receive the same error?

    I suggest you check whether "System.ServiceModel" is added in your project Reference.

    In addition, if you create a new service, will you receive this error?

    Best Regards,

    Tao Zhou


    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.

    Friday, June 1, 2018 3:21 AM