We are using MIPSDK2016R2 to integrate with xprotect professional+2018R1.We have C# app and it is logging in properly to server. But when log in through soap reply saying unauthorized.How can IIS allow our custom c++ to login to milestone?

I recommend having a look at the LoginDotNetSoap sample.

http://doc.developer.milestonesys.com/html/index.html?base=samples/logindotnetsoap.html&tree=tree_3.html