WCF + The system cannot find the file specified + Error RRS feed

  • Question

  • We have an asp.net application which consumes WCF service developed by any 3rd party vendor. In most of the cases it is working as expected, but sometimes it is giving "The system cannot find the file specified" error.

    Environment details:

    • Application Developed in ASP.NET 2.0 + .NET3.5
    • Host: IIS 8.7 + Windows Server 2012;
    • AppPool: Running with a domain service accounts
    • WCF Client - Using nettcp binding with TransportWithMessageCredential security using Certificates
    • WCF Client - Certificate store : Current User\My (AppPool domain user has Certificates in Current User Store)


    • Sometime getting "The system cannot find the file specified" error


    • Is it issue at Service Host Or at Service client?
    • What is the root cause for it?
    • what are the possible resolutions?

    I greatly appreciate any help in resolving the issue.

    Thank you.

    Friday, February 21, 2014 8:12 PM


  • Finally I found the resolution...

    Root Cause:

    The error is due to application is not being able to find certificate files to send to Service Request. Application “App Pool” is trying to load the certificates from Account of App pool runs (domain account) & the profile information is not available to IIS. But once the App Pool user logs-in, account profile will be loaded automatically and available for service call.

    The reason for this behavior is that Service Client's “store location” is selected as “CurrentUser”. Due to this Web Service calls will be successful as long as AppPool User logged in to server. Otherwise it will though the above error.


    1. Solution#1 Change the client Certificate’s “store location” to “LocalMachine”.
    2. Solution#2 Set “Load user Profile=True” for App Pool
      In both cases web site restart required.
    3. Solution#3 A Temporary Solution…keep an active an instance of AppPool User account on Server and Don’t sign-out.
    • Marked as answer by Pradeep Y Monday, February 24, 2014 5:29 AM
    Monday, February 24, 2014 5:29 AM