Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista Tutorial - Error calling IIS page configured with windows authentication

 
 
Old 02-08-2008   #1 (permalink)
Carlo Folini
Guest


 
 

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

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Vista X64 Driver Error - Device is not configured correctly Code 1 Drivers
vista error message about not configured to Run applicaiont Vista General
Error Message - Page error in non page area Vista hardware & devices
Proxy authentication required error when calling wsdl.exe PowerShell
Register Windows Vista - Error on page Vista General


Vista Forums 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.
Designer Media Ltd

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