I needaccessing SCS 5.0 Web Servicesprogramatically from a computer which is not part of SCS Active Directory Group, so I added by code the rigth credential with granted access, something like this:
netCred = new NetworkCredential("ScsActiveDirectoryUserName","ScsActiveDirectoryUserPassword");
but I got an unauthorized exception. What's wrong?
Let us know how it goes.
BTW, here is the response that we got from the SCS support on your Network Credentials question:
We think you can try the following:
1. Use the machine where SCS is installed. Open Administrative Tools -Internet Information Services (IIS) Manager - Expend Web Sites tree.
2. Right click the AMTSCS / AMTSCS_RCFG web site (the name may be different depending on your installation process). Click Properties - choose Directory Security tab - click Edit in the Authentication and access control section.
3. Check the Digest Authentication check box (leave Integrated Windows Authentication checked)
4. Click OK.
Could you check this and get back to us?
https://192.168.1.1/amtscs/mod_gsoap.dll?services(with server IP)
I tried it and I got the same exception: "The request failed with HTTP status 401: Unauthorized.".
I also tried with CredentialCache.DefaultCredential I got the same.
I haven't tried this yet so I'm not sure if it will help, but have you tried creating the NetworkCredential object with the username, password, and domain? Most of the examples in MSDN about NetworkCredential use the constructor with all three, so it seems like it'd be worth trying. Given that you're calling from a system that isn't part of the domain, specifying the domain name seems reasonable.