I've tried to use this interface to search through policies by state or lookup code, but I'm getting an "Specified method not supported" error. I even get this error when just trying to enumerate the Policies collection through the debugger.
Dim creds As NetworkCredential = New NetworkCredential("api", "*****", "[SERVER]")
Using ss As New SelectServer(New Uri("http:\\softpro-app:8080"), creds)
Dim reason As String = String.Empty
If ss.TryAuthenticate(reason) Then
Dim pm As IPolicyManager = ss.GetService(Of IPolicyManager)()
Dim p As IPolicy = pm.Policies.Where(Function(x) x.LookupCode = "Loan Policy").ToList().FirstOrDefault()
End If
End Using
" at SoftPro.OrderTracking.Client.Policies.PolicyManager.GetProfileFilterID(Criteria criteria) at SoftPro.OrderTracking.Client.Policies.PolicyManager.<SoftPro.OrderTracking.Client.Policies.IPolicyManager.get_Policies>b__1(Criteria criteria) at SoftPro.ClientModel.Linq.CriteriaQueryProvider`2.Execute(Expression expression, Boolean enumerable) at SoftPro.ClientModel.Linq.CriteriaQueryProvider`2.Execute[TResult](Expression expression) at SoftPro.ClientModel.Linq.CriteriaQuery`2.GetEnumerator() at System.Linq.SystemCore_EnumerableDebugView`1.get_Items()"
Unfortunately, the exception message you have been provided with is not adequately conveying this situation. I will log a bug in our tracker in this regard.
By the way, when the Order leverages the IPolicyManager, it uses its OwnershipProfile property. If you are trying to replicate the behavior of the application, you will want to use this as well rather than the ActiveProfile.