401 (Unauthorized) while SSL-ing in code-behind

401 (Unauthorized) while SSL-ing in code-behind

am 04.01.2008 19:36:46 von gnewsgroup

In my web application, I need to access a simple web site on a remote
host. That web site only allows Integrated Windows Authentication.
So, in my web application, I collect user name, password and domain
info and pass it to that remote web site.

I keep getting this Exception:

The remote server returned an error: 401(Unauthorized.)

Whereas, I can check out that website just fine in IE or FireFox by
entering my credentials. My complete code for my Login.aspx page is
available at the following address.

http://gnewsgroup.googlepages.com/sslconnectionfailureincode -behind

I am not sure where I am wrong. Many thanks if you could share a
little insights of yours into this problem.

BTW, I googled, and it seems there is very limited resource about this
problem.

Re: 401 (Unauthorized) while SSL-ing in code-behind

am 04.01.2008 19:48:13 von gnewsgroup

On Jan 4, 1:36 pm, gnewsgroup wrote:
> In my web application, I need to access a simple web site on a remote
> host. That web site only allows Integrated Windows Authentication.
> So, in my web application, I collect user name, password and domain
> info and pass it to that remote web site.
>
> I keep getting this Exception:
>
> The remote server returned an error: 401(Unauthorized.)
>
> Whereas, I can check out that website just fine in IE or FireFox by
> entering my credentials. My complete code for my Login.aspx page is
> available at the following address.
>
> http://gnewsgroup.googlepages.com/sslconnectionfailureincode -behind
>
> I am not sure where I am wrong. Many thanks if you could share a
> little insights of yours into this problem.
>
> BTW, I googled, and it seems there is very limited resource about this
> problem.

Oh, BTW, when I debug the code in VS2005, I could actually see the
info of the remote site's certificate like so:

certificate = {[Subject]
CN=mercury01.mycompany.com

[Issuer]
CN=mercury01.mycompany.com

[Serial Number]
1FED32A445751AB74F0F89F2743D6447

[Not Before]
9/14/2007 2:42:32 PM

[Not After]
9/13/2008 8:42:32 PM

[Thumbprint]
0C58396AA59FB2507BD3ADB1F6DF7...

And I verified again and again that I am using the correct username,
password and domain. But still, every time, I get this annoying
401(Unauthorized) exception.