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
2answers
76 views

How can I show and hide a single field across my web application through a checked value?

Let's say I have a field called "FooName" and I have "FooName" in several places across my web application (ASP.NET MVC4). I have a check box that allows me to turn "FooName" on and off across the ...
0
votes
3answers
232 views

How can I reinforce that security questions answers should not be the same and how to encrypt?

When my users are creating an account they need to fill and set several security questions pertaining to their account. I am wondering, how can I make sure that the answer the user enters for each ...
1
vote
0answers
103 views

Top Menu bar driving a sidebar sub menu

I have an application written is C# ASP.NET MVC 4 with Razor views. I am a bit stuck on my menu structure. As per the image above, one can see that there is a Top Menu and a Side Menu. The ...
0
votes
0answers
267 views

Sharing authorization logic between ASP.NET MVC 4 and WebAPI 2 projects

Pretty similar to this question here the current application that we are working on has a separate MVC 4 and WebApi 2 projects, where the MVC project is processing the user request to the WebApi which ...
0
votes
1answer
124 views

Where is asp mvc model data stored?

I am using ViewModel classes in order to structure data being populated inside of a controller. My questions is now where exactly is data of a @model stored after being populated via asp mvc ...
2
votes
1answer
143 views

Proper use of model in asp mvc

What is a proper use of model in asp mvc? Should a model contain only data that will be accessed inside a form, or it is also a good idea to put data that are static and would be used in a view, but ...
0
votes
1answer
171 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
144 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
767 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
61 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
2answers
298 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
1k 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
42 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
157 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
525 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
339 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
137 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
686 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
404 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
172 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 ...
6
votes
2answers
7k 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 ...
1
vote
0answers
60 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 ...
2
votes
4answers
2k 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 ...
5
votes
2answers
339 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
3k 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
430 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
3k 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
214 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
8answers
4k 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 ...
6
votes
3answers
4k 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
528 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
186 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
323 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
568 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
199 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
367 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
847 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) ...
2
votes
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 ...
2
votes
1answer
2k 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
431 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
1k 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
1k 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
377 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
851 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
510 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
351 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 ...