Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 4th, 2005, 12:56 AM
Registered User
 
Join Date: Oct 2005
Location: , , .
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

[WebMethod]
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();
Response.Write(strRetVal);

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" />
<authorization>
<allow users="*" />
<deny users="?" />
</authorization>

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.

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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 .NET Web Services 0 October 4th, 2005 01:03 AM



All times are GMT -4. The time now is 04:06 PM.


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