Questions tagged [asp.net-mvc]

Model-View-Controller for the ASP.NET framework

30 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
4k views

Logging in ASP.Net MVC project

I want to implement a Logger and use Serilog as Provider. My Project is ASP.NET MVC Framework (not core). Initially I tried to replicate ASP.Net Core Logging framework. I created a ...
3
votes
0answers
1k views

Controller in an ASP.NET Web API application which generates a CSV file

I have a controller in an ASP.NET Web API application which generates a CSV file. The controller looks like this: ...
3
votes
0answers
567 views

AJAX shopping cart with quantity +/- buttons

I'm a junior developer (couple years into it) and very new to AJAX. I'm writing an internal inventory application built on MVC and right now I'm dealing with adding and removing items to/from a cart. ...
3
votes
0answers
276 views

Asp.Net MVC Application Controller

I'm developing a webapp in ASP.Net MVC. One of the requirements of the project is that users follow a "workflow". The workflow has a number of steps, and a conditional branch. The workflow is long ...
3
votes
0answers
101 views

Multitenant app authorization

Role based security does not work for me well in a multitenant app, as I need to query DB to decide on permission allowance. Here is the solution I came to. All implementations of this interface will ...
3
votes
0answers
1k views

Wrapper for jQuery Ajax to ensure redirects occur on clientside - Round 2

A while back I posted Wrapper for jquery ajax to ensure redirects occur on clientside on handling ajax and redirects when a server side error occurs. Since that post I've been using this module ...
2
votes
0answers
36 views

Managing invalid cookie when 2 users use the same computer and therefore share the same cookie

I have asked this question on stackoverflow... here, I am asking for some feedback on the solution that I have implemented. I am using ASP.NET MVC default template to logout user: ...
2
votes
0answers
3k views

Member management of Active Directory groups via an ASP.NET MVC website

Background One of the projects I'm working on is an Intranet website which is a front-end for several kinds of data, each aimed at a different set of users. Access to the website is handled through ...
2
votes
0answers
661 views

RESTful API combining three other APIs

I have created a RESTful API that uses three other APIs with Visual Studio 2017 in .NET Core. It is the first time I have ever programmed in .NET so I am sure the code could use a lot of improvements. ...
2
votes
0answers
481 views

Passing a complex object across cross domain

I am working with two web applications, one is webform-based Site1 and other is an MVC application Site2. TODO: Pass a complex object from Site1 to Site2. In response get View from Site2 to Site1 ...
2
votes
0answers
7k views

Mapping Excel columns to table columns, then processing data

I have written some code for mapping excel columns to table columns and processing data after mapping columns. Please review this code, check for SOLID, OOP principles and suggest any improvements and ...
2
votes
0answers
71 views

Authentication terminology

Below comes a Value Object to represent UserId in ASP.NET application. It implements Value Identity, so equality is defined by matching of the state calculated at ...
2
votes
0answers
108 views

Business logic in controller

Led by the recently read premise "Lean controllers and fat models" I've come to the conclusion that my controller might be too fat at the moment. Basically, what I'm trying to achieve is simple Edit ...
1
vote
0answers
24 views

SSIS and multiple API calls, a better way?

I am looking for some guidance on my solution as I am convinced there must be a better way. The below is my setup... SSIS Package API 1 - This calculates invoice totals and payments API 2 - This takes ...
1
vote
0answers
44 views

Addition/removal of entities in EF6 many-to-many architecture

Is there a way to do this many-to-many update with less code? It feels awfully bulky to me. I started out using AutoMapper to avoid the explicit value assignments, but then the mapped ...
1
vote
0answers
57 views

Getting around CORS error for displaying images on my website

I have my images stored in an S3 bucket and I am serving them from AWS CloudFront. I have created 2 CNAME records for the CloudFront: mywebsite.com and ...
1
vote
0answers
34 views

Add a folder with jstree

I read on SO and other pages that I should avoid JavascriptResult, I do not realy know why, but now I use JsonResult, because it is more common. Here is my Ajax in the cshtml: ...
1
vote
0answers
214 views

E-commerce site for posting advertisements

I am developing an e-commerce website in ASP.NET MVC. Users can post advertisements of different types on the site. I am using inheritance to define my Ad types, and this review is mainly about ...
1
vote
0answers
43 views

Querying a database to find notifications to comments

I have a solution what I think is not the best, and I want to make this not so expensive. I'm using MVC 5 + SignalR (hubs) + EF + UnitOfWork + Generic Repos. I have a table ...
1
vote
0answers
57 views

Volume control with using asp mvc 6

General purpose of this training project is to control sound volume on remote machine (which exposes ISystemControlClient through web service). It's created using ...
1
vote
0answers
62 views

Get typed results for examine indexer using Umbraco

Continuing on this question on Stack Overflow, I've found a working solution. The case The case I'll create is that I've got a lot of persons and a knows person get 0, 1 or multiple languages. The ...
1
vote
0answers
48 views

Add Colour Tags on Click - Version 2

I recently asked a question here, where I was trying to implement some extra functionality into the tag-it plugin, where the user should be able to add tags to the input by clicking on them in a "...
1
vote
0answers
1k views

Asset management system

I'm relatively new to developing and I'm mostly self taught so a lot of what I know simply comes from googling & figuring things out from there! That being said I've put together an ASP MVC ...
1
vote
0answers
932 views

.NET MVC Infinite Child record add

Here is my working attempt to allow multiple/infinite child record entries with the original parent post in .NET MVC. Any refactoring to simplify my code would be greatly appreciated: Controller: <...
1
vote
0answers
1k views

ValidationAttribute to validate a string against a JSON schema

This is my implementation of an .NET ValidationAttribute to validate a string against a JSON schema. The JSON schema file is stored within the application as an ...
1
vote
0answers
1k views

MVC application internationalization using a database provider and dependency injection

Following Nadeem Afana's article about how to include internationalization into an MVC application, I have introduced i18n into one of my MVC applications. These ...
1
vote
0answers
4k views

Populating Charts with Chart.js

I have a dashboard page which populates some charts. They execute a Linq query to then transform the data into Json to populate the Chart. These charts maybe used throughout the site, so I am ...
1
vote
0answers
70 views

Persisting database row ID between controller actions on a multi-step “create item” form

I have a form on an anonymous site which has 3 steps. A user submits each step individually, in sequence (1-2-3). BUT, step 1 creates a new table row, while steps 2 and 3 only update the existing row (...
0
votes
0answers
779 views

Upsert with .Net Core Web API

I am using .NET Core 2.2, EF Core and C#. I have created a web API project. I was requested to do an Upsert (insert or update). The entities structure is: Movie User Rating: this is used to give a ...
-1
votes
1answer
3k views

ASP.NET MVC multi language website

What is the best way to make an ASP.NET MVC multi language website? The following code is what I use, but I need to make sure from your real-world experience that my code is the best way for ...