cross-domain

Security and Cross Domain with ASP.NET MVC JsonResult and jQuery

主宰稳场 提交于 2019-12-11 13:47:59
问题 I am using asp.net MVC to develop an application that will have ajax interactions. I have JsonResult methods in the controller returning my json serialized data. So for example when a request is made to http://somesite.com/findwidgets/ mvc serializes the data as json and sends it back. I am using jQuery on the client side to handle the ajax requests and to then manipulate the results. I am not having any trouble getting the data but i have found that i can make requests to http://somesite.com

Multiple Iframes sending ONE request to the same SRC

三世轮回 提交于 2019-12-11 13:41:41
问题 I was wondering if there was a way to have say 3 iframes load the same resource (http://myservice.php) with ONLY ONE request from the iframe. The myservice.php returns an Html Document and the browser should somehow load the html without reloading everything 2 additional times including CSS and JS in the loaded HTML document. In other words, is it possible with ONLY 1 request sent from the 1st iframe to load the HTML document from myservice.php, and have the other 2 iframes load the same html

Making a HTTP request to Azure mobile services from asp.net web site

我的未来我决定 提交于 2019-12-11 13:23:55
问题 NET web site and a mobile service on azure. They're not on the same domains and hence i get the following error: Failed to load resource: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access. However, I edited the web config file as recommended in this article: http://encosia.com/using-cors-to-access-asp-net-services-across-domains/ and I added: <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow

Javascript CORS image / canvas manipulation

大兔子大兔子 提交于 2019-12-11 13:12:46
问题 I am trying to retrieve an image from another domain which I have configured to allow CORS and manipulate pixels and then I want to display the result and be able to manipulate the result. I am able to use both getImageData and toDataURL on the image that I have requested so I know that the server part works. However when i try to change the src attribute of the image to the dataURL from the canvas I get the security error "Cross-origin image load denied by Cross-Origin Resource Sharing

Extracting data from website with XSLT

落爺英雄遲暮 提交于 2019-12-11 12:56:16
问题 I'm trying to learn XSLT and I came across a problem. The thing I would like to do is to extract some data from a website, transform it with xslt templates and finally show it in my own xhtml page. Lets say i have a xml file (this will be my xhtml site): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <?xml-stylesheet type="text/xsl" href="myXSLTFile.xsl"?> <!--here I want to have markup produced by xslt file--> The

Apigee OPTIONS 404

落爺英雄遲暮 提交于 2019-12-11 11:28:49
问题 I have been stumped by Apigee's CORS support. I setup a new proxy and made sure to tick the " Enable Direct Browser Access for Your API — Allow direct requests from a browser via CORS." box. It appears that CORS is working for the normal GET requests, however pre-flight OPTIONS requests are not found and are returning a 404. I found this answer but was not able to resolve my problem because it seems like a different problem perhaps? The main question I would like answered is how do I setup

How to close an authentication pop up window having a cross-domain url?

ぃ、小莉子 提交于 2019-12-11 10:56:30
问题 I was following the accepted answer for this question How do I get around window.opener cross-domain security to solve my problem. The code works great but fails at one use case where instead of the pop up window url getting changed from some other domain to your own domain, it simply redirects on its own domain just like sometime if you try to authenticate a third paty app on facebook or some other social network, it simply redirects on its own as you have already authenticated earlier. How

Any way to make cross server ajax calls?

北城以北 提交于 2019-12-11 10:05:30
问题 I am learning XML and I've found a website that has a XML feed. I am trying to figure out if there is a way to make cross server ajax calls? The code I am using is below: <html> <head> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <script> $.ajax({ type: "GET", url: "http://www.nfl.com/liveupdate/scorestrip/ss.xml", dataType: "xml", success: function(xml) { // Interpret response $(xml).find('g').each(function() { // Example: Show the XML tag in the console

Get image data from another domain with AJAX request

…衆ロ難τιáo~ 提交于 2019-12-11 09:54:30
问题 I am trying to get binary data of an image from another domain with an AJAX request . I tried various methods, but there was no working solution. I found some code on the internet that looked good, but even with this calls I get errors. What do I wrong? Is there a standardized way to do this? Here is what I tried until now: var request = this.createCORSRequest('GET', 'http://url/to/image.png'); request.onload = function () { var text = request.response; }; request.onerror = function (error) {

Ajax 405 (Method Not Allowed) Cross Domain Issue

五迷三道 提交于 2019-12-11 09:48:10
问题 I am trying to run this script from localhost but it gets an error 405 (Method Not Allowed) . Code $(document).ready(function(){ $.ajax({ url:'http://some.url/', type:'post', //crossDomain: true, data:'{id:"49"}', contentType: "application/json; charset=utf-8", dataType:'jsonp', success: function(responseData, textStatus, jqXHR) { alert('right'); var value = responseData.someKey; console.log(value); }, error:function() { alert("Sorry, I can't get the feed"); } }); }); I have tried with