C# Application using MIP SDK works on one machine but not on other ( fails at API profile_add_engine_async )

Kalpesh Parmar 5 Reputation points
2024-02-07T16:40:53.52+00:00

I have a C# Application built using MIP SDK to read / update sensitivity labels on a given document. This is a command line executable and it works just fine on one test server but not on another while both are configured as per the SDK documentation. All When compared the logs between a successful run on one DEV server v/s failed run on TST server, I see following difference at API - profile_add_engine_async

In both cases, I Token is printed on the console. So, till that point it is working fine.

Can someone help me understand why this happening and what I can do to fix it?

Success log :

Info 2024-02-07 16:22:25.332 policy_profile_impl.cpp:522 ReadSafetyLabel (7132) "Starting API task: profile_add_engine_async" mipns::ProfileImpl::AddEngineAsync 11136

Info 2024-02-07 16:22:25.332 policy_profile_impl.cpp:522 ReadSafetyLabel (7132) "Starting API task: profile_add_engine_async scenarioId=23ea32e1-61ae-4034-8992-1bcd8b26775d" mipns::ProfileImpl::AddEngineAsync 11136 Info 2024-02-07 16:22:25.332 policy_profile_impl.cpp:244 ReadSafetyLabel (7132) "Starting to add policy engine with engine id: user2@tenant.com" `anonymous-namespace'::CreateEngineAsync 11136 Trace 2024-02-07 16:22:25.332 policy_engine_manager_impl.cpp:480 ReadSafetyLabel (7132) "PolicyEngineManager::AddEngineAsync user2@tenant.com" mipns::PolicyEngineManagerImpl::AddEngineAsync 11136 Trace 2024-02-07 16:22:25.332 persistent_store_impl.cpp:126 ReadSafetyLabel (7132) "PersistentStoreImpl::Find: Trying to find rows for table: Policies started" mipns::PersistentStoreImpl::Find 11136 Trace 2024-02-07 16:22:25.332 sqlite_storage_table.cpp:186 ReadSafetyLabel (7132) "SQLiteStorageTable::Find: Trying to find rows for table: Policies" mipns::SQLiteStorageTable::Find 11136 Trace 2024-02-07 16:22:25.332 persistent_store_impl.cpp:136 ReadSafetyLabel (7132) "PersistentStoreImpl::Find: Trying to find rows for table: Policies completed" mipns::PersistentStoreImpl::Find 11136 Trace 2024-02-07 16:22:25.332 encrypted_persistent_store.cpp:292 ReadSafetyLabel (7132) "EncryptedPersistentStore::Find: Got back 1 rows for table:Policies" mipns::EncryptedPersistentStore::Find 11136 Info 2024-02-07 16:22:25.332 encrypted_persistent_store.cpp:461 ReadSafetyLabel (7132) "Decrypting column 'policy_data' in table 'Policies' with key 'user2@tenant.com'" mipns::EncryptedPersistentStore::EnsureDecryptedRow 11136

Failure Log:

Info 2024-02-07 16:23:50.984 policy_profile_impl.cpp:522 ReadSafetyLabel (1600) "Starting API task: profile_add_engine_async" mipns::ProfileImpl::AddEngineAsync 11616

Info 2024-02-07 16:23:50.984 policy_profile_impl.cpp:522 ReadSafetyLabel (1600) "Starting API task: profile_add_engine_async scenarioId=ef7d8e1e-2041-4ab1-b6d1-ce757445d419" mipns::ProfileImpl::AddEngineAsync 11616 Info 2024-02-07 16:23:50.984 policy_profile_impl.cpp:244 ReadSafetyLabel (1600) "Starting to add policy engine with engine id: user2@tenant.com" `anonymous-namespace'::CreateEngineAsync 11616 Trace 2024-02-07 16:23:50.984 policy_engine_manager_impl.cpp:480 ReadSafetyLabel (1600) "PolicyEngineManager::AddEngineAsync user2@tenant.com" mipns::PolicyEngineManagerImpl::AddEngineAsync 11616 Trace 2024-02-07 16:23:50.984 persistent_store_impl.cpp:126 ReadSafetyLabel (1600) "PersistentStoreImpl::Find: Trying to find rows for table: Policies started" mipns::PersistentStoreImpl::Find 11616 Trace 2024-02-07 16:23:50.984 sqlite_storage_table.cpp:186 ReadSafetyLabel (1600) "SQLiteStorageTable::Find: Trying to find rows for table: Policies" mipns::SQLiteStorageTable::Find 11616 Trace 2024-02-07 16:23:50.984 sqlite_storage_table.cpp:213 ReadSafetyLabel (1600) "Found no matching rows." mipns::SQLiteStorageTable::Find 11616 Trace 2024-02-07 16:23:50.984 persistent_store_impl.cpp:136 ReadSafetyLabel (1600) "PersistentStoreImpl::Find: Trying to find rows for table: Policies completed" mipns::PersistentStoreImpl::Find 11616

Azure Information Protection
Azure Information Protection
An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
519 questions
Microsoft Purview
Microsoft Purview
A Microsoft data governance service that helps manage and govern on-premises, multicloud, and software-as-a-service data. Previously known as Azure Purview.
948 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,294 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Givary-MSFT 28,406 Reputation points Microsoft Employee
    2024-02-27T11:15:24.6033333+00:00

    @Kalpesh Parmar I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Issue: I have a C# Application built using MIP SDK to read / update sensitivity labels on a given document. This is a command line executable and it works just fine on one test server but not on another while both are configured as per the SDK documentation. All When compared the logs between a successful run on one DEV server v/s failed run on TST server, I see following difference at API - profile_add_engine_async

    In both cases, I Token is printed on the console. So, till that point it is working fine. Can someone help me understand why this happening and what I can do to fix it?

    Resolved by Kalpesh Parmar by following the below steps:

    The root case was that the server where we had timeout issue did not have explicit WinHTTP Proxy setting. It had only Internet browsing proxy setting done via Internet Explorer -->LAN settings. After following the steps outlined in this article https://learn.microsoft.com/en-us/information-protection/develop/concept-mip-proxies and configuring the WinHTTP proxy explicitly using 'netsh winhttp import proxy source=ie' the issue got resolved.

    If you have any other questions or are still running into more issues, please let me know.

    Thank you again for your time and patience throughout this issue.

    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.