How can I get camera's username and password in windows service application?

I want to get camere’s IP,port,userName and password. And I can get this information when I use configDump. When I copy this code to my application,I can’t get this information. My appliction is a windows service. And I login in Milestone Service by code

"

  **VideoOS.Platform.SDK.Environment.Initialize();**

  **string url = "[http://localhost](http://localhost)";**

  **Uri uri = new UriBuilder(url).Uri;**

  **NetworkCredential networkCredential = CredentialCache.DefaultNetworkCredentials;**

  **VideoOS.Platform.SDK.Environment.AddServer(uri, networkCredential);**"

I suspect that I login in without administrator. And I don’t konw how to login in by administrator type.

Can you give me some suggestion?

When using the MIP configuration the camera IP, port, user name and password is available in a Management Client (+Management Application) plugin, but it is not available in other environments.

If you compare the ConfigDump tool sample run in the Management Client with the ConfigAccessViaSDK standalone sample you can observe how the information is not there in standalone.

The IP address can be retrieved via another method. See the PlaybackUser (or PlaybackWpfUser) sample and explore the “IP” button action.

User name and password for a camera is not part of the MIP configuration information. In c-code XProtect servers you can use the Configuration API instead. Try to explore the Config API Client sample.

Configuration API was introduced in XProtect c-code in 2014. C-code servers are XProtect Corporate, Expert and Plus products.