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

learn more… | top users | synonyms

0
votes
0answers
22 views

Implementing internal own authentication

Let me apologize first if this topic is too subjective, or not concrete enough. I want to implement a login api for an internal web service at my company using asp web api 2. I know how to implement ...
2
votes
3answers
65 views

Pre-processor usage to separate logic to different versions of product

In the .NET code base of a product, there are #if pre-processor statements to define whether certain functionality should be available. Like so: shared logic #if version1 some logic #endif #if ...
1
vote
1answer
246 views

Mid-Large Asp.net MVC project: Storing images on filesystem or via SQL Server FILESTREAM [duplicate]

We have a ASP.NET MVC project with AngularJS and Entity Framework database-first, a news portal already in production for about a year. The project is mainly focused on providing content for users ...
0
votes
0answers
24 views

passing different models to view based on razor theme engine

I'm using a pattern similar to the one here to implement a Themed View Engine. Basically instead of having a View folder, I have a Theme folder and inside different themes: default, red, blue, green, ...
1
vote
1answer
65 views

Why does a custom action filter need to inherit from both ActionFilterAttribute and IActionFilter?

I m first time creating a custom action filter and following this link http://www.asp.net/mvc/overview/older-versions/hands-on-labs/aspnet-mvc-4-custom-action-filters They are saying to Extend ...
3
votes
1answer
225 views

why Web API 2 has RouteConfig.cs file?

I m working on Web API project, and it is using WebApiConfig.cs file to defined routs for Web API. Web API fold RouteConfig.cs file. I have googled and they say RouteConfig.cs is for MVC routing. It ...
0
votes
1answer
38 views

Updating ip address for custom domain [closed]

I'm looking to transfer the ipaddress for my site from one ip address to another. Reading through the Register.com documentation it says that it may take awhile for the DNS changes to ...
-1
votes
1answer
91 views

Approach to send data updates to subscriber clients C#

We would want to send timely emails to subscribers about updates/changes to the database. What would be an optimum approach to this. Is considering SignalR a good path? Example: Let us say we have a ...
3
votes
1answer
408 views

MVC: Where is the right place to set error messages?

I have a ASP.NET MVC application where in all my Models have an Errors Property used to store non-validation errors which I than display in my Views. Where is the right place to populate the error ...
0
votes
1answer
187 views

Knowing who is the user in every request (every action, every view, every time)

