none
Set-WebServicesVirtualDirectory command generates "EWSServiceCredentials could not be loaded" error RRS feed

  • Question

  • Hi all,

    I was just running a simple Set-WebServicesVirtualDirectory command in my Exchange 2010 On-premise server and it complained  "EWSServiceCredentials could not be loaded".  

    I went to the actual web.config file line 2426 and I saw the following.

         <EWSServiceCredentials>
          <issuedTokenAuthentication certificateValidationMode="None">
           <knownCertificates />
          </issuedTokenAuthentication>
         </EWSServiceCredentials>

    Is my config file missing something?

    Details of the error message is below.

    Set-WebServicesVirtualDirectory -Identity "WEBMAIL\EWS (Default Web Site)" -WSSecurityAuthentication $False

    The type 'Microsoft.Exchange.Services.Wcf.EWSServiceCredentialsElement, Microsoft.Exchange.Services, Version=14.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' registered for extension 'EWSServiceCredentials' could not be loaded. (C:\Program
    Files\Microsoft\Exchange Server\V14\ClientAccess\exchweb\EWS\web.config line 2426)
    At C:\Users\user\AppData\Local\Temp\tmp_vu5qnkou.kpj\tmp_vu5qnkou.kpj.psm1:57997 char:9
    +         $steppablePipeline.End()
    +         ~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (WEBMAIL\EWS (Default Web Site):ADObjectId) [Set-WebServicesVirtualDirectory], ConfigurationErrorsException
        + FullyQualifiedErrorId : C9B73B43,Microsoft.Exchange.Management.SystemConfigurationTasks.SetWebServicesVirtualDirectory
        + PSComputerName        : domain.com.au

    Friday, July 26, 2019 7:30 AM

All replies

  • Hi Blue,

    Which server role did you use to run this command ?

    Based on my test, if i run this command on mailbox server role, i will get the same error, as below:

    Run the command on Exc2010MBX1 server, this is a mailbox server role only:

    However, if i run the command on a CAS server role, it will work as expected, as below:


    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com

    Monday, July 29, 2019 8:56 AM
    Moderator
  • Thank you Niko.

    You have given me a good clue.  I will try it out.

    Friday, August 2, 2019 12:45 AM
  • Hi Blue,

    Just checking in to see if above information was helpful. Please let us know if you would like further assistance. 


    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com

    Friday, August 2, 2019 8:06 AM
    Moderator
  • Hi Blue,

    If you have any questions or needed further help on this issue, please feel free to post back. If the issue has been resolved, please mark the helpful replies as answers, this will make answer searching in the forum easier and be beneficial to other community members as well.

    Thanks for your understanding.


    Best Regards,
    Niko Cheng


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com

    Thursday, August 8, 2019 1:28 AM
    Moderator