Community
cancel
Showing results for 
Search instead for 
Did you mean: 
jacace
Black Belt
77 Views

SCS 5.0 Integrated Windows Authentication

Hi there,

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:

NetworkCredential

netCred = new NetworkCredential("ScsActiveDirectoryUserName","ScsActiveDirectoryUserPassword");

MyService.Credentials=netCred;

MyService.PreAuthenticate=true;

but I got an unauthorized exception. What's wrong?

Many Thanks,

Javier Andrs

0 Kudos
18 Replies
77 Views

Hi Javier,
We have escalated this question to the SCS support. Will get back to you as soon as we hear from them.
Thanks,
Sree

jacace
Black Belt
77 Views

Hi Javier,
We have escalated this question to the SCS support. Will get back to you as soon as we hear from them.
Thanks,
Sree

Hello Sree,

Many thanks,

Javier Andrs

77 Views

Hi Javier,

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?

Thanks,

Sree

jacace
Black Belt
77 Views

Hello Sree,
I have followed the given steps andI still can not access the SCS Web Service by code.
I'm gettingthis Exception:"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.".
When I tried to access the SCS Web Servicevia Internet ExplorerIt appeared a Login Window and if I use the same username and passwordI'musing by code I can access (and I can see a gsoap error message).
The URL I used in Internet Explorer is (which one is the same I setup with code):
Many thanks,
Javier Andrs

jacace
Black Belt
77 Views

I forgot to mention that if Iaccess the Web Service by host name ONLY (https://TFSRTM/amtscs/mod_gsoap.dll?services)I got this Exception:

The request failed with HTTP status 401: Unauthorized.

I think when I access it by host nameONLY Microsoft .Net Framework accepts the certificate cause HTTPS request matches the "issued to" certificate server name.
Thanks a lot,
Javier Andrs

jacace
Black Belt
77 Views

Hello Sree,
It's just to know if I need to provide further information?
Javier Andrs

77 Views

Hi,
We are working on this. Will get back to you soon.
Thanks,
Sree

Randal_T_Intel
Employee
77 Views

Try the following
MyService.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
jacace
Black Belt
77 Views

Try the following
MyService.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

Hello Randal,

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.

Many thanks,

Javier Andrs

Andrew_S_Intel2
Employee
77 Views

Javier,

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.

Andy

jacace
Black Belt
77 Views

Hello there,
Anyidea?
Thanks,
Javier Andrs

jacace
Black Belt
77 Views

Hello everybody,
I'm still getting the same error.
Any idea?
Javier Andrs

jacace
Black Belt
77 Views

Hello there,
I'm still getting the same error.
Any idea?
Javier Andrs

jacace
Black Belt
77 Views

Hello there,
I'm still getting the same error.
Any idea?
Javier Andrs

jacace
Black Belt
77 Views

Hello there,
I'm still getting the same error.
Any idea?
Javier Andrs
jacace
Black Belt
77 Views

Hello there,
I'm still getting the same error.
Any idea?
Javier Andrs
jacace
Black Belt
77 Views

Hello there,
By some reason I cannot see the last post added to this thread but in the new one opened by Andrew (http://software.intel.com/en-us/forums/showthread.php?t=61232) We solved the issue.
What we did it was to disable HTTPS to verify the code execution and it worked! so I'am actually checking the SCS console code to veiry howsecure connections aresetup in client machine forenablingHTTPS again.
Thanks a lot,
Javier Andrs Cceres Alvis
77 Views

Hello there,
By some reason I cannot see the last post added to this thread but in the new one opened by Andrew (http://software.intel.com/en-us/forums/showthread.php?t=61232) We solved the issue.
What we did it was to disable HTTPS to verify the code execution and it worked! so I'am actually checking the SCS console code to veiry howsecure connections aresetup in client machine forenablingHTTPS again.
Thanks a lot,
Javier Andrs Cceres Alvis


Test Test

Reply