User object (System.Security.Principal.IPrincipal) in my web service does not reflect currently logged on user.

I am using Forms authentication, 3.5 framework. I am calling a web method from a web form page; here is my problem:

 For some reason the User object (System.Security.Principal.IPrincipal) in my web service does not reflect currently logged on user. I know I am logged in correctly when I call the web service method (which I call using BeginX...X()). The weird thing is, I have other services whos methods DO reflect the currently logged in user (although these are called using AutoComplete extender, don't know why one works and the other does not).

Please help

 


http://www.geneangelo.com
0
gangelo
10/28/2008 6:04:29 PM
asp.net.networking-webservices 2181 articles. 0 followers. Follow

0 Replies
1183 Views

Similar Articles

[PageSpeed] 12
Get it on Google Play
Get it on Apple App Store

Reply:

Similar Artilces:

Web page not detecting a logged in user/user not logging in
Hey guysAs it stands, I've created two web pages within my app. One is a login page which is simply a blank page with the login control dragged on top. Within this control I redirect to my second page which contains a set of asp:Panels that are supposed to hide/display depending on which user is browsing the page.I've read several tutorials and at the moment, I've installed memberships/roles using the aspnet_regsql application. I've also used the web administration tool to create an 'administrators' role and create a user which is assigned to that role. I've also ...

Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'.
Hi Has anyone ever came across this problem before, the code was working ok this morning, but now it not and nothing has changed. Here is some test code string UserData = Ret.ToString();                        FormsAuthenticationTicket objTestForCookiesTicket;                        HttpCookie objTestForCookiesCookie;                        objTestForCookiesTicket = new FormsAuthenticationTicket(1,    ...

Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'
I am getting the following error when i request the page in iis. it was working fine. if anybody give any solution for this is greatly appreciated   Server Error in '/' Application. Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Unable to cast object of type '...

What do non-.net users need to do to consume a .net web service?
Hello, I'm very new to web service world and haven't had much chance to do much reading on theory and architecture yet. So I'm asked to create one for someone external to my organization (still inside my company). I make one, test it, deploy it, consume it. Go me. It was very easy within my comfortable .net shop. However, the intended consumer is not a .Net shop (J2EE). I was under the impression that if I sent in a GET request to the asmx file, I would get XML back. This turned out to be not the case and I had to use the proxy file to prove that I could consume the service. S...

how to get the user id of the currently logged in user?
hi,       m develoing a site whereby employees are supposed to log in and take orders.  the users are being created thru the ASP web Administration tool and stored by default into the SQL Server Database named AspNetDB.mdf that's stored in the App_Data folder of our website. the database is created auomatically. How to display the userid as this userid is too complicated and there can be many users with the same username. You can use the Membership class to get the info about a user: Membership.GetUser() The GetUser method can also take a username as a...

Possible to create a User other than System.Web.User?
I am looking into using the new Roles features in my web applications. I notice that it all depends on the person authenticated in the System.Web.User object. In our environment, our web applications are set to Windows authentication, but the real user is authenticated via pubcookie (see http://www.pubcookie.org/). So I can get the id of the authenticated user from the Request.ServerVariables["HTTP_PUBCOOKIE_USER"]. Thus the real authenticated user's identity will not be in the System.Web.User object.I am wondering if there is some way to just create a separate standalone User object, and ju...

Current User Logs out after creating new user.
Hi,  I am using the asp.net membership provider for managing users in my application. I have created the required database in SQL server 2005. I am using the standard membership controls provided. (Login control, CreateUserWizard control etc.) . As per business logic of my application, the user do not create their account themselves. The Admin user creates them instead. For user creation, I have created a page with the CreateUserWizard control. I have made necessary membership settings entries for the web.config file. So, the user gets created without any line of code. But...

How to List out Current Log on Users
Dear All,              I want the efficent way to display Current Log on Users - Users in online.  If u store session of all user in database then u can easily get the online user by checking the session state stored in database.  Add the Login info in the database . Check this info regularly after some time interval and show on the page Thanks & Regards Sandeep If you want something you never had, do something you have never done! Try storing the online persons count in the Application State Aminhttp://3...

creating a new user logs out the current user
Hi everybody, I am developing a web application, currently I am working on the security aspect of the web app. The problem I am having is when I create a new account (when I sign in as an admin user) using CreatNewUser Wizard, a new user is created and it automatically logs out the current user(Admin) and get itself  logged in. Could anybody help me out here. Thanking you in anticipation. Regards. There is a property on the <asp:createuserwizard> control called "LoginCreatedUser" (this is a Boolean) that allows you to control whether a newly created user is au...

Getting the user name of the currently logged in user
I'm writing my first custom module. Just as an experimental project I would just display information about the currently logged in user. I can get the User Id, but I don't know where to get the rest of the information. How do I get this? Hi, Just create a new UserController to get the information about one user via the method GetUser(PortalId, UserId) and store it into a UserInfo. Then you can get the rest of the information from this UserInfo [VB] Dim myUser As New UserInfo Dim myUserController As New UserController myUser = myUserController.GetUser(PortalId, Use...

Users logging in as the same user..
HI there.. I have a problem with ASE12.0 .. I have created 10 users on the database and granted everybody permissions and all.. However, it seems everybody, no matter who logs in, logs in as the same user.. For eg... I have user logins John, Alex, Alan, Steve......etc etc And i created a user group for all of them (eg developers..) However, when they log on to isql, anything that they do will be under John, no matter if it is logins John, Alex, Steve... or etc etc.. If i do a sp_who.. all the connections will be listed as John. If they create tables, all table created will ...

how to create a user object in a user object
how to create a user object in a user object dynamically ? I want create an object row focus indicator (p_focusindicator), in an userobject datawindow. But i use in userobject datawindow this code: ip_focusindicator = create p_focusindicator SetRowFocusIndicator(ip_focusindicator) Do you know the solution ? Thanks Mikael You're in the wrong newsgroup. This a PowerDesigner newsgroup not a PowerBuilder newsgroup. You want to be in powersoft.public.powerbuilder.general With that being said, I do know the answer to your questions. First off, you cannot create a us...

Placing user objects on to other user objects.
Hello, Can anybody tell me why I'm not able to use syntax like openuserobject to connect an object to another object. You can attach user objects to a window, but can you attach a user object to another user object? BTW, nobody knows any good 3D drawing ActiveX's out there??? Mark Schupay Schupay Software Design 724-453-1331 ssd@zoominternet.net OpenUserObject() is a window (and all PB descendants thereof), not a system or WIndowObject function. That's the technical reason anyway. However, there is a method of doing this. Also, you may need to add the ...

Thread.CurrentPrincipal in web apps //HttpContext.Current.User = new GenericPrincipal(HttpContext.Current.User.Identity, roles);
If you look at the MS App and Profile block, it does the following to create a principal for the current request. Thread.CurrentPrincipal = new ExtendedPrincipal(aGenericIdentityObject); Historically, in web apps, I've used more along the lines of: HttpContext.Current.User = new GenericPrincipal(HttpContext.Current.User.Identity, roles); However, changing this line to Thread.CurrentPrincipal = new ExtendedPrincipal(HttpContext.Current.User.Identity, roles); seems to work, too. Is setting Thread.CurrentPrincipal a more flexible mechanism than setting the HttpContext.Cur...

Web resources about - User object (System.Security.Principal.IPrincipal) in my web service does not reflect currently logged on user. - asp.net.networking-webservices

Test Secure Class Instantiation Helper Method
Phil Haack attempts to infuse technology and software development with humor and a pragmatic eye... Attempts.

Visual Basic Walkthroughs
Sign in MSDN subscriptions Get tools http://www.facebook.com/microsoftdeveloper https://twitter.com/msdev http://plus.google.com/111221966647232053570/ ...

Full text of " Eclogae Horatianae. Pars II. Sermones prope omnes continens; "
Web Video Texts Audio Software About Account TVNews OpenLibrary Home American Libraries - Canadian Libraries - Universal Library - Community ...

Unit Testing Security Example
Phil Haack attempts to infuse technology and software development with humor and a pragmatic eye... Attempts.

HttpContext.User Property (System.Web)
The User property provides programmatic access to the properties and methods of the IPrincipal interface. Because ASP.NET pages contain a default ...

Full text of " Eclogae Horatianae. Pars II. Sermones prope omnes continens; "
Web Moving Images Texts Audio Software Patron Info About IA Projects Home American Libraries - Canadian Libraries - Universal Library - Community ...

Resources last updated: 1/17/2016 2:16:06 AM