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.

troubleshooting jquery/ajax json data retrieve -


i have following code uploaded tomcat server code suppose retrieve information other server, reason not happening there no reply other server following code error function alert"handshake didn't go through"

$(document).ready( function() {     var home_add='http://mywebsite.net:3300/gateway';     $('#handshake').click(function(){          alert(" sending json data");          $.ajax({                 /* start ajax function send data */               url:home_add,              type:'post',              datatype:'json',              contanttype:'text/json',              async: false,               error:function(){ alert("handshake didn't go through")}, /* call disconnect function */              data: {                  "supportedconnectiontypes": "long-polling",                  "channel": "/meta/handshake",                  "version": "1:0"              },              success: function(data) {                  $("p").append(data+"<br/>");                  alert("sucessful handshake");              }                              });      }); }); 

i checked firebug net panel , got following request header sent no response , there no xhr please send me ur feedback

mywebsite.net:3300 user-agentmozilla/5.0 (x11; u; linux i686; en-us; rv:1.9.2.13) gecko/20101209 centos/3.6-2.el5.centos firefox/3.6.13 accepttext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-languageen-us,en;q=0.5 accept-encodinggzip,deflate accept-charsetiso-8859-1,utf-8;q=0.7,*;q=0.7 keep-alive115 connectionkeep-alive originhttp://127.0.0.1:8080 access-control-request-me...post  

this sounds have issue cross-domain scripting. if domain want data isn't same domain of site need use jsonp data it.


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 -