I have many model classes that are mapped from/to tables using EF. Two of them are User and UserCookie, which are stored in tables Users and UserCookies. public class User { public long UserId { ...
0
votes
1answer
51 views

How to update last accessed with Forms Authentication cookie

I've got an MVC 4 site where I'm using Forms Authentication. I'm setting a cookie when a user logs in. The majority of my site does NOT require a user to be logged in though. What I'd like to do, ...
1
vote
2answers
304 views

Is it faster to query using linq-to-entities or a data adapter?

I'm creating an MVC application in VS2012 and I reverse-engineered the models from existing Oracle tables. The tables are part of a MASSIVE database. Besides the main tables that I need to insert, ...
2
votes
1answer
187 views

ASP.NET MVC - Dynamic Views with many similar controls

I have a main View which has several sections and a main dropdown at the top which defines how the rest of the view looks like. All these sections have some data that is visible all the time, and some ...
2
votes
2answers
154 views

Should we always create web application scalable? [closed]

Fact that now a days everyone is moving to cloud due to ease in scalability, configuration and maintenance. But my question is should we develop all web application scalable event if it is not ...
2
votes
2answers
2k views

Should we call Web API from MVC application in same solution?

I am working on a project in MVC that has mobile application so one thing is clear that we have to use Web API so it can used in mobile application. After creating API when we started to develop Web ...
0
votes
0answers
134 views

Save database changes in service layer or controller mvc .net

I have recently been using a service layer to abstract away alot of the business logic of my application. However I've come into an issue where I'm not sure what is best practice on doing the actual ...
0
votes
0answers
40 views

Implement SSO login with or without Membership

I need to implement SSO for four different domains, say abc.com pqr.com sql.com xyz.com Now, I have already login system for two of my applications using Membership. But now requirement is ...
0
votes
0answers
193 views

Architecture or Pattern for handling properties with custom setter/getter?

Current Situation: I'm doing a simple MVC site for keeping journals as a personal project. My concern is I'm trying to keep the interaction between the pages and the classes simplistic. Where I run ...
1
vote
4answers
870 views

MVC4 : How to create model at run time?

In my project I am dynamically creating table by giving table name (ex. student) and adding fields to that table and then save table. Now, my table is created in SQL Server database. Assume table ...
4
votes
1answer
204 views

Use model for “everything” in MVC?

This question is a result out of the discussion HERE and was moved from HERE. Is it really good practice to supply EVERY value you display in any view via a model? Especially variables like the ...
2
votes
2answers
2k views

Domain Model vs View Model

I'm in the early stages of my programming career and I've been working with MVC for just about a year now. I've spent much time learning about the pattern and the concepts behind it, but as the ...
0
votes
1answer
339 views

N-Tier MVC4 Web Application with console application

I've built an MVC web application and I need to run several tasks at different time intervals. So I've also made a console application to schedule these tasks through task manager in windows. For ...
1
vote
1answer
2k views

What exactly is bootstrap admin-template and how it is supposed to be used

So this is my second ASP.NET MVC 4 project. It's decided that for this one we will use this template and it was said in a way that I felt really stupid for not knowing how exactly this template will ...
0
votes
2answers
1k views

How to handle lookup data in a C# ASP.Net MVC4 application?

I am writing an MVC4 application to track documents we have on file for our clients. I'm using code first, and have created models for my objects (Company, Document, etc...). I am now faced with the ...
1
vote
3answers
193 views

How to prevent fat views in MVC?

I'm just curious. If I'm a lead dev in a company of a dozens of developers is there any way I can prevent a newbie developer from creating a fat view? By fat view I mean to have an empty controller, ...
1
vote
7answers
2k views

Hiding query strings logically?

I feel uncomfortable when using query string parameters as: http://xyz.com/default.aspx?carId=1129&country=uk&uniqueId=98745DVF4563VVf1259 I would rather use something that should not make ...
5
votes
3answers
2k views

Utility Classes in MVC - ASP.NET

So I was wondering today, where would you put utility classes in an ASP.NET MVC app? By utility classes I mean classes that can be static and are just used to perform a function. Like a class to send ...
0
votes
1answer
357 views

bad practice to have actions in web api controllers

I was creating a new action for a WebApi controller and tried to create a url using the following: @Url.RouteUrl("DefaultApi", new { httproute = "", controller = "ClientApi"}) and noticed that the ...
3
votes
1answer
181 views

Are areas a good organizational feature, or just extra work?

Do Areas in ASP.NET MVC end up being a help or just a drag in the end (because of the URL construction)? Would it be better to have subdirectories inside the main Controllers folder? or are there any ...
2
votes
1answer
159 views

when is it necessary or when should a controller be async

When is it absolutely necessary for a controller to be async? Should all controllers be async or is it bad practice to make all of them async unless it is necessary. Just looking for some general ...
1
vote
1answer
421 views

necessary to migrate to Web API from MVC controller

Since the released of Web API, I've been wondering whether it's necessary or helpful to migrate/change MVC controllers to use Web API calls. Since it's hard to describe code I'll show an example of ...
3
votes
0answers
188 views

Junior software developer - How to understand web applications in depth? [duplicate]

I am currently a junior developer in web applications and specifically in ASP.NET MVC technology. My problem is that the C# senior developer in the company has no experience with this technology and I ...
0
votes
2answers
264 views

In OnionArchitecture can UI talks directly to datastore or not?

I'm fan of onion architecture but looking for some relaxing solutions in some areas. First of all I was thinking about communicating directly from UI (from controller in mvc) to data on the read ...
4
votes
1answer
509 views

Controlling cookies with many tabs

I have a peculiar problem. My application has different levels of authentication. One specific level of user (super user) needs to be able to use the application as another user (subordinate user) ...
1
vote
1answer
1k views

Design pattern for maintaining different state(s) across browser tabs in a single session

I have an MVC 4 based web app. Where I provide 2 login types, 1. Employee and 2. Customer. With Customer login, I present a dashboard and other stuff, about his orders, etc. With Employee login, I ...
6
votes
1answer
2k views

Is Code First with Migrations or SQL Server Data Tools a better fit?

I have been given a spec to create a new MVC4 website, it will not be too large a project at first but I suspect it will grow as the business gets new ideas for it. Using .NET 4.5 ASP.NET MVC4 and EF ...
1
vote
1answer
1k views

Why should I use Iesi.Collections instead of the traditional System.Collection?

Was research on how (for convetion) define a Many Many where table where both fields are primary key and found this post. So decide to install the Iesi.Collections in my library domain. But there ...
1
vote
2answers
318 views

Multiple orders in a single list

I have a problem with a ranking system I am using. Scenario: An online game with around 10k players calculates a real time ranking of points when a certain event occurs. Events don't occur that ...
-1
votes
1answer
911 views

Issue deploying Asp.Net MVC 4 website to Azure [closed]

How do you deploy your website in Azure so that it looks exactly like when you run it in your localhost? This is a very simple website that I created following the ASP.NET MVC4 tutorials. However, I ...
6
votes
3answers
2k views

Versioning an API

I'm starting a side project, the first stage will be a building a web application with MVC, in later stages we will be adding clients for mobile platforms. My thought was to create one API that all of ...
2
votes
2answers
805 views

MVC : Does Code to save data in cache or session belongs in controller?

I'm a bit confused if saving the information to session code below, belongs in the controller action as shown below or should it be part of my Model? I would add that I have other controller methods ...
1
vote
3answers
361 views

MVC4 Service > Controller Models

I'm working on a MVC4 N-tier application and have a quick question about Service to Controller relation and using Domain/ViewModel. public ActionResult Details(int id = 0) { ...
1
vote
1answer
608 views

Incorporating web designer's HTML pages into an MVC4 application

We are embarking on a new project which will be using the ASP .NET MVC4 platform. I have been informed that the design is being outsourced to a custom design firm and they will be supplying us with ...
1
vote
2answers
2k views

ASP.NET MVC 4 with Entity Framework 5 and SimpleMembership integrated into Repository and Unit Of Work pattern

I have a ASP.NET MVC4 project in which I would like to use the SimpleMembership. The application has a Person table that holds relevant information about users in the system. I would like a link ...
0
votes
1answer
462 views

Implementing a Service Layer with MVC4 while honoring Single Responsibility

I'm trying to learn some best practices while I ramp up on MVC4. I have a solution with three projects: Web: MVC stuff Core: Data Model Tests: Testing classes I'm now trying to add: Services: ...
-3
votes
2answers
316 views

What approaches should be considered for user experience in asp.net mvc 4? [closed]

I'm a new ASP.NET MVC programmer. I've done asp.net webforms extensively and I used the Ajax Control Toolkit and update panels to provide a smoother user experience. What paradigms should I be ...
1
vote
1answer
1k views

project layout using webapi

I have the following project structure I would like to implement. I would like to know if there are any pitfalls to structuring my code this way. It is going to be using Microsoft's WebAPI, an MVC 4 ...
12
votes
4answers
22k views

What exactly is “Web API” in ASP.Net MVC4?

I know what a Web API is. I've written API's in multiple languages (including in MVC3). I'm also well practiced in ASP.Net. I just discovered that MVC4 has "Web API" and without going through the ...
11
votes
3answers
8k views

WCF Data Services (OData) Vs ASP.NET Web API? Hypermedia?

I'm desiging a distributed application that will consist of REST services and a variety of clients (Silverlight, iOS, Windows Phone 7, etc). I was ready to decide that I would implement my REST ...