The system cannot find the file specified. (Exception from HRESULT: 0x80070002) RRS feed

  • Question

  • Hi,

    I have an application which uses Microsoft AD LDS for authentication, we are now changing the server which we were using for authentication.

    Both new and old server have exact same setup of AD LDS. So I changed the webconfig in my code to point to new server for authentication and it works fine on my machine, But when I deploy the code to production I am getting below error.

    The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

    The bizarre thing is when I change the webconfig to point to old server for authentication it is working fine but if i point to new server its giving me an error.

    Note: It works fine from my computer when I run it through visual studio

    old webconfig works fine:

    <add name="ADAMService" connectionString="oldserver:6010" />
        <add name="AzManADAMService" connectionString="msldap://oldserver:6010/CN=AzManADAMStore,DC=TT,DC=COM" />

    new webconfig works fine on local but errors out on production: 

    <add name="ADAMService" connectionString="newserver:6010" />
        <add name="AzManADAMService" connectionString="msldap://newserver:6010/CN=AzManADAMStore,DC=TT,DC=COM" />

    If someone can put some light i would appreciate it.

    thanks in advance.

    • Moved by CoolDadTx Monday, September 25, 2017 2:10 PM ASP.NET related
    Wednesday, September 20, 2017 4:09 PM

All replies

  • Make sure NetworkService or the AppPoolIdentity of your worker process has the right to query the ADAM store as outlined in here.
    Thursday, September 21, 2017 2:14 AM
  • Hello,

    Web question you should post to there.



    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.

    Sunday, September 24, 2017 10:30 AM