0

I am working on labeling of documents using MIP SDK 1.7.133. The code is working fine in local machine and IIS (windows). But when I run the labeling code in Azure App Service, I get the following error:

"Message": "An error has occurred.", "ExceptionMessage": "SSL failure Inner exception: [http_exception: 'WinHttpSendRequest: 12030: The connection with the server was terminated abnormally'], CorrelationId=56acdff3-ec61-4723-8bee-21ea49f27334, CorrelationId.Description=PolicyProfile, HttpRequest.Id={6187BC6B-FF2E-419C-BB8D-34B828B5C105}, HttpRequest.SanitizedUrl=https://dataservice.protection.outlook.com/PsorWebService/v1/ClientSyncFile/MipPolicies, NetworkError.Category=SSL", "ExceptionType": "Microsoft.InformationProtection.Exceptions.NetworkException", "StackTrace": " at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n...

The code before failure:

 public ProtectionManager(ProtectionParameters protectionParameters)
    {
        _appInfo = new ApplicationInfo()
        {
            ApplicationId = protectionParameters.ClientId,
            ApplicationName = protectionParameters.AppName,
            ApplicationVersion = protectionParameters.AppVersion
        };
        _protectionParameters = protectionParameters;
        _authDelegate = new AuthDelegateImplementation(_appInfo, _protectionParameters);
        var path = Path.Combine(
        Directory.GetParent(Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath)).FullName,
        Environment.Is64BitProcess ? "bin\\x64" : "bin\\x86");
        
        MIP.Initialize(MipComponent.File, path);
        
        Identity id = new Identity($"{_appInfo.ApplicationId}@{_protectionParameters.Tenant}");
        
        profile = CreateFileProfile(_appInfo);
        
        engine = CreateFileEngine(id);
    }

    private IFileProfile CreateFileProfile(ApplicationInfo appInfo)
    {
        string appPath = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).AbsolutePath);
        mipContext = MIP.CreateMipContext(appInfo, Path.Combine(appPath,"mip_data"), Microsoft.InformationProtection.LogLevel.Trace, null, null);
        // Initialize file profile settings to create/use local state.                
        var profileSettings = new FileProfileSettings(mipContext, CacheStorageType.InMemory, new ConsentDelegateImplementation());            
        var profile = Task.Run(async () => await MIP.LoadFileProfileAsync(profileSettings)).Result;
        return profile;

    }

    private IFileEngine CreateFileEngine(Identity identity)
    {
                 
        var engineSettings = new FileEngineSettings(identity.Email, _authDelegate, "", "en-US")
        {                
            Identity = identity,                                                          
        };            
        **var engine = Task.Run(async () => await profile.AddEngineAsync(engineSettings)).Result;**
        return engine;
    }

Would be glad to hear any thoughts. Thanks.

1 Answer 1

0

Somebody ran in to this yesterday and mentioned that changing the target .NET framework fixed the issue.

MIP SDK error while deploying in Azure - SSL failure Inner exception: [http_exception: 'WinHttpSendRequest' CorrelationId.Description=PolicyProfile

You might comment on his post for specifics. I can add this to our documentation once I have details :)

Sign up to request clarification or add additional context in comments.

1 Comment

This person is from my team)) That was incorrect suggestion about .NET Framework. It doesn't fix an issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.