Stack Exchange Network

Stack Exchange network consists of 175 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]

ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites and web applications. It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any supported .NET language.

0
votes
0answers
5 views

Refactoring ASP.NET web forms app to MVP vs incrementally rebuilding it using MVC?

My team has inherited a Web Forms application that was built over the past decade or so into a monolithic code base with massive dependencies. In order to maintain this system we are going to have to ...
0
votes
2answers
62 views

How to implement a live purchasing system with remote client applications [closed]

I am creating a website to allow users to purchase products from their accounts. However every purchase needs to be manually confirmed by a user in a remote location where each purchase can be ...
-3
votes
1answer
37 views

MVC Where to put my validation

I just started using MVC this week and was wondering where does input validation go? I have 1 model: Data.cs public partial class Data { public Games getGames(int id) { ...
0
votes
0answers
41 views

Asp.Net Boilerplate (ABP) Module system - Why?

My question pertains specifically to the module system implemented in the ABP framework and the associated AspNetZero module, as documented in the official AB documentation. I am trying to understand ...
2
votes
2answers
134 views

Multiple database system design

I am designing a few different systems that revolve around a core system used to manage users, groups, associations between users, group memberships, user profiles and some other things. System A ...
1
vote
1answer
95 views

Correct approach to pass data to service layer

I'm curious what's considered the (best) correct way to pass data to a service layer in ASP.net Core. Say I have a Person entity that has a relation to a Image (profile picture) entity and another ...
1
vote
1answer
56 views

Publish a single ASP.NET Web application on multiple domains with Git support

I have a developer who is developing an ASP.NET Web application for me and I've been publishing it so far on my server, example1.com, so far without any problems. It is managed with a single Git ...
0
votes
1answer
91 views

Where to apply multi-tenant logic (ASP.Net Core)?

I'm developing a multi-teant SaaS application in ASP.NET core mvc and I was wondering what the general approach is to applying tenant logic in a shared database scenario (TenantId for each entity). ...
-1
votes
1answer
89 views

Is it good idea to set custom-defined getter and setter in c#?

I tried this way to define custom defined property but I wonder how to handle if any of the dependent properties have null value. public class ObtainedMarksDetail { private decimal? ...
0
votes
1answer
146 views

In MVC + SOA Architecture, What is the Rationale for Placing Business Logic in Models?

When writing web applications I place business logic in controllers. This has worked well for my small App Dev team- our applications run reliably, perform well, and the code is easy to maintain. ...
3
votes
1answer
162 views

Application_Start() vs ApplicationStart()

Why is the method in Global.asax called Application_Start() and not ApplicationStart()? According to MSDN method names should be in Pascal case.
-1
votes
1answer
564 views

Creating a mobile app based on the ASP.NET Core website

Coming from Desktop development, I'm in the middle of my very first web project (as a small side/learning-project). I'm using ASP.NET Core 2. I'm already thinking about going mobile too. What are my ...
1
vote
1answer
295 views

Entity Framework - extending OR injecting services into DB Context

I fear I'm asking a somewhat silly question, but I'm now completely lost as to which principle I should follow. To my understanding - in terms of Single Responsibility Principle it's best we don't ...
-2
votes
1answer
99 views

How to migrate an existing ASP.NET MVC site to ASP.NET MVC Core - specifically on authorization

I am in the process of upgrading an existing website to ASP.NET Core 2.1. The goal is simplification and ease of maintenance. Existing site is using: EF and .NET 4.6.2 A [Users] table in SQL Server ...
2
votes
2answers
221 views

WCF vs ASP.NET - Binary IPC

I have a windows service and a remote IIS server that need to communicate without any user interaction. As I can’t guarantee the two machines will be on the same network; the service will connect to ...
0
votes
3answers
98 views

Updating nested entities with constraints without getting spaghettimadness

I have an endpoint "import" that is supposed to accept an entity. This entity can contain several sub-entities with yet again some sub-entities. Since this is an "import" endpoint, some of the entites ...
2
votes
2answers
434 views

What data should a repository return

I have a simple project where the controller calls the service, and the service calls the repository in order to get the needed data. Assuming that we have these domain models: // this model has a ...
0
votes
1answer
85 views

Reasons why the ASP.NET Web API Controller cache ignores dynamic assemblies

I've been reading about how ASP.NET Web API looks up the locations of controllers in assemblies, and ways to dynamically add a new assembly to look in. So far this has all been fine, except I've ...
-1
votes
0answers
55 views

ASP.NET RoleProvider AddUsersToRoles - Removing exception if user already has role

I'm implementing a custom RoleProvider in my ASP.NET web app, however I had a question about the example implementations of AddUsersToRoles and it's Remove counterpart shown here: https://msdn....
3
votes
2answers
933 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
1answer
737 views

How to impersonate user in web app?

I am building an intranet web app with ASP.NET. We are using Windows authentication for granting access to different web pages. We grab your Windows login server side, then build web pages ...
2
votes
1answer
1k views

Is .NET ASP MVC core suitable for rapid web development?

I currently work for a company who builds web applications for businesses and entrepreneurs, typically 4-6 projects per year. We currently use Laravel/PHP which allows us to build apps relatively ...
-1
votes
1answer
38 views

When should you use config transforms rather than compiler directives?

I'm currently working on an application which uses compiler directives to vary settings between environments. Would it be worth refactoring these to use settings in the web.config which will be ...
2
votes
1answer
49 views

Should the ORM create the related objects (ForeignKey objects) when saving the entity?

This question is coming from a frustration when using the Entity Framework and ASP.NET MVC, but I assume it's a general frustration across more frameworks and languages. Lets say we have an object ...
-2
votes
1answer
352 views

Strategy pattern with Async c#

My question is public interface IFoo { void HandleRequest(int i); } public class Class1 : IFoo { public void HandleRequest(int i) { if(i == 1) // just for example { ...
0
votes
1answer
266 views

asp.net Core 2 MVC - best way to send 1000s of emails every day

We need to send 1000s (under 10,000) per day for a few years. The data is in a SQL Server database - we have many asp.net MVC 5 and .net CORE 2 MVC sites on a Windows 2012 R2 server on IIS. The ...
1
vote
3answers
198 views

Is it bad practice to build a large web component as a Html Helper?

So, from my understanding, Html Helpers are supposed to be for single elements or small snippets of html. However, I'm not really sure why I think this, or how I came to abide by the practice. I ...
2
votes
1answer
73 views

Does using MEAN stack reduce the need for code and data structures compared to ASP.net with SQL?

I've been writing web applications for almost 10 years. The ASP.net stack has been my bread and butter and although it has a lot of great things about it, I honestly never chose ASP.net. It's just a ...
0
votes
1answer
309 views

I'm looking for some solution architecture advice for ASP.NET Core and WebApi [closed]

I know that the way you set up your solution and working environment is subjective at best, but I'm looking for some guidance and possible examples for structuring a solution that uses ASP.NET Core, ...
0
votes
0answers
46 views

Multi tier web application

I'm creating a multilevel web app to study best practices. I've created a four-level application like this: -Solution --- Level view --- LayerBL --- LayerDL --- LayerCommon (contains the helpers) ...
1
vote
0answers
77 views

What is the best way to implement an HTTP endpoint with different return types?

I need to make an HTTP endpoint with different return types based on query params. There are several options to do that: Return an object with one property set and the rest equal to null: public ...
-3
votes
2answers
1k views

Is it better choice to use both AngularJS and ASP.Net MVC for developing ecommerce website?

I know about MVC, But I don't have such experience with AngularJS. But both has controller and View. To develope like e-commerce site, is it good choice to choose AngularJS to do filtering with ...
0
votes
2answers
212 views

Abuse of 302 Temporary Redirect

So I am junior programmer, and I just started working with .net webforms a little over six months ago. I have been studying SEO, and trying to optimize best practices with a senior level developer. I ...
2
votes
1answer
217 views

ASP.Net MVC When ViewModel properties vs Ajax calls in view

When is it more appropriate to use asynchronous calls from the view to get data vs prepopulating it server-side when creating the instance of the viewmodel? For instance, if my view has some dropdown ...
1
vote
2answers
1k views

WebSocket Client as an always running service

The company with which we are integrating is a door security company that makes RFID cards and door scanners. You scan your card, the door opens and lets you in. They allow 3rd party integration via ...
3
votes
4answers
2k views

Is it possible to cache data on a REST service that returns paginated data?

Under the REST architecture principles, a RESTful application should be stateless, therefore each time I invoke an ASP.NET 4 REST service (with GET verb) that pulls tens of thousands of records, the ...
1
vote
4answers
153 views

Dealing with settings that will change on a per-environment basis?

We have a bunch of appSettings in our ASP.NET web application, not to mention connection strings, that change on a per-environment basis. Not just for different environments to which the web ...
0
votes
2answers
795 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 ...
0
votes
1answer
82 views

Microservices - External access tokens stored in identity service, calendar service, or both?

I'm creating an application which, so far, has an identity service(using identityserver4), a front end, and a calendar service. The user logs in via third party(say, google) and grants permissions to ...
3
votes
3answers
863 views

How to handle large switch statement running several different commands?

I've been tasked with refactoring a console application, which is constantly running on a server and receiving messages from a service bus. Right now, it just parses the incoming message, and based ...
1
vote
1answer
207 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
vote
0answers
543 views

What is the “recommended” way of using Asp.Net core, Angular, and OpenID-Connect

I mainly just want a lead in a direction with this. I'm not asking about specific frameworks to use, even if I mention them, just how it's supposed to work. I am trying to get an understand of how ...
5
votes
5answers
257 views

How can I store information with varying structure?

I'm having trouble coming up with a name for this problem, but I feel like its been solved before. I think my naiveté is preventing me from typing the right words into Google to get the results I need....
7
votes
2answers
1k views

Can a caller abort an execution of code invoked by HTTP request?

A third party that is going to make HTTP requests to the API that I'm building, requires that the API responds in less than one second. My question is, do they have a way (literally any way, within ...
2
votes
1answer
109 views

Do modern design paradigms support Soap parameters and url parameters at the same time?

I'm currently updating a few very old web Services and came upon a Situation where I'm unsure. I've got a web Service with the following method Header: public string MyService(string data1, string ...
1
vote
1answer
51 views

Area of Use for webservices?

I'm used to program Desktop applications and old School (without web Services) web pages. Now after reading up on web Services and also wcf I'm unsure about the area of usage for web Services. The ...
0
votes
1answer
46 views

Is a InMemoryDatabase suitable for store live data?

I'm learning ASP.NET Core 2, with Entity Framework Core. A real use-case scenario is a small management of a production process. I have some persistent table like customers, orders, machines, etc... ...
0
votes
1answer
129 views

Decoupling MVC core project from application specific code? (.NET)

I am wondering if this is a good idea in the first place. Basically I want to create a template upon which to build numerous sites. The idea is I can update the "core" of the website without having ...
1
vote
1answer
516 views

Is it right to have dependenties to my Viewmodel from data acces layer and view layer

Context In my application I use the MVVM pattern. I'll have a ViewModel that can contains information of a student. This viewmodel is used to communicatie between my view and model. I use ASP.net ...
1
vote
2answers
73 views

.NET project tracked with git - keeping target Framework 4.0 and 4.5.2 in parallel

Relatively new git user here, so just trying to figure out the best way to keep my project as 4.0 and 4.5.2 framework variants in parallel. Maybe this shouldn't even be done within git? Just create a ...