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.

Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

Need suggestions for creating field level permissions which can be changed dynamically in an app

This is currently my User-Role-Permission model in the Db schema (excluded other tables to avoid confusion). My implementation goes like this: I have a Customer table and each Role has a different set ...
0
votes
0answers
19 views

How are changes populated to FrontEnd in Microservices Event First scenario?

I've been reading recently about Event First approach to microservices where Event Store is a Single Source of Truth for all the applications (https://dzone.com/articles/data-consistency-in-...
0
votes
2answers
122 views

Building Client Specific Application on Top of Standard Application

I have a standard application and in this case, it is an Accounting ASP Net MVC application. Now, I have a new client that has their own specific requirements like other fields and some custom ...
0
votes
1answer
41 views

Authorization & Profiles considerations for ASP.NET MVC Customer Portal

there's an up and running self-serve customer portal built that I'm trying to make a bit better when it comes to displaying proper items for different client types and auto-logging users. Here are a ...
1
vote
1answer
62 views

Should all my asp.net MVC controllers use Web APIs?

The thing that I don't understand is the prioritization between MVC Controllers and Web APIs. Consider I want to make a website. I can either program to APIs and for the presentational layer, force ...
1
vote
1answer
61 views

Create a Azure Pipeline for staging then production environments

I have a question about best practice and Azure Pipeline. I have a web site (ASP.NET API old version) I need to publish on 2 environments staging production I think this schema is classic. At the ...
1
vote
2answers
135 views

How to consume nested objects in API resource

I am building my first web application, it links to the serverside through RESTfull Web API (Angular on client side, ASP.Net Core and EF Core on serverside, Automapper to map API Resources to/from ...
4
votes
4answers
254 views

Refactoring ASP.NET Web Forms App to use 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
0answers
194 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
146 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
207 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
68 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 ...
1
vote
1answer
165 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
254 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
180 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
1k 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
429 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
108 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
297 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 ...
4
votes
2answers
1k 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 ...
1
vote
1answer
122 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 ...
2
votes
2answers
1k 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
865 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
39 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
51 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 ...
-1
votes
1answer
418 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
382 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
273 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
74 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
332 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, ...
1
vote
0answers
80 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
234 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
245 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
182 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
980 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
99 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
1k 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
222 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
578 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
344 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....
8
votes
2answers
2k 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
114 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
52 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
49 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... ...