Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [asp.net-mvc-web-api]

The tag has no usage guidance.

0
votes
1answer
30 views

How to manage model(s) between web client (DMZ) and web API?

I have this web API project which handle all database access via entity framework. I have another web client reside in DMZ to call those APIs (via ajax or c#) in the web API project. When I make API ...
-3
votes
1answer
74 views

When designing a web application with Vue.js and ASP.NET Core, is ASP.NET solely for the API?

When creating a web application from scratch with ASP.NET MVC Core (using Visual Studio 2017) and using Vue.js, is the MVC Core part of the application solely for the API? What other function would ...
-1
votes
2answers
82 views

Should integration tests use database? [closed]

I know that integration tests test parts of project that interaction with each other somehow. And I need to test this interaction. And there is the question: 1)Should these tests use real database ...
1
vote
1answer
58 views

Calling executables from an ASP.NET WebAPI

I have an Angular application with a table, and I'm considering having the console application take the name of C# programs that the user can run. I was thinking of passing the name or code of the ...
0
votes
0answers
17 views

Is it good idea to build multitenant saas using Webpi2 OData V3, SPA?

I wanna clarify these two questions 1. is it best combination of tools WebApi 2 OData V3 for presentation layer and SPA for front-end (Angular js, Service Worker, MVC) and horizontal scaling of ...
1
vote
1answer
73 views

Onion Architecture, Project Architecting and Authentication

I am learning ASP.NET MVC & Web API and trying to implement Onion Architecture with Repository Pattern for one of my Test projects as part of my learning. I have developed single MVC Projects ...
1
vote
2answers
346 views

Putting it all together - DDD, CQRS, Web API

I need some expert guidance. I'm trying to learn the concepts as well as implement them, and it's possible I might be over-engineering some. But that's OK, because I am wanting to learn and gain ...
1
vote
2answers
553 views

Stateful authentication in REST API using tokens

I have recently started on a project involving a REST API. The API requires authentication with requirements for administrators to be able to view logged in users and to be able to revoke specific ...
-1
votes
2answers
55 views

What should be the REST API (URL) for a user to be assigned to multiple territories

In our application we have a user who can be assigned multiple territories. What is the best way to expose the REST API? Should it be as : [POST] www.xyz.com/Territory/User OR [POST] www.xyz.com/...
3
votes
1answer
677 views

asp.net web api and mvc architecture for web application

We have a single solution visual studio web application with multiple projects. One of the projects (Services project) has APIs for our App clients (Android/Ios). There's separate project for MVC ...
0
votes
2answers
95 views

Wait time created by having separated REST API and web application

I created a new Asp.Net MVC web project. I took the decision to create two different apps, the first one would be a web REST API that would provide all data for the second one, which would essentially ...
0
votes
1answer
585 views

Pattern for web service response caching, but only use the cache for when the data store goes down or request otherwise would fail

We have a REST web service written in C# in ASP.NET MVC/WebAPI. When the underlying data store fails, this can lead to our service being completely unavailable, instantly. There is currently no ...
1
vote
2answers
1k views

Web API - strong classes or dynamic?

My web api method should return some structured data about my profile. To do it I created the following POCO classes: public class ProfileInfo { public string FirstName { get; set; } public ...
0
votes
0answers
132 views

WebAPI and WCF in one solution

I've created an ASP.NET WebAPI that runs in intranet network. For some reasons, my client wanted a WCF service (HTTPS) that connected to a public project. May I know if WCF service can consume the ...
0
votes
2answers
679 views

Integrate Web API Services with multiple authentication services

In a multi-tenant deployment of Web application, How can the Asp.Net Core Web API services be designed to work with different authorization services? The Web applications use OAuth and JWT Bearer ...
1
vote
1answer
189 views

Creating JWT token internally

I need to implement JWT tokens in my ASP.NET Core API app to handle authorization. My question is, what is the risk of generating my own JWT token within my API app as opposed to having it handled ...
-1
votes
1answer
111 views

Connect to different database based on URL

I am developing a SAAS application where : A single web application is hosted in IIS which will serve to multiple companies and each company will have its own database. The web application and ...
0
votes
0answers
838 views

How to call web api controller action after its started?

Inside SampleController.cs I have action Get(), which contains call to the Listener service. This listener has to be started (I can do it in the Unity bootstrapper via RegisterInstance) but also I ...
2
votes
1answer
176 views

What features are missing from WCF Rest Implementation

In this question about using WCF and/or WebAPI, there is this quote: I was asking myself the same question until I found this WCF and ASP.NET Web API comparison page on MSDN (with my own emphasis ...
0
votes
0answers
5k views

Combination of the repository pattern, unit of work, and entity framework

I'm wondering how to properly combine EF, Repository Pattern and Unit Of Work. Does the solution that I have is quite correct? Example below is about Todo app ProjectController public class ...
-1
votes
1answer
446 views

Should I use the same solution for WebAPI and autogenerated client for it?

I have the following situation: ASP.NET Core WebAPI solution which uses Swagger Automatically generated client for WebAPI using Autorest, extended with custom authorization. This client also will be ...
2
votes
3answers
2k views

Web API - How to prevent the POST-ing of entities with custom Id values

Let's say I have the following model: public class Product { public string Id { get; set; } public string Name { get; set; } public string Category { get; set; } public ...
2
votes
2answers
2k views

Asp.net mvc web api model validation best practice

I have an annoying code smell in my asp.net core api that I am passing around, and I can't come up with a way to fix. In an MVC controller action, usually there is a very straight forward logic, at ...
0
votes
1answer
362 views

Use of iFrame to avoid IE oddities

I'm working with a team on an ASP.NET MVC C# EF application that needs extensive Help materials. The Help materials will be stored on a helpdesk site (FreshDesk) so they can be accessed as a ...
0
votes
2answers
683 views

Asp.Net Mvc 5 / Web Api 2 unit testing data access layer

Let's say I have IRepository interface implemented by Repository class(uses database context to implement IRepository methods). And IUnitOfWork interface implemented by UnitOfWork class using ...
6
votes
3answers
14k views

Is it okay to have multiple get action methods in ASP .Net Web API controller according to RESTful API constraints?

I have the following interface in my business layer public interface IUserService { void CreateUser(User user); List<User> FindUsersByName(string searchedString); ...
1
vote
1answer
848 views

Dotnet (.NET) core MVC WEB API SPA Project and Solution Structure

I am building a new simple web application using dotnet core (.NET Core) and Angular SPA. Does it make sense to split API and Web App into different projects? This would complicate things (...
0
votes
1answer
126 views

Architecture for email service API

I would like to build an application for sending emails. So I chose ASP.NET Core (API) which will be deployed by Docker. The application will get some request and "do some things" and then sends ...
0
votes
1answer
3k views

Entity framework vs pure ado .net in calling stored procedure in an enterprise project

There is an enterprise project, which all the business implemented in databases and in the stored procedures, and web API is just like a light wrapper which get the request and deliver it to proper ...
3
votes
2answers
498 views

Best technique for pushing many records and files to a system: WEB API or FTP

I have a website where users can upload manuals (PDF documents) for their products. Basically, they first add the product to the system and then add 1 or more manuals to that product. A manual can ...
4
votes
2answers
175 views

If I have ten objects, should there be ten controllers for a Web API?

Is it good design to have a controller for each object of your API? I know this is a short question, but it's really a fundamental question that I do not know. Say I have a school or a CRM. That is ...
10
votes
2answers
4k views

Isn't CQRS overengineering?

I still remember good old days of repositories. But repositories used to grow ugly with time. Then CQRS got mainstream. They were nice, they were a breath of fresh air. But recently I've been asking ...
1
vote
1answer
1k views

What is a good technique for supporting sorting and filtering with a REST WebAPI

I'm in the process of developing an ASP.NET Core WebAPI that uses EntityFramework to access the datastore. One of the things we need to support is sorting and filtering. I'm assuming that the HTTP ...
2
votes
1answer
1k views

ASP.NET Web API: enum or strings

I have an ASP.NET Web API application. It uses enums for some fixed sets of states or types. Now I need to extend enum to support more values. But it will break backwards compatibility so I need to ...
3
votes
1answer
218 views

Joining table with table from external database/API

For a prototype project I've created an Angular 2 application with simple CRUD functionality using Auth0 to handle authentication with a back-end containing a Web API (core), Service and Repository ...
1
vote
1answer
64 views

In which order should page- and pageSize-parameters be used?

I'm building an api and a bit into the development I realized that I constantly change the order of the page and pageSize parameters. Currently I use C# and javascript, so the method declaration ...
3
votes
1answer
452 views

Which is more secure for the DB, Web API or MVC with repository pattern & EF?

I am 1 of 3 developers. The other 2 use Web API and angular to build web apps. I prefer ASP MVC with a repository and EF. The stated argument is that a service is more secure when accessing the ...
1
vote
1answer
421 views

Consume ASP.Net REST API service

I am creating ASP.Net REST API application and stuck on the part where I should consume the REST service. I am not sure how to find the way let me accomplish the following: 1. I don't want it to be ...
0
votes
1answer
104 views

How To Design Tiers For Web and Mobile App

The scenario is to have a Mobile App and Web App too. So currently I can think of two scenarios Which one do you guys think is better? PS : If needed I can also implement DAL Layer in both the ...
3
votes
1answer
948 views

Web API to Windows Service communication via ZeroMQ

I have an ASP.NET Web API 2 web service. This is the interface customers will use to submit data. I have a Windows Service running on an internal server. I will be sending the customer's POST data to ...
7
votes
1answer
1k views

One Large API to several microservices vs lots of small APIs each with their own API

I have an application that is beiong split out into a number of services. From a previous question on here, I think that initially JSON/REST is the way to go for communication. Some of my micro ...
3
votes
3answers
3k views

Migrating large silverlight business application to MVC

I have the task to migrate a large silverlight business application in a new living technology. I had choosed asp.net MVC and web api. As we know, silverlight uses MVVM design pattern whereas asp.net ...
0
votes
0answers
2k views

How to implement authentication between asp.net MVC application and Web API?

For an upcoming project, we have to build a secured web application with ASP.NET MVC. This web application will communicate with an ASP.NET Web API for all the CRUD actions. The user will have an ...
0
votes
1answer
539 views

What's the most straightforward way to integrate my company's custom authentication with ASP.NET SSO?

My company has a series of WinForms applications that pretty crudely provides authentication by checking usernames and passwords directly against the database (with a little hashing). I have a fair ...
1
vote
1answer
1k views

.NET MVC authentication to AngularJS to .NET web API advice needed

So i am inheriting a team and a large project that should have been built with a restful back end. For the time it is only reporting and we all agree to build out a web API (separate project) with ...
0
votes
1answer
143 views

My web app uses ASP, but does-it need it?

I’m relatively new to web development, and I’m amazed at the variety of new concepts in the field. I could probably use some help to synthetize. I have to deal with is a backend written in Delphi, ...
2
votes
2answers
542 views

Where should i put the WebAPI

I've just started the project and I have this sort of parts in my solution MyApp.Web MVC Web Application MyApp.Data Class Library MyApp.Domain Class Library MyApp.Service Class Library MyApp.Utility ...
6
votes
1answer
3k views

Token or ASP.NET Identity based security in ASP.NET Web API 2

Background I have a Web API 2 project, without any extension of ASP.NET MVC or ASP.NET projects. The API will only be used to communicate between the server and Windows 8, Windows Phone 8.1 and iOS ...
0
votes
1answer
111 views

How to scratch database that query faster for cloud computing

We are planning to develop a cloud based database driven web application which we would like world to use. Till date at the database side we have used fully normalized way to store the data and use ...
3
votes
1answer
855 views

Is it poor practice to return different data types from alternative Web API endpoints?

Consider a Web API with an endpoint api\LargeItem A LargeItem is a pretty big object with lots of properties and long strings. A user can GET any one like so api\LargeItem\1 which returns the ...