All Questions
Tagged with asp.net-web-api2 angularjs
448 questions
0
votes
1
answer
1k
views
download excel file using web api and angularjs
Front-end
var url = baseUrl+ "/api/Home/DownloadReport";
window.open(url);
Back-end
[HttpGet]
public HttpResponseMessage DownloadReport()
{
var stream = ...
1
vote
1
answer
477
views
callback url with HTTP Post not working using ui.router
There is a frontend application developed using angularjs which uses ui.router for managing the routing functionality within the frontend application. User open the URL (https://www.testsite.com) and ...
0
votes
1
answer
278
views
Why would the ASP.NET MVC HttpFileCollection return an array of strings rather than a Collection of HttpPostedFile?
I have an AngularJS + ASP.NET MVC 5 application where I am attempting to implement single file uploading.
On the client side I have the following code:
api.uploadFileV2 = function (alias, file, ...
0
votes
1
answer
41
views
indirect download link using webApi and angularjs
I use Web Api (C#) to create an indirect download link using below codes:
WebApi Code :
var file = new FileStream(filePath, FileMode.Open, FileAccess.Read);
var httpResponseMessage = new ...
0
votes
2
answers
2k
views
Can't bind multiple parameters to the request's content
I have two class and basically I am trying to call two separate models with two store procedures to insert data in both table. I wrote my controller like this:
[HttpPost]
public IHttpActionResult ...
0
votes
0
answers
40
views
Authentication Header not working from Angular 1.1.x to1.5.x versions while working with postman
My Web API 2.-0 code is -
OnValidateClientAuthentication = async context =>
{
.......string clientId;
........string clientSecret;
........if (context.TryGetBasicCredentials(out clientId, out ...
0
votes
0
answers
690
views
Angular.js routing for views in ASP.net MVC app not working
I'm new to web development and I'm currently trying to separate my UI by keeping my UI in Angular.js using views and routing and controllers and services. Whereas, I'm using a Web API to fetch the ...
1
vote
1
answer
344
views
Values received via http post are null with AngularJS and Web api 2
I followed a tutorial and wanted to expand the functionality of already existing code. Code: https://send.firefox.com/download/27d75a7398f351c9/#wKkjkAuvlpBVOMKx9szFHA
It's using angularJS as the ...
1
vote
0
answers
46
views
Had to click md-button twice to get WebApi call result
I am trying to build a simple MVC WebApp with WebAPI call and AngularJS. Front-end has a md-button, with ng-click method defined in the controller. When ever I filled up the fields and hit the button, ...
1
vote
1
answer
235
views
ValidateAntiForgeryToken in windows authentication
Our application uses AngularJS and consumed Web API in the backend. This is only internal application and authentication used is 'Windows' mode only. We are using custom authorization(role-base) to ...
0
votes
1
answer
20
views
rewrite rules messing up web api 2 /token
I'm trying to get an angularjs + web api 2 with OAuth. Basically I select individual accounts from the Visual Studio ASP.NET Web Application template.
I need a rewrite for the angular stuff but I'm ...
1
vote
1
answer
82
views
How can I send custom header of cross origin request in AngularJS + Web Api 2?
I have a Web Api 2 project:
[AuthorizeUser]
public class ValuesController : ApiController
{
[Route("api/value/get")]
[HttpPost]
public IHttpActionResult Get()
{
return Ok("...
0
votes
0
answers
459
views
Trying to Export Datatable to Excel (1.000.000 Records) in Web API and Angular, Writing Streaming is throwing an Out of Memory Exception
Trying to Export Datatable to Excel (1.000.000 Records) in Web API and Angular, Writing Streaming is throwing an Out of Memory Exception.
Tried Splitting Datatables with 100.000 records each and ...
1
vote
0
answers
176
views
Asp.Net web API: Redirect from API path to Google Authentication page
I used the following article to implement google authentication in my asp.net web api project. I followed the article and created a sample application. Now I have a simple test, as follow, but I am ...
-1
votes
1
answer
861
views
Web api not working after project name and namespaces change
I changed my project name and namespaces. My project worked completely before this, but afterwards my token provider works and the token generated correctly and I can login, but my other ...