Home
Get Started
Learn
Downloads
AJAX
MVC
Community
Wiki
Forums
Sign in
|
Join
Home
›
ASP.NET Forums
›
Search
Search
You searched for the word(s): userid:1991
More Search Options
RSS Available
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/19/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/19/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/19/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/19/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/17/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/16/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/14/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/14/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/14/2007
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
Posted to
ASP.NET AJAX Networking and Web Services
(Forum)
by
Henk de Koning
on 4/13/2007
Page 1 of 2 (13 items) 1
2
Next >
Silverlight:
ASP.NET 4, ASP.NET MVC, and Silverlight 4 Videos of my Talks in Europe
Channel 10:
Faster Solid State Drives for Windows 7 Arrive
ASP.NET:
Death to confirmation dialogs with jquery.undoable
Channel 9:
E2E: Brian Beckman and Erik Meijer - Co/Contravariance in Physics and Programming, 1 of 2
TechNet Edge:
Windows Server 2008 R2 Quick Look #3 - PowerShell V2
ASP.NET:
2009 Blogged - Greatest Hits
WindowsClient:
2009 Blogged - Greatest Hits
Channel 9:
Nikolaj Bjørner and Leonardo de Moura: The Z3 Constraint Solver
Channel 9:
MEF & Silverlight 4 Beta - Part 2, Imports & Exports
Channel 9:
MEF & Silverlight 4 Beta - Part 1, Introduction
WindowsClient:
The (Near) Final Word on Multi-Monitor Taskbars for Windows 7 - Ultramon vs. DisplayFusion
WindowsClient:
Looking back at 2009, and forward to 2010
Silverlight:
Polling Video – A Viable sub-second alternative?
TechNet Edge:
Windows Server 2008 R2 Quick Look #2 - Active Directory Recycle Bin
Channel 10:
I'm a Windows 7 PC Themes
Channel 10:
24 Years of Windows Box Art
WindowsClient:
Silverlight tutorial: HOW TO build CommandLink Control in Silverlight with Expression Blend 3 and Behaviors
ASP.NET:
Converting an RGB Color To Hex With JavaScript
Silverlight:
Silverlight HVP Design – Configuration & Scenarios
Channel 9:
Channel 9 Live at PDC09: Day 3 Welcome
Microsoft Communities
ASP.NET
Channel 8
Channel 9
Channel 10
IIS.NET
Silverlight
TechNet Edge
WindowsClient
Mix Online