Search

You searched for the word(s): userid:1991

Matching Posts

  • Re: Ajax authentication, custom membership; cannot use Session object

    Hi, The mapping from identity.name to user id can be done in a variety of ways. There is a very elegant one that sticks out I think (this is my personal preference BTW), which has to do with the way membership providers work. The builtin membership providers can do a mapping of the current user onto a so called MembershipUser (just a class in the library). The membership user contains more info than your average principal (including password questions, email addresses, stuff like that). You can get
  • Re: Ajax authentication, custom membership; cannot use Session object

    D'uh. Don't know what I was thinking, but you'll need reflectionPermissionFlags.MemberAccess. What I said about SecurityPermissionFlags.UnmanagedCode is complete and utter BS. The net result is the same though. You'll need full trust ... -- Henkk
  • Re: PageRequestManagerServerErrorException

    Hi, This exception is thrown at the server. While in an async postback the normal exception/debug chain of the ASP.NET pipeline is ignored by default. You can either enable the normal custom error stuff in web.config by setting ScriptManager.AllowCustomErrorsRedirect on the current script manager to true, or you can handle the exception yourself at the server side by hooking to the AsyncPostBackError event on the script manager, or (if you just want to replace the message sent to the client and no
  • Re: Ajax authentication, custom membership; cannot use Session object

    Hi Jeff, This of course would work, but a couple of remarks: 1) namespace http://tempuri.org/ is not very unique ;-) you'll want to change this into something that makes more sense 2) I wouldn't mark this service as basic profile compliant. In normal situations it doesn't even do SOAP (script services serialize JSON by default). And even when you call it using a normal proxy, it's main result is returned as a cookie (which is not basic profile compliant, although I don't think the builtin pipeline
  • Re: Want to find a goood HTTP Analyzer.

    Which only works on IIS btw. The workaround for Cassini (or the development web server or whatever it's called in VS 2005) is to use localhost. (mind the dot). The latter however doesn't seem to work well with async postbacks on my machine (which could very well just be my machine, but the safe route is to run on IIS). -- Henkk
  • Re: Ajax authentication, custom membership; cannot use Session object

    Hi Dabbi2000, I wanted to see for myself and, yes, you're right. What's going on ? In a normal postback (including async ones) the pipeline follows the chain of events I described in a previous post. The problem is: I thought you were using the normal forms based authentication stuff in combination with an Ajax enabled app. However, you appear to be using the Sys.Services.AuthenticationService. Unfortunately (my bad, sorry) this is not a normal postback. It's uses the same infrastructure (ScriptHandler
  • Re: Update GridView in OnComplete()

    Well, GridViews' default rendering is as a table, so you'd have to find the right tr in the DOM. Probably based on a key in a given column or such. However, I would suggest changing the design to an UpdatePanel containing a GridView and handle this in code behind. You can then make sure you only refresh the row you want in your data binding. HTH, -- Henkk
  • Re: Ajax authentication, custom membership; cannot use Session object

    Hi Dabbi2000, That's indeed very tempting to do. However, this construct will never work. The deal is that your code is executed by an http module that runs before the AcquireRequestState event. In other words: there is no session yet. The best way to achieve what you want is to store your user id in the items collection of the current context and than move it from context to session in the PostAcquireRequestState event. So replace the last line of your example with: HttpContext.Current.Items["UsersID
  • Re: AJAX in web farm

    Hi Ahmed, If you hook the AsyncPostBackError event on the ScriptManager you can get to the actual exception that is raised. Can you post the results of a ToString() on that exception ? Warning: this will expose details on your implementation ... so if this happens to be some kind of banking application or such, please filter out the stuff that you don't want us to know ;-) -- Henkk
  • Re: AJAX in web farm

    Hi Ahmed, My guess is that you didn't explicitly set a machineKey element in your config file. Without it each machine will have its own key, which (among others) is used to validate viewstate. When the load balancer moves an existing request to a new server, the new server will not understand the existing viewstate and throws a 500 (502 I think) series status at you. When this happens inside an async postback, you will not see an error page, but rather get an exception from the PagerequestManager
Page 1 of 2 (13 items) 1 2 Next >