Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 4th, 2005, 01:03 AM
Registered User
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default XML Webservice - Integrated windows authentication

Hi all,

I have a simple web method to return the current logon user id as follows

public string GetLogonUserID()
return System.Web.HttpContext.Current.Request.ServerVaria bles["LOGON_USER"];

If i call this web method by using IE testpage, it returns actual login user (domain\userid).

If i call this web method by using web refrence, it returns "domain\ASPNET"

Web method calling code:

WebApplication1.pws5.Service1 proxy = new WebApplication1.pws5.Service1();
proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
proxy.PreAuthenticate = true;
System.String strRetVal = proxy.GetLogonUserID();

Note: webservice is not anonymous and it is integrated windows authentication.

For reference please see the following authentication and authorization section of web.config

<authentication mode="Windows" />
<allow users="*" />
<deny users="?" />

If anybody could advice me any workaround to get actual NT login userid by calling above webmethod then it will be greatful.

Thanks in advance.

Thanks & Regards
Anees Ahamed.N.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Integrated Windows authentication chucky Internet Information Services 1 July 10th, 2007 02:25 PM
Integrated Windows Authentication stonesbg ASP.NET 2.0 Professional 0 March 29th, 2007 04:32 PM
How to bypass integrated windows authentication. darora ASP.NET 2.0 Professional 0 December 11th, 2006 07:51 AM
XML Webservice - Integrated windows authentication anees_ahamed General .NET 0 October 4th, 2005 12:56 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.