Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums

Go Back   Vista Forums > Vista technology newsgroups > Indigo

Error calling IIS page configured with windows authentication

Reply
 
Thread Tools Display Modes
Old 02-08-2008   #1
Carlo Folini
Guest
 
Posts: n/a

Error calling IIS page configured with windows authentication

The first time that I call an asp page (IIS 6) that uses integrated windows
authentication with a WCF client (generated with vs2008) I get an
authentication error.
If I use a vs2005 client to make the call everything works fine.

I generated a WCF proxy for a webservice that calls an asp page that
requires windows authentication.
Note that, for testing purpose, my asp page does nothing, except from
returning a preformatted soap payload to the caller.

I created a vs 2005 proxy and I succeed on authenticating the request.

MyService a = new MyService();
a.Credentials = System.Net.CredentialCache.DefaultCredentials;
a.Url = "http://MyServer/MyProxyVD/MyProxy.asp";
a.MyMethod(value, ref response);

I tried the same thing with WCF configured as follow:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Windows"
proxyCredentialType="None"
realm="" />

The response is ok for vs2005 client, instead for WCF I get
The HTTP request is unauthorized with client authentication scheme
'Negotiate'. The authentication header received from the server was
'Negotiate,NTLM'.

I tried changing the credential type only to Windows (Negotiate) o Ntlm
(following http://support.microsoft.com/default.aspx/kb/215383).

Looking (into iis logfile) at the request sent by the WCF client it seems
that IIS authentication is taking place correctly.
I see two 401 reply (as usual).
The third have the correct user (the user that runs the winform), but the
strange thing is that also this response has a 401.5 status code

It seems that the asp isapi is refusing the request.

Having two almost equals clients (one using vs2005 and the other WCF) I
think that it should be some problem on the credential sent by WCF.
My guess is that the WCF credentials are ok to IIS but not for asp.dll.

Modifying the “verify that file exists” on asp.dll I get this error on the
event viewer
Quote:

>Event Type: Error
>Event Source: Active Server Pages
>Event Category: None
>Event ID: 5
>Date: 2/7/2008
>Time: 3:28:57 PM
>User: N/A
>Computer: MyPC
>Description:
>Error: ASP will not serve requests because it could not perform the first request initialization..
>For more information, see Help and Support Center at >http://go.microsoft.com/fwlink/events.asp.
So it seemed to me that it is some access denied on some resource…I looked
with procmon but I didn’t see any access denied (either for file or registry).

Strange thing….if I made the first call with vs2005 client, than subsequent
WCF calls are ok.

Any idea on how to configure WCF client for this purpose?

--
Carlo Folini
  Reply With Quote

Reply

Thread Tools
Display Modes









Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Vistax64.com 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48