The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern.

learn more… | top users | synonyms

3
votes
2answers
116 views

Where does apply authorization rules for my layered application?

This question is about applying rules of my application that confuse me. My controller is using service and the service is using repository. public class CommentController: ApiController{ [...
1
vote
2answers
95 views

Single Class to Serve as View Model as well as Container for Submitted Form

I see the following design in the code which is part of the default web application project in visual studio: A single data model class in constructed and decorated with various data validation ...
1
vote
1answer
971 views

How to test model binding within an MVC controller when Bind attribute with Include list is used?

Auto-generated action methods in MVC5 make use of the BindAttribute with an Include list that contains the field names in a string literal. Example: // POST: MyTable/Edit/5 // To protect from ...
0
votes
1answer
358 views

Asp.net MVC web application and iOS mobile app

I am currently writing a web application in ASP.NET MVC, so far it is mostly a simple CRUD web app. The database is hosted on the cloud and I am using Entity Framework to interact with it. I know ...
-1
votes
1answer
78 views

Controllers and Separation of Concerns: discussing possible strategies

I've been working on a project based off of this tutorial. Unfortunately, the controller classes in this are quite dense and have terrible separation of concerns. I should have realized this ...
3
votes
0answers
163 views

Log with Application Insights only (NLog vs AI) in Asp MVC

I was going through several blog posts and stackoverflow and programmers and I am still a bit confused. You can install NLog (or some other logging lib) and start logging quite fast and then you can ...
3
votes
0answers
179 views

Refactoring to avoid circular references

I'm working on an ASP.NET MVC solution that has two projects, WebUI and DAL. WebUI references DAL. DAL has the repository and context, while WebUI contains Authentication and Authorization classes. ...
3
votes
0answers
1k views

How to tell SignalR Notifications Hub that there is a new notification without having SignalR poll on that table

I'm developing a push-notifications system for my ASP.NET MVC app. The idea is to use Redis for queueing, ServiceStack for queue processing and SignalR for push-notifications to implement a system ...
2
votes
0answers
197 views

Why did the Microsoft developers did not put T4MVC (or its working) in the core MVC?

What T4MVC does makes complete sense to us. It converts the simple string input into strongly typed input, which eases things for the developer. Like this - return View("foo"); to return View(...
2
votes
0answers
205 views

Validation and Authorisation in Domain Models and Carrying that through a Service Layer to MVC

With the current project I'm working on there's an architecture question being asked which feels like it might just be asking too much. System Basics: HTML/JS MVVM Asp.net MVC Web Services EF SQL ...
1
vote
0answers
35 views

How to deal with weekly schema updates on database production server? (ASPNet MVC and Entity Framework)

I'm working with scrum methodology. thus weekly schema updates are performed to the final product. However our customer is already populating the database. How can I update the database without ...
1
vote
0answers
50 views

Project Design - Separating JS and C# tasks - Risks vs Benefits

I'm in RFP phase working with outsourcing vendors on the 100% rewrite of a fully operational prototype asp.net app that I wrote, to make it commercially viable. I have an idea for a project design ...
1
vote
0answers
74 views

Using delegate to handle cross cutting concerns

I am planning to write a net-core library for using with n-tier architecture. In this architecture, i want to handle cross cutting concerns(audit, error handling, logging, validation, transaction ...
1
vote
0answers
52 views

Is there any way to take advantage of portable ViewModels for ASP.Net?

Microsoft supports portability when taking advantage of the MVVM pattern: https://msdn.microsoft.com/en-us/library/hh563947(v=vs.110).aspx This means that I can create a ViewModel that is reusable in ...
1
vote
0answers
633 views

Any “Gotchas” to using Entity Framework for Identity & Dapper for all other DB access in a .NET MVC application?

I'm firing up an MVC project in which I'd really like to use Dapper as my ORM, as I like to be as close to the database as possible for performance and SQL tweaking reasons, yet still have the power ...
1
vote
0answers
394 views

Single sign-on flow using ASP.NET MVC + Active Directory

I'm looking into creating a single-sign-on portal built in ASP.NET MVC. This single sign on portal should give users the option to sign in with their individual account (which should be verified ...
1
vote
0answers
115 views

Single page application automatically download dependent HTML

I'm currently developing an application using ASP.NET MVC5 and Knockout. For now, the typical architecture is this: FooController.cs: public ActionResult GetFoos(){ //... var model = // ...
1
vote
0answers
120 views

Does using membership provider in the model of a MVC project mean the model knows it is part of a website?

My basic design is that the model is in a separate project from my website, and the project never references the website. That tends to enforce the model being agnostic of how it is being used. But ...
1
vote
0answers
34 views

Run WebAPI on Azures free web site

Just a quick question. I see that Azure have an offering where you can host 10 websites for free? Is it possible to use this to host some WebAPI projects instead of a conventional website? ...
1
vote
0answers
170 views

How to validate information on server without using database or session

Each user has multiple sites they can access reporting data for in an application I am working on. To prevent having to go to the database on every single request, I validate that they have access to ...
1
vote
0answers
187 views

Hosting image oriented ASP.NET MVC site; how to keep things fast?

I have a site that heavily relies on high res images being uploaded and viewed constantly. Currently it's hosted internally which keeps everything fast. I now want to move the site externally, but I ...
1
vote
0answers
640 views

TryUpdateModel vs Parameter and ModelState.IsValid

As I was originally learning about MVC, the book I was using taught the following technique for Controller actions: public ActionResult MethodName(Model model) { if (ModelState.IsValid) { } ...
1
vote
0answers
233 views

Web Services and Computer Services to access low level system functions

So I think I'm in the right place to ask this question. Its fairly conceptual. I love web development, I work in ASP.NET MVC 3/4/5 C# and have created industry standard applications such as CRM's and ...
0
votes
0answers
25 views

Multiple web apis under one domain

I am using ASP.NET MVC and I have a project where I need to build different integration rest APIs for different partners http://domain.com/api/integration/partner1 http://domain.com/api/integration/...
0
votes
0answers
25 views

Using @Hidden or passing through BeginForm?

I have a small question about the following answer from a stackoverflow question. There seem to be 2 ways to pass parameters through a @BeginForm() to a Controller. Using a Hidden field: @Html....
0
votes
0answers
21 views

MVC with out of process Session and web garden

I am using NopCommerce to setup my eCommerce website, and it's built on MVC. Recently I tried to turn my IIS web server into web garden with 4 worker processes. I also implemented StateServer using ...
0
votes
0answers
145 views

Winform User Control on ASP?

I wrote a C# Winform User Control as follows when Executable is Run: My question is how we can use this Winform C# user control in one ASP Page. I know about WEB User Control and using in ASP but ...
0
votes
0answers
24 views

Composite ViewModels from many Domain models

I asked a similar question on this site before but from then on things got a little more complicated. I'm trying to find the best way to implement ViewModels which are regularly composed from ...
0
votes
0answers
521 views

How to implement authentication between asp.net MVC application and Web API?

For an upcoming project, we have to build a secured web application with ASP.NET MVC. This web application will communicate with an ASP.NET Web API for all the CRUD actions. The user will have an ...
0
votes
0answers
129 views

Multiple inheritance in ASP.NET MVC Controller

In one case BaseWizardController should implement background functionality of BaseController->BaseConsumerController, in other case it should implement only BaseController. Any ideas how can I do ...
0
votes
0answers
82 views

Implementing a one way web request/response in .NET

What is the better way to implement a request/response in .NET when dealing with just getting an xml web resource for the external source and process it to your system? By the way, to access this xml ...
0
votes
0answers
92 views

Azure Active Directory

I am developing a suite of applications that will be hosted in Azure. Some apps will be for customer use (not public tho, i.e. invited/paid up customers) and some for internal employees. For ...
0
votes
0answers
144 views

Is this approach scalable?

I am working to rewrite a legacy application (C++) to C# ASP.NET MVC with EF6 but plan to upgrade to ASP.NET Core1 and EF Core 1. The database schema is really arcane in that it has a single schema ...
0
votes
0answers
74 views

One form with multiple fields vs several forms doing ajax requests

I have a group of invoices to send to a back end. The requirement is to be able to send everything with a button, so I can do the following: Send everything as form fields name like ...
0
votes
0answers
69 views

Best Practice for relating an Azure Active Directory user with Entity Framework

I'm creating an ASP.NET application that uses Azure Active Directory to Authenticate users. When using Entity Framework for the models what would be the best way to have an entity related to a ...
0
votes
0answers
130 views

EF “Code First” and Object/Relational Impedance

I'm trying to learn more about the current orthodoxy with respect to ASP.NET MVC application design, and I stumbled upon something that confuses me, relating to the choice among database design ...
0
votes
0answers
85 views

MVC OAuth with keeping user logged in

I am creating a news site where one can add some news. User will be registering with theirs facebook accounts like on this site. There will not be other type of users, just facebook users. And I wish ...
0
votes
0answers
214 views

Emulating `tail` to stream log data via asp.net mvc

In similar fashion to this bit of node.js, I'm interested in streaming the ongoing output of a text log file via ASP.NET MVC. I'm having trouble even thinking how I would implement this using the ...
0
votes
0answers
232 views

ASP.NET MVC : How asp.net mvc view engine bind model and render data in html form in browser?

How mvc model binder binds data to model and when I submit form or pass model to view. //Action public ActionResult ShowStudent() { Student student = new Student(); return View(student); } //...
0
votes
0answers
302 views

How would you load controllers and routes after startup in mvc 6 without restarting the application?

I would like to create a plugin system to allow new controllers to be added at runtime. These will be api controllers and not views. I know I can add controllers from other assemblies at startup by ...
0
votes
0answers
105 views

ASP MVC Performance Analysis in Azure

I have a web application based on asp net boilerplate using EF6. The site is in it's finishing phase and I'm trying to tweak the performance to the best of my abilities. I was able to reduce the ...
0
votes
0answers
338 views

When to create a new MVC Controller for a model

The Project: I have several cases where I'm not sure whether or not I should be using a 'Separation of Concerns' approach or a simplistic one. They're all similar to the setup below. e.g. An Estimate ...
0
votes
0answers
118 views

Can a type provider mimic an anonymous class?

I'm working on building a website using the F# MVC 5 template, and I noticed that the template creator uses formally declared types for the route defaults. In VB.Net and C#, this is typically done ...
0
votes
0answers
202 views

Using web api or libraries

We currently have 1 domain and 4 subdomains using 5 different applications. We are programming in asp.net and we have 6 different solution project. 5 applications and 1 solution for shared back-end. ...
-1
votes
0answers
27 views

Need example project layout when using AngularJS with ASP.Net MVC for mini-spas

There are several different ways to use ASP.NET MVC and AngularJS together, especially regarding folder structure for the different parts. Instead of having one large SPA, which your _layout.cshtml ...