Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Flex App Embedded in Rails App w/Authentication -


we have rails 3 app using session-based authentication (modified acts_as_authenticated), , flex app needs embedded in html.erb template. flex app needs access routes have before_filter set check if user logged in. when interacting html site, causes user redirected login page, sets rails session property (tied cookie) record user logged in when making future requests.

the flex app needs access xml that's generated rails (behind before_filter) , don't want force user log in twice -- should passing flash parameter flex app can present "already logged in" if session exists (ie, user has logged in via html interface)? haven't dealt kind of problem before i'm not sure if i'm asking right question. advice appreciated!

integrating flash authenticated service can tricky. can't rely on normal http sessions or cookies manage authentication you. regarded best practice generate unique token each logged in user pass on every request server prove in fact logged in user. example:

  • they log in through html form.
  • when serve swf going access authenticated content give flashvar of token=49r03f0239fhduffnkdjfgnas or that.
  • this token generated server-side , stored somewhere checked on requests.
  • on every request server pass token , check it's validity.
  • if it's perform action , return data.
  • if it's bad prompt user.

notes:

  • tokens should long , unguessable session variable.
  • each time log in need generate new token.
  • each time log out need destroy token.

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -