-1
votes
0answers
70 views

How to identify hackers based on ip addresses and the pages that were accessed [migrated]

I saw some suspicious errors being generated on my site based on pages that were requested. My error is logging the path that the user is trying to access. Because of these errors (and the paths that ...
8
votes
2answers
486 views

Why is there no WSDL type support for Web Api?

So I am just getting started with .Net WebApi and one thing that I am noticing straight away is that there is no Contract defining how the Api looks and should be consumed (Request/Responses from each ...
0
votes
0answers
73 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) { } ...
2
votes
2answers
123 views

Wrapping constructor arguments

Given a base class with around 25 or so subclasses, I have found that adding an argument to the base constructor is painful. protected AbstractController(Service1 s1, Service2 s2, Service3 s3){ ... } ...
4
votes
5answers
2k views

Is this a good practice or not?

I have a colleague who has come up with a way of 'genericizing' information from a database so that all his web application's drop-down lists can share the same object in his MVC.NET C# code and ...
1
vote
4answers
546 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 ...
2
votes
2answers
204 views

As a .NET WPF developer what are key differences I should be aware of when working with ASP.NET MVC? [closed]

I'm a fairly experienced desktop .NET developer with a solid feel for MVVM and WPF, and I've worked with JavaScript, jQuery and HTML/CSS in the past - though I'm pretty dated and haven't had a ton of ...
1
vote
1answer
744 views

Most Appropriate Authentication Type for MVC5 project

I am about to start a new ASP.NET MVC5 project and I am planning the authentication / authorization requirements at present. The client wants Windows authentication, to prevent their users having to ...
2
votes
1answer
128 views

how to process document state transition?

Imagine there is an application (ASP.NET MVC) that processes some documents. The document must be revised several times by different group of users. state/role rules: simple user can only publish ...
3
votes
1answer
69 views

Where should CMS data logic go

We have a large web site written in WebForms and have begun implementing some new modules in MVC. We have a custom CMS in place. I put the data structure to hold CMS data in a BaseModel class. Now I`m ...
0
votes
1answer
340 views

Migrating old Asp.net 1.1 project to mvc 3 or 4

we have to migrate a very old project that are having more than 500 web forms and 400 tables and it is hugely depends on stored procedures, the current specification is: Asp.Net : .NET version 1.1 ...
3
votes
2answers
334 views

Help With Dependency Injection

I am still very confused as to why and when to use Dependency Injection. If anyone could explain maybe using the below example that would be great, any other explanations would be appreciated. Lets ...
0
votes
0answers
220 views

What are the shortcomings of using AuthorizeAttribute in this way in MVC?

I have ASP.Net MVC project code with custom authorization as below: public class UpdateAccrualAuthorize : AuthorizeAttribute { public override void OnAuthorization(AuthorizationContext ...
1
vote
1answer
282 views

ASP.NET MVC SoC when dealing with back end objects (design decision)

I had a discussion with some peers and even some technical leads in the team around this and Im all for the purist MVC approach. Especially when the project is in its infant stages (its easy to ...
2
votes
2answers
4k views

In ASP.NET MVC/Razor, how to add initializer JavaScript to a “control”?

Actually, I already have at least 3 different solutions for the problem, I just don't like any of them for various reasons. In ASP.NET MVC/Razor, there are no controls anymore, in the sense as they ...
0
votes
0answers
96 views

Web Farm access to pool of resources

I am learning how to structure an application using a web farm (for high availability rather than load). I have a pool of resources in which one user can access one element in the resource pool at any ...
2
votes
4answers
968 views

DTOs matter on ASP.NET MVC JSON Action?

I recently came across an internal project where they were using DTOs throughout the solution, and when I sat down to implement a new MVC controller with a JSON REST endpoint I decided to use an ...
1
vote
1answer
478 views

Entity framework and Eager loading and enterprise application with DDD aproach

We are trying to create an ASP.NET MVC 4 application using entity framework with domain driven development style pattern approach. As you can see in our part of domain layer, we have a complex design. ...
5
votes
2answers
2k views

MVC + 3 tier; where ViewModels come into play?

I'm designing a 3-tiered application using ASP.NET MVC 4. I used the following resources as a reference. CodeProject: MVC + N-tier + Entity Framework Separating data access in ASP.NET MVC I have ...
0
votes
2answers
296 views

ASP.NET MVC create a draft without persisting to DB

I have a requirement to allow users to suggest updates to their profiles on a site I'm working. They would be able to view their profile details, then click on and "edit" button, which would basically ...
4
votes
2answers
693 views

Update strategy for a software framework once it has been deployed

I need to update a software framework once it has been deployed. The framework we are creating is made up of .NET 4.0 libraries (in Visual Studio). This common set of code libraries will be ...
7
votes
1answer
1k views

call a function and never wait for it in C#

I have a controller in my mvc4 web application in which there is an action that needs to call another function. What happens in that function i.e. the return value is not important for my action. How ...
0
votes
1answer
335 views

Provide multiple SendCompleted callbacks to SmtpClient

I have an Email class that has a Send method that optionally takes an SmtpClient and sends an email asynchronously using SendAsync. If no SmtpClient is supplied to this method, it instantiates a ...
0
votes
1answer
337 views

View is calling constructor method in the Model instead of passing model to the controller method

The problem is the UserTypes property (used to populate a drop down list in the AddUser view) is not being retained after POSTback of the form. Here is my AddUserModel: (which inherits from ...
1
vote
2answers
2k views

Anemic Domain Model vs. DDD by definition example(s)?

What is an example of "Business Logic" that should reside in the DomainModel i.e. inside an Entity instead of inside a (Domain) Service, as well as some example logic that should be in a service. ...
2
votes
1answer
810 views

DDD/SOA in (.NET) MVC and Message pattern(s) / Request Response

We're currently considering whether it makes sense (or if the benefits are worth the added code) to introduce a Message based pattern (such as Request Response) into a Domain Driven Design / Service ...
9
votes
4answers
820 views

In Unit Testing, why would I create a Repository twice?

The other day I was reading a little about Unit Testing and I saw some examples where people create a repository interface (i.e. IExampleRepository) and then create the real repository (public class ...
14
votes
3answers
3k views

Is there any real value in unit testing a controller in ASP.NET MVC?

I hope this question gives some interesting answers because it's one that's bugged me for a while. Is there any real value in unit testing a controller in ASP.NET MVC? What I mean by that is, most ...
36
votes
1answer
3k views

Why does the .Net world seem to embrace magic strings instead of staticly typed alternatives?

So, I work in .Net. I make open source projects in .Net. One of my biggest problems with it isn't necessariyl with .Net, but with the community and frameworks around it. It seems everywhere that ...
4
votes
4answers
4k views

What does this mean: Expression<Func<TModel, TValue>>

In ASP.Net MVC, in the razor view, you can type this kind of code: @Html.EditorFor(model => model.Name) (in this case, it creates a textbox for the field Name of the object which is defined as ...
2
votes
1answer
194 views

Is passing the Model around in this way considered bad practice?

If I have a view called, for example, ViewDetails that displays user information in labels and has a Model called ViewDetailsModel and if I want to allow the user to click a button to edit some of ...
2
votes
1answer
1k views

.Net C# Remote Method Invocation (RMI) (Client/Server communication)

What exactly is C# version of Java RMI? I want to invoke the methods of client from the server, ping the client from server etc. How the server and client communication is done with c#?
7
votes
4answers
733 views

Unit testing and Test Driven Development questions

I'm working on an ASP.NET MVC website which performs relatively complex calculations as one of its functions. This functionality was developed some time ago (before I started working on the ...
1
vote
1answer
456 views

Webservice Return Generic Result Type or Purposed Result Type

I'm building a webservice which returns JSON / XML / SOAP at the moment.. and I'm not entirely sure which approach for returning results is best. The Client Consuming the Services will generally be ...
2
votes
2answers
544 views

Is this the correct way to implement .NET MVC website structure?

I have recently seen a .NET MVC solution in which the markup in the .aspx views which appear to have a Controller as their model i.e the controller seems to be providing the data for the view, and the ...
0
votes
1answer
953 views

Database Driven Web Application, C# Front-End and F# Back-End meaning

Hi I am an intern working with ASP.NET. My current task is to make a website which will incorporate some jquery viewing features. This project seems to me will be primarily dealing with reading data ...
1
vote
1answer
789 views

Flash messages in ASP.NET MVC without sessions

I'm developing a web application for Windows Azure using ASP.NET MVC 4. I would like to enforce one restriction in the architecture: do not use Session. To achieve availability on Azure, and since ...
1
vote
2answers
1k views

What programming language would be the best fit for small browser games? [closed]

I want to make small web apps containing little games (multi-user dungeons, tower defense games, and roguelikes) or talent calculators for MMOs etc. After some research I have had people say that ...
14
votes
2answers
9k views

Separating data access in ASP.NET MVC

I want to make sure I'm following industry standards and best practices with my first real crack at MVC. In this case, it's ASP.NET MVC, using C#. I will be using Entity Framework 4.1 for my model, ...
27
votes
14answers
2k views

Newbie seeking advice on programming in general [closed]

need some of you to remember back to a time when you might have been bad at programming... Been at my new job (as a software developer) for a couple of months now, passed probation period. Have very ...
3
votes
2answers
1k views

ASP.Net MVC ambigious action methods - why the path choosen

Is there someone who could shed a light on why ambiguous methods are not allowed in ASP.Net MVC?I updated my question just to clarify it (using Carson63000 example from his answer), the question ...
7
votes
6answers
4k views

Is Razor or XSLT better for my project? [closed]

I'm in the early stages in the design of a system that will essentially be split into two parts. One part is a service and the other is an interface with the service providing data through something ...
2
votes
3answers
969 views

Class Design and Separation Of Concerns

I'm working on an MVC application and am wondering about the best way to design one of my models. I have a class called RightLeftPersonToggle which represents two select list boxes on the page. The ...
11
votes
4answers
868 views

Is it a “pattern smell” to put getters like “FullName” or “FormattedPhoneNumber” in your model?

I'm working on an ASP.NET MVC app, and I've been getting into the habit of putting what seem like helpful and convenient getters into my model/entity classes. For example: public class Member { ...
11
votes
3answers
1k views

Question on design of current pagination implementations

I have checked pagination implementations on asp.net mvc specifically and i really feel that there is something less efficient in implementations. First of all all implementations use pagination ...
8
votes
5answers
538 views

What is the standard for modeling modern applications prior to development?

I'm taking on my first enterprise-level application and I want my team to model the entire ASP.NET MVC C# application before we even tap out one line of code. UPDATE: This was not intended to be a ...
5
votes
1answer
2k views

What would your DB Schema look like if you are building a Reddit/Digg-like site? [closed]

Just found out something rather interesting about Reddit's database schema: The way we’ve changed is we use an “open schema”. Sometimes it’s called “entity attribute value”. It’s basically ...
9
votes
4answers
1k views

Should I be a professional in C# programming in order to build good web applications using ASP.NET?

I do not know if there is special programming in C# for the web or it is the same?. If it is the same then what are the topics that I should focus on in C# in order to use it building web application ...
3
votes
1answer
265 views

Merging functionality from two controllers; should I place all actions in one controller?

Say I have 2 controllers, OrderController and StatusController. OrderController has several CRUD actions for Orders and StatusController has several actions pertinent to changing the satus of Orders ...
11
votes
4answers
970 views

How far to go with unit tests

A question asked many times before but with a specific slant twds mvc development. I've been a very good boy and have been coding all my controller actions with corresponding unit tests which has ...