ASP.NET MVC 5 is the fifth major version of the ASP.NET Model-View-Controller platform for web applications.

learn more… | top users | synonyms

2
votes
1answer
949 views

Login system using a persistent cookie

I want to be sure that my code below properly secures the website based on all of the information provided. Login System Overview When a user logs in, the following user info is saved to a ...
1
vote
1answer
42 views

Refining an ASP.Net MVC VeiwModel for a Table to display worked hours

I am writing an ASP.Net MVC app which has a page that will display a standard table which will contain a person's hours for the week. The basic structure of the table would be a 7 column, muti-row ...
0
votes
1answer
67 views

Bundling JavaScript resources for an MVC app

This is my first MVC app. I'm looking for best practice feedback on how to best bundle the files that I need, the order to bundle them, the placement of the @render ...
3
votes
0answers
83 views

AngularJS client side logging in a MVC web application

Being a newbie into AngularJS, I have overlooked the importance of client side logging until some non-reproducible client-side errors occurred and I realized that they were not logged. My web ...
1
vote
1answer
90 views

Create “refresh token” action filter

I am using idenity server 3 authentication. I have to implement refresh token logic. AccessTokenLifetime is 1 hour, and after that time I want to update access token with refresh token. I want do ...
3
votes
2answers
141 views

Using viewmodel create comper and edit

I have this really long httppost action results that I add and update 3 db tables I think it's too long and can get shorter and smarter. ...
4
votes
1answer
91 views

Joining tables with EF

Here is my database: Here is my viewModel: ...
3
votes
2answers
142 views

Keeping data processing out of controllers

I would like to start by mentioning that I am LAMP stack guy who happens to be making my first ever .NET C# web app and I'm seeking general advises for best practices and to see how more experienced ...
7
votes
2answers
131 views

Saving data in MVC

We have a lot of Controller ActionResults like this in our MVC project. The controllers get really cluttered up. This is a simple example, but we have much more ...
2
votes
2answers
293 views

Clean call api from client, with good practice

I am working on architecture where I can have any client + server API. I need to call API as clean as possible and get, post, put any object I want to. For me, it is important to have clean secure ...
1
vote
0answers
88 views

Securing User Credentials in Cookies

I have an asp.net/MVC5 app that for reasons that are outside of my control needs to hang onto (some) user credentials (username and password) to facilitate certain operations they may perform. I don't ...
1
vote
1answer
129 views

Using custom negotiator and custom formatter in Web API 2

Here's my custom formatter which I want to use for "application/x.product" content type: ...
0
votes
1answer
45 views

MVC.Net View Model

I'm nearing the end of my first MVC project which uses VB.Net and MVC5. I've started writing all my view models in a very similar fashion. This has been working well for me, but being the first ...
3
votes
1answer
134 views

Configuring MVC 5 project with service layer and DI and UOW

In the past I have always called the repositories directly from the controller, but that is a bad practice and now I am implementing a "Business Layer" to my project. Would I have two UnitOfWorks? ...
1
vote
1answer
106 views

Formatting MVC 5 Razor link as a string

MVC 5 doesn't seem to like JavaScript that much. I am creating link in JavaScript to a success method in my Ajax call. Razor: ...
5
votes
1answer
86 views

Redirecting a user

When the user clicks the first button ('Back to List' button), I redirect the user to the Employee List page. Can you please review this and suggest if there is any better way of achieving the same? <...
5
votes
2answers
110 views

Support ticket application: ticket listing index with sorting and filtering

I am new to ASP.NET (C#) and MVC 5. I'm really enjoying it so far, but want to take a step back and make sure that I'm following best practices here. My controller seems like it may be getting too fat,...
6
votes
1answer
51 views

Searching school data

I am running a test load using Telerik Test Studio using 100 users at once entering search filters on a page that calls a stored procedure. My application that calls the stored procedure is an ASP....
4
votes
1answer
1k views

N-layered application structure in ASP.NET MVC 5

I've been trying to set up an n-layered application in ASP.NET MVC 5. I've converted my account controller to look like this. I would like some feedback as to whether this is going in the right ...
1
vote
0answers
315 views

WebApi synchronize database (EF 6) access

I'm working on an ASP.Net MVC 5/WebApi 2 project. I'm using EF 6 code first for my database access. I have a WebApi action method in which I've to update some data in my database based on the request....
6
votes
2answers
42k views

Simple authentication in ASP.NET MVC 5

I am building an ASP.NET MVC 5 application and, for reasons which are irrelevant at this point, I am attempting to build my own means of authenticating users. I'm still very new to programming, ...
3
votes
1answer
2k views

Web application using the repository pattern

I have an ASP.NET MVC 5 web application using the repository pattern, and I have several controllers that need to call my _loggingService (queries audit logs) to ...
2
votes
2answers
196 views

Student data in a database [closed]

I am working on an ASP.NET MVC 5 project, using the code-first approach for database design. I have a question about my code design. I have an Entity in my database schema called ...