Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Automation of target authentication with C# Veristand API

Solved!
Go to solution
Highlighted

Hi!

 

I am trying to use Veristand .NET APIs to connect and deploy to a target systems (namely, a PharLap machine). I started from the tutorial C# Walkthrough: Opening and Running a Project. This is what I have:

 

var path = "I:\\vicrt\\demo_veristand\\vicrt_demo_abs.nivssdf";
Factory factory = new Factory();
IWorkspace2 workspace = factory.GetIWorkspace2("localhost");

workspace.ConnectToSystem(systemDefinitionPath, true, 60000);

 

However, the call to ConnectToSystem causes a WebDAV Login dialog to appear asking to insert username and password. I would like to automate also the authentication process because the application I am developing needs to be run in an unattended fashion.

 

Question: How can I programmatically pass username and password to the Veristand API?

 

Thanks!

Ivan

0 Kudos
Message 1 of 2
(255 Views)
Solution
Accepted by topic author ivan.muzzolini
04-09-2019 11:59 PM

Hi Ivan,

since the WebDAV login isn't accessible programmatically, the best workaround is to set the username/password combination to be

  • Username: admin
  • Password: <blank>

This is the default that the WebDAV login tries first before prompting the user to login with other user credentials. If you use the default login, WebDAV will log in and deploy automatically.

If for some reason you can't do that, an alternative way is to create as much functionality as possible in a single VeriStand project. Because you're only deploying one project, you will only have to log in once. This will allow the project to run for a longer amount of time on its own without user input.

Regards,

Alessia

0 Kudos
Message 2 of 2
(168 Views)