Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

AngularJs depoyed site SyntaxError: Unexpected identifier

I've developed a ASP.NET WEB API Angularjs application and after i published it in IIS server it was throwing Unexpected identifier error at URL of below code. function getAllWeeks() { var ...
user11130182's user avatar
0 votes
1 answer
768 views

Web Api Insert Works in Postman but not from code [duplicate]

The following simple insert record method works in Postman but I can not get it to work in my AngularJS controller. Postman Headers (Post) Key ContactID Value 0 Key FName Value John Key ...
Jeff Breuninger's user avatar
0 votes
1 answer
1k views

method not allowed 405 when trying to call from angular httpclient to asp.net web api

I am trying to create a call from my Angular 4 application to my server that is asp.net web api, first of all I enabled cors in my server and it seems working, now when I am trying to call I am ...
Zakk's user avatar
  • 766
0 votes
1 answer
914 views

How to POST object + array to WebApi .NET/C# controller using AngularJS $http?

My C# model: public class MyModel { public string MyString { get; set; } public int MyInt { get; set; } public List<MyList> MyList { get; set; } } public class MyList { public ...
Tomo's user avatar
  • 432
0 votes
1 answer
9k views

Getting the response as "data":null,"status":-1 when calling web api from AngularJS

I am trying to call Web API GET Method from Angular JS 1.6.0 and getting the following error:- Possibly unhandled rejection: {"data":null,"status":-1,"config":{"method":"GET","transformRequest":[...
simple user's user avatar
0 votes
2 answers
943 views

Custom error message with content-type response

I'm trying to implement some error handling into my MCV AngularJS application, but came across this one issue that I'm not sure how to solve. Structure In my AngularJS service ticketService I have ...
Detilium's user avatar
  • 3,056
0 votes
2 answers
745 views

AngularJS fetch the data from WebApi - errors not showing

I have encountered a similar issue for my all example programs with angularJS fetch data from the WebApi. I think there is nothing to do with my code, but some settings that may be I ignored, please ...
qianli's user avatar
  • 15
1 vote
2 answers
482 views

Fetching JSON data from multiple web api methods ($q.all)

I have a simple app with a form. When the form loads I want to call a couple of web api methods to fetch the json data used to initialize the form. The form is working fine with hardcoded data in my ...
Tony's user avatar
  • 1,660
2 votes
1 answer
600 views

Angular post, put, delete returns 405

I am new to angular. I cant invoke POST, PUT and DELETE methods using angular (GETs working fine) I have a .NET WebApi server which all methods and all resources URLs works and tested using Advanced ...
Ido Barash's user avatar
  • 5,172
1 vote
2 answers
1k views

HTTP Get request from Angular JS receives empty reply

Since I am fairly new to web development, this might very well be a very easy to solve question. Unfortunately I am not able to solve this myself as I have no clue on where to search. Currently I'm ...
RFerwerda's user avatar
  • 1,277
2 votes
1 answer
7k views

Web Api 404 error The resource cannot be found

I try to use Web Api for send/get data from server. WebApiConfig.cs : config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "...
Bogdan's user avatar
  • 706
156 votes
20 answers
468k views

The 'Access-Control-Allow-Origin' header contains multiple values

I'm using AngularJS $http on the client side to access an endpoint of a ASP.NET Web API application on the server side. As the client is hosted on a different domain as the server, I need CORS. It ...
Papa Mufflon's user avatar
  • 20.5k