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]

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....

3
votes
1answer
128 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.
-3
votes
0answers
26 views

manual JWT token signature in VB.net

is it possible, to hash (HMACSHA256) together a (secret key, encoded string) in VB.net, in order to manually create the JWT token signature portion?
-1
votes
1answer
30 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
118 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
83 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
138 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
0answers
41 views

How to design parallel web api in c# .net 4.5?

I am trying to design a web api that can get data from an external server but with limitations. I'm trying to figure out how best to design it to be efficient. My api has an endpoint that takes an ...
0
votes
3answers
90 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 ...
1
vote
2answers
163 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
49 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 ...
0
votes
0answers
31 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
1answer
599 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
591 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 ...
1
vote
1answer
548 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
36 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
41 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
279 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
170 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
121 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
72 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
281 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
43 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
72 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
913 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
174 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
145 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
833 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 ...
0
votes
0answers
28 views

Designing a Data Model For Climbing Gear Checked Out at Events

I am trying to setup an internal use asp.net core 2.0 application to check gear in and out at climbing events. The Model will go something like this: Category.cs (like ice, mountain, etc...) ...
3
votes
4answers
1k 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
118 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
620 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
70 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
615 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
173 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
477 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 ...
4
votes
5answers
228 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
922 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
106 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
40 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
107 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
389 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 ...
0
votes
3answers
156 views

Designing a CMS. When to use interfaces properly and dependencies and layering

I am building a CMS and need guidance on how to structure the application. I simply do not understand when I should use interfaces or an abstract class. The system being built is using .Net Core and ...
1
vote
4answers
2k views

ASP.NET Projects using too much .NET Boilerplate Libraries / Code

I am very puzzled with the obsession that many people seem to have with using Microsoft frameworks. I have seen several tutorials and projects (both open and closed source) that seem to utilize all of ...
-1
votes
1answer
94 views

Proper way to deploy and test ASP.NET applications with databases in 2017

I'm currently developing a quite large ASP.NET application which uses SQLExpress as the underlying database. The project is currently under heavy development and is covered with unit tests and ...
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 ...
0
votes
1answer
156 views

Source Control - ASP.NET WebForms - Inexperienced team

I am currently working at a company that has a small(2) development team for our ASP.NET WebForms project. This was something we picked up from a previous team. The current team is made up of recent ...
-1
votes
2answers
523 views

Consuming Web API in website with role based views

I understand Web API. I understand websites, how they call a web API and all the good stuff. My question is, how do you control the user view in the website consuming the API, based on the API ...
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 ...