Hi, I am getting an authentication exception InvalidCredentialsMIPException when connecting from the 2014 SP3 MIPS SDK to XProtect Corporate v10.0. using Basic authentication. It works fine using windows authentication. Also I have been able to connect fine using the XProtect smart client 2016_10a with Basic authentication.
Here is my code:
Try
Dim uri = New Uri(uriStr)
Dim credentialCache As Net.CredentialCache = VideoOS.Platform.Login.Util.BuildCredentialCache(uri, username, password, "Basic")
VideoOS.Platform.SDK.Environment.RemoveAllServers()
VideoOS.Platform.SDK.Environment.AddServer(uri, credentialCache)
VideoOS.Platform.SDK.Environment.Login(uri, True)
Catch ex As ServerNotFoundMIPException
errorMessage = "Unable to connect to server: " & uriStr
Catch ex As InvalidCredentialsMIPException
errorMessage = "Invalid credentials for: " & uriStr
Catch ex As Exception
errorMessage = "Internal error connecting to: " & uriStr & " " & ex.Message
End Try
Thanks for any help,
-Lou
I usually recommend he CameraStreamResolution sample for seeing how to make a hardcode login. I cannot see any flaw in your login code, but perhaps you can see if the sample works, and do a closer comparison.
One thing; you are using an older MIP SDK, Milestone recommend that you always develop using the newest, (Currently this is MIP SDK 2016 R3 10.2)
Thanks for the reply Bo. I tried the CameraStreamResolution sample and got the same error. So there seems to be an incompatibility between the 2014 SP3 MIP SDK and the XProtect Corporate 10 server. I will try with the newer SDK 2016 R3 10.2.
I would suspect the user setup. I know there was an issue where if you deleted a basic user then re-created the user with the same name it did not work, however this should be a issue of the past and solved in the server you have. If you create a new user does it work?
Bo, I created a brand new user and added that user to the Administrators role. It does not work.
I ran the VideoViewer sample under Milestone\MIPSDK\ComponentSamples in the 2016 R3 SDK and was able to connect to a camera using Basic authentication (and could view the live video stream).
The same user from the same PC can login using Smart Client.. This is now a real mystery. If you login from another PC in your network do you see the same? If you attempt the login in the server itself, what then?
Attempt the login from a PC, not the server, and make a network communication trace (using Wireshark), let me see it.
--
For information on how to perform a network trace using the Wireshark software (freeware), please see :
http://www.milestonesys.com/download/using%20wireshark.pdf
Once complete, please remember to include any relative network information such as server, client or camera IP, subnet and MAC address if possible.
I guess our posts crossed. I am glad you have it working!
Well…the Basic auth login works using the newer SDK (2016 R3) - but not using the older SDK (2014 SP3). Unfortunately for us, our current Milestone video integration product was coded with SDK 2014 SP3. So it looks like we need to create an updated Milestone integration product that uses the 2016 R3 SDK - because Basic authentication to the newer Milestone server (XProtect Corporate v10) does not appear to work from the 2014 SP3 SDK. Let me know if you see any way to avoid having to do that. Thanks for your help.
OK. Try not to rebuild but exchange the VideoOS.Platform.SDK.dll and other dlls with the ones from the newer SDK. (Experimental.)
One question; are you using standard ports 80 and 443?
Yes we are using standard ports 80 and 443.
The 2016 R3 SDK use 64 bit dotnet DLL’s which will cause us to have to recompile because our existing integration uses 32 bit DLL’s. Also we support clients that have dotNet 4.0 but the new SDK seems to require 4.5. I read in the online documentation that you do have a 32 bit version of the 2016 R3 SDK available. Can you let me know how to get that? Then I might be able to swap the DLL’s directly. Thanks,
-Lou