Our team is currently working on a large project which makes heavy use of foreign key tables as they are used on our TeamMember Management Webapp.
Basically, one TeamMember can be in a Team, in an Area and a TeamArea (the latter for editing and rights management).
My main goal is focused on retrieving the data for showing these FK Fiel...
Hi,
I'm trying to implement the repository pattern using a generic repository like the one found here: Implementing Repository Pattern With Entity Framework
I've created a test suite (I'm using NUnit) to test the repository but I've been having issues. Here's the error I'm getting:
MyBusiness.Test.Domain.RepositoryTest.SelectCol:
...
The authorize filter allows you to specified group of users that can access a controller or action:
[Authorize(Roles="Administrator")]
public class HomeController : Controller
{
// code
}
I would like to know if it is possible to, instead, specify a group of users that cannot access a controller or action.
...
I'm currently using Ninject2 to bind the various services and repositories in my MVC app. That part seems to be working just fine. Now I'd like to also bind my own class to IAuthorizationFilter and all actions that have the attribute set.
I've created a class that inherits from AuthorizationFilter and Implements IAuthorizationFilter.
...
As a simplified example, I have the following data classes:
public class Employee
{
public string FirstName { get; set; }
public string LastName { get; set; }
public Position Position { get; set; }
}
public class Position
{
public string Title { get; set; }
public string Description { get; set; }
public decimal ...
my team is starting a new project on asp.net mvc, and we are wondering what technology for data access to use, how do you think which one is the best, who has the best performance ?
which one is easier to use and to maintain ?
...
How do we add debug/Trace messages using ELMAH in MVC application
...
I'm trying to test a very simple form that uses only a list and a create. This is the controller:
public class PositionsController : Controller
{
private readonly IPositionRepository _positions;
// default constructor
public PositionsController()
{
_positions = new TestPositionRepository();
}
// DI cons...
i am getting this error given below i guess its a max length exceed error when i call a action in a controller using $.post method can you tell me what setting should i put to increase the length
System.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string...
Hello,
I am trying to integrate my ASP.Net MVC site with Facebook Connect.
For some odd reason after the login popup loads and connets, HttpContxt.Current.Requet.Cookies[Session_Key_Cookie_Name] still returns NULL!
What could be the possible reason?
Thanks
P.S
I also noticed that although I've set localhost/xd_receiver in the Site....
I'm wanting to update a record in my database which has two values, one is the ID, and one is the "description". The ID can never be changed, however I'm relying on the use of strongly-typed features to do it. So, I have the following:
Inherits="System.Web.Mvc.ViewPage<Business>"
Which is fine as it allows me to get everything back....
I have an ASP MVC view where have the following statement
#if DEBUG
//section 1
//do stuff
#else
//section 2
//do other stuff
#endif
When in visual studio I choose the release configuration from the dropdown to do the build, the code still steps through section 1.
In the solution configuration properties all subprojects of th...
You've probably solved this before.
I need to be able to use open id in an environment that does not have session stickiness. The servers do preserve the headers.
I'm using ASP.NET MVC and dotNetOpenId version 3.2.0.9177. Although the authentication on the 3rd party web site goes without a hitch when returning the response I get an err...
Hello, I still need your help, and more specifically the implementation of the ExtJS grid.
I can not make it work.
I have a View that makes a search with more parameters, then the controller will have the action research that when loading the page I set the controls of the latter, and then I post the action through which I search. This...
I know to start using areas, you have to establish parent/child relationships. I have a couple areas setup and their controllers are hitting just fine, the problem is some Views are not found. I'm trying to gain an understanding of what's happening to my controllers that are not happening with my Views.
I'm very familiar with MSDN's l...
I need to upload an image as part of a create action in an MVC application.
The image will be stored in the Files server and the db will contain a path to that.
I plan to use the follwing tag to get the file:
> <input type="file" id="MyImage" name="MyImageName" />
How do I access and save this in the controller action?
...
I have an object of type IMAGE which holds image.
I wanted to display the image in MVC view along with other controls.
The way i can think of is to temporary store image on disk and set src of img control.
I am sure there would be better way of doing this.
...
This could be considered a duplicate question, as a similar one has already been asked, but I don't like any of the answers, and security was not addressed.
When deploying an ASP.NET MVC app, what's the right way to create roles and a superuser without risks?
Two ways come to my mind: using Application_Start or a custom action (better ...
Can someone please check out this code, i really dont understand why i got violation of unique when i try to update an record. the code used to create new record work just fine, but when i try to use it to update, it called out violation.
Controller:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Edit(User user)
{
...
I have some experience in ASP.Net and can work my way around it without much trouble, however there are a lot of gaps in my knowledge of asp.net and .net in general.
I know the basics of c# and asp.net so I can accomplish most things. But I don't know anything at all about LINQ, Entity Framework, ADO.NET, delegates, ASP.NET Ajax, ASP.N...