473,321 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Error in calling WEB API Method

Hi,

I am calling the web api get method in the browser it is working fine.but I trying to call this in asp.net page it is asking the follwing in IE.

"This page is accessing inofrmation that is not under its control.This process a security risk.Do you want to continue?"

Where as in the Firfox or crome. it is not working. My code is below

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. function GetAllEmployees() {
  3. jQuery.support.cors = true;
  4. $.ajax({
  5. url: 'http://localhost/virtusapi/sublocation/GetAllTables/1',
  6. type: 'GET',
  7. dataType: 'jsonp',
  8. success: function (data) {
  9.  
  10. for (var i = 0; i < data.length; i++) {
  11. var course = data[i];
  12. alert(course.Name);
  13. }
  14. },
  15. error: function (x, y, z) {
  16. alert(x + '\n' + y + '\n' + z);
  17. }
  18. });
  19. }
  20.  
  21. </script>
Any one tell me where I am wrong.
Oct 4 '12 #1
0 1557

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Gilles A. | last post by:
Hi all, Does anyone know how to get the class.method name of the calling method? Example public class A { public void m() { new B().method();
8
by: Rakehs | last post by:
Hi, I have a method Show() which is invoked by several methods at different intervals. I want to identify the calling method within Show() whenever it is invoked. How do i do this? Thanks in...
1
by: dwp | last post by:
hResult = pDefaultDomain->CreateInstanceFrom( pAppDomain- >m_bstrLoadAssemblyName, pAppDomain->m_bstrManagedClass, &pObjectHandle ) This call gives the E_ACCESSDENIED return value. I have...
0
by: Manuel Arroba | last post by:
asp.net oledb command parameter error calling an as400 program Hi... I have an as400 program that I can call it directly and it works: variable= "xxxx" sql = "CALL METSIGOP.SIGOPRC ('" +...
3
by: Steve Young | last post by:
I am trying to use the webclient class in VB.Net ... in particular I want to upload a file to the web server using: dim responseArray As Byte() = myWebClient.UploadFile(uri,"POST",filename) ...
1
by: Jake Barnes | last post by:
I can not figure out the meaning of this error: Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://www.bluecasts.com/pdsIncludes/pdsAjax.js ::...
0
by: Jeremy Cowles | last post by:
Hi all, I have recently come up with a way to get the calling method of the current method, and I just want to know if this is a sound way to go about it: Sub CallingMethod() Call...
0
by: John | last post by:
Hi, I am getting this error message The remote server returned an error: (405) Method Not Allowed. while trying to execute the following code: Dim myReq As HttpWebRequest =...
3
by: Rupe | last post by:
I wish to add an event to an element, but I wish to add arguments to the calling method, eg like so: element.attachEvent('onclick',startDragDrop('arg1',arg2')) I understand this is not...
4
by: gizz | last post by:
Hi, I'd like to get the name of the calling method. I can't find the solution. For example : function MyFct() { return TheOtherFct() ; }
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.