Without DialogLoginForm
I want to connect to the client from the third party using IP, user ID, and user password
I tried using CentralDemo.csproj but it failed.
DialogLoginForm succeeded with the same information.
I want to know how to connect using the entered user information
Please provide the corresponding sample code.
Hi. Use e.g. StatusDemoConsole sample. It shows how you can login without UI form.
Thanks for the quick answer.
The StatusDemoConsole sample can be found by entering the IP address in the MIP Client in args
Enter the URL of the MIP Client, but how do I enter the MIP Client ID and MIP Client password?
If you mean basic authentication where you enter user’s login and password, then here is an example:
CredentialCache cc = Util.BuildCredentialCache(uri, userName, password, "Basic");
Environment.Initialize();
Environment.AddServer(uri, cc);
Environment.Login(uri);
Uri uri = new Uri(“http://192.168.100.190”);
System.Net.CredentialCache cc = VideoOS.Platform.Login.Util.BuildCredentialCache(uri, "ClientID", "ClientPW", "Basic");
VideoOS.Platform.SDK.Environment.Initialize();
VideoOS.Platform.SDK.Environment.AddServer(uri, cc);
VideoOS.Platform.SDK.Environment.Login(uri);
Is this the right code to work with?
it does not work
Yes, this looks right. Make sure that in Management Client you have created a basic user with the name “ClientID” and with the password “ClientPW”, and gave him a role (can be administrator role to test).
I have a favor to ask
bool isStarted = false;
_cameraItem = new Item();
\_cameraItem.Name = m\_strCameraName;
List<Item> audioSources = new List<Item>();
mExporter = new VideoOS.Platform.Data.MKVExporter() { Filename = "fffffffffffff" };
mExporter.Init();
mExporter.Path = Path.Combine( m\_strSaveFolder);
mExporter.CameraList = new List<Item>() { \_cameraItem };
mExporter.AudioList = audioSources;
DateTime dateStart = DateTime.Parse(m\_strStartTime);
DateTime dateEnd = DateTime.Parse(m\_strEndTime);
isStarted = mExporter.StartExport(dateStart, dateEnd);
mExporter.StartExport In this code
A VideoOS.Platform.NotAuthorizedMIPException occurs.
Is there a problem with the above code?