Im looking to handle authorization in an MVC app through the use of a Windsor IInterceptor - because this seems like the only way I can get named access to parameters the action is passed which are relevant for determining if the user has access.
From my Intercept method I need access to the action that is called.
I figured out how to ...
I'm currently using log4net in my ASP.NET MVC application to log exceptions. The way I'm doing this is by having all my controllers inherit from a BaseController class. In the BaseController's OnActionExecuting event, I log any exceptions that may have occurred:
protected override void OnActionExecuted(ActionExecutedContext filterCont...
I have a web hosting that replied to me it was not possible to alter the IIS6 settings to set the mapping of .mvc to the Asp.Net ISAPI dll, nor enable Wildcard Application Mappings.
In short, I cannot change any IIS setting.
Is there any way to run ASP.NET Mvc in that conditions?
Note: I read a few related questions here about this, b...
We are about to embark on a large enterprise application. I am seriously considering using ASP.NET MVC because:
We need to use Microsoft technology (biz logic is all C#)
Performance is critical
I'd like to test as much as possible
My team has only used PHP for web development, but are very experienced with .NET winforms (so either w...
Hello , Got some problem with settings up the Authorization.
First i got :
<authorization>
<deny users="?" />
</authorization>
So i deny all unknown users and then allow them to view those pages:
<location path="Default.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</locat...
I have a legacy (haha) ASP.Net Webforms Web Site Project in Visual Studio 2008 SP1, that I would like to gradually introduce some MVC functionality into.
Most of the information I can locate on how to integrate ASP.Net MVC with WebForms seems to assume the use of a Web Application Project. However, it seems impossible to find informati...
I create a class to hold view data for two different types from my model.
class FooBarViewData
{
public List<Foo> Foos { get; set; }
public List<Bar> Bars { get; set; }
}
I typed my view to a FooBarViewData but it fails to find the type.
<%@ Page Title=""
Language="C#"
MasterPageFile="~/Views/Shared/Site.Master"
...
I am dynamically generating a table to present some tabular data. Normally I would not go near tables, but for this kind of data it is appropriate.
I am noticing my view code is becoming very spaghetti like. Assigning classes on cells and rows in the body of loops is starting to look just awful (bad flashbacks to my asp 3.0 days).
...
Hello,
I'm trying to build a custom control in ASP.NET MVC. The thing that I want to avoid is mixing the view (html) and the code (C#) in these controls.
After hours of googling and struggling with this problem I've finally thought of creating helper methods that use the ASP view Engine thought the ViewPage class.
I'm able to create a...
how many methods for adding style sheets in a page using Asp.net MVC
...
How do I get the collection of errors in a view?
I don't want to use the Html Helper Validation Summary or Validation Message. Instead I want to check for errors and if any display them in specific format. Also on the input controls I want to check for a specific property error and add a class to the input.
P.S. I'm using the Spark Vi...
Hi,
Does anyone have any suggestions/ best practices for doing master/ detail pages using the ASP.NET MVC Framework?
Background
I've got a page of Client information, under each one I need to display 0 or more related records about that client.
The database schema looks something like this:
Clients -- one to many --> Client...
I'm looking at using ASP.Net MVC as a platform for a REST based Service. I know WCF has built in support for REST services; however, I'm looking at returning multiple types of data depending on the request.
I would like the client to request the content type. So if they send text/html for example I would render my model into Html, if t...
So I've recd. a requirement to create an API to access our application. Not all controller actions are covered by the API (maybe 50%).
I figure I can either use the same project, check the http headers for each request and respond with either xml, JSON or html as required (much like rails).
OR
Create a new ASP.NET MVC application, d...
I am sorry for possible misleading about the title, but I have no idea for a proper title.
Feel free to edit.
Anyway, I am using ASP.NET Web Forms, and maybe this isn't how web forms is intended to be used, but I like to construct and populate HTML elements manually. It gives me more control.
I don't use DataBinding and that kind of s...
I am using the JQuery.Sortable() function to create a reorderable list of items like so
<script type="text/javascript">
// When the document is ready set up our sortable with it's inherant function(s)
$(document).ready(function() {
$("#goal-list").sortable({
handle: '.handle',
placeholder: 'ui-st...
I'm getting a "An item with the same key has already been added" when using the ModelStateToTempData filter from MvcContrib. I'm trying to figure out what the duplicate key is but can't figure out how to inspect the model state at the point that the filter is adding the keys. Is there any way to do so without hooking up to the MvcContrib...
I am torn between the idea of using Html.RenderAction vs. Html.RenderPartial for partial views. Using RenderPartial means manipulating and passing ViewModel, something I feel is cumbersome. RenderAction is neat and concise in this case but not included for RC1 (included with futures though).
Why is it so? Any specific reason?
...
I'm using ASP.NET MVC RC1 and trying to bind a textbox to an object property like so:
<%= Html.TextBox("Comments.Contacts[0].ContactName") %>
It seems like it should work, since this does:
<%= ((MuralProject)ViewData.Model).Comments.Contacts[0].ContactName %>
But alas, the result in the textbox is an empty string. Am I doing someth...
Is the Content folder special to the underlying framework of MVC? I can't find any reference to it in routing code or configuration.
I'm just wondering if static content can be handled in different ways.
On a related note, stackoverflow's script and css content seems to be retrieved by version number in the querystring:
<link href="/...