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.

firefox - Is it possible (with user permission) to do cross site requests with JavaScript in a webpage in the same way as you would do in an extension? -


google release pc , os. you'll able code machine browser technologies - i.e. javascript. expect tools available already.

on web javascript has same origin policy prevent xss attacks. in extensions free wander around.

so question is: can write page or (if prefer) online app authorized (after user confirmation, of course) cross site requests feels needed? know possible when write extension, i'd prefer doesn't stick in user's browser. [edit] know there solutions if have control of both sites involved. i'm asking if possible access, instance, google or yahoo apis: sites i've no control over.

for instance want write frontend api (rest, json, xml: not script tag, cross-site compatible api): need host somewhere (a different host api provider) need make unrestricted calls domain , read responses too. understand security risks, i'm talking asking user's permission first (as when install extensions).

if need have browser , server agree access data can cors: http://www.w3.org/tr/cors
https://developer.mozilla.org/en/http_access_control

basically add header on server on requests tells browser server aware of cross origin , ok it.

it surprisingly simple. there few gotchas. 1 being so-called preflight dialog browser , server engage in when there non-standard header. frameworks insert such header triggers dialog. means in practise need server add cors headers responses including options header!

if you later mention, want request privileges user bypass security restrictions, need signed scripts: http://www.mozilla.org/projects/security/components/signed-scripts.html


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 -