I'm trying to add some security to my ASP.NET 1.0 MVC app (VB), but I can't get it to work. At the top of my controller, I've got:
<HandleError()> _
Public Class HomeController
I'm overriding OnActionExecuting and throwing a SecurityException if the user is not in the proper role.
Everything I've read states that this should by defau...
Simple question: If I've got a generic Error.aspx page in my Shared folder (and the requisite HandleError on my controller). How do I show the exception message that triggered it?
This Scott Gu post states that the functionality should be in the default Error.aspx generated with new projects, but that was Preview 4, and I'm assuming tha...
Hello,
I am looking to develop a website for a news channel.
So, Obviously its gonna receive a lot of hits daily and will be updated a lot on daily basis..
I have experience in ASP.Net and SQL Server..
These are the technologies i am considering to work with. Please help me choose the right method considering the amount of load it w...
We have been having this issue pop up sporadically, but now I can reproduce it every time. I am incrementing a view counter on my custom built forums, which causes an error:
NHibernate.LazyInitializationException: failed to lazily initialize a collection, no session or session was closed
This error occurs on another collection in ...
I have 3 arrays coming from a webservice...
Countries : Consists of Key - Value
Regions : Consists of Id - Name - CountryCode(fk: countries)
Areas : Consists of Id - Name - CountryCode - RegionID(fk: regions)
(the fk is just showing that its the bit of information, foreign key, associating it to the previous array)
I'm stuck on...
ok. simple one that is wrapping my brain
I have a method that I have in the controller
public ActionResult Details(string strFirstName, string strLastName)
{
return View(repository.getListByFirstNameSurname(strFirstName, strLastName)
}
How do i get multiple parameters from the URL to the controller?
I dont want to use the Q...
Hello,
I have a screen that pops up on load with a print dialog using javascript.
I've just started using WatiN to test my application. This screen is the last step of the test.
What happens is sometimes WatiN closes IE before the dialog appears, sometimes it doesn't and the window hangs around. I have ie.Close() in the test TearDow...
I can't get access to the DataContractJsonSerializer method from System.Runtime.Serialization.Json
If I do:
using System.Runtime.Serialization.Json;
I get an error...
How can I access this in my Asp.Net Mvc app so I can use the DataContractJsonSerializer method
...
Why in the world does the line:
<%= Html.CheckBox("ForSale", Model.Product.ForSale)%> For Sale
result in the following HTML:
<input id="ForSale" name="ForSale" type="checkbox" value="true" />
<input name="ForSale" type="hidden" value="false" />
For Sale
Now whenever I check the box and access Request.Form["ForSale"], I get the ridi...
Came across this article, link text, and reading through, the article had a screen shot of something that I want to provide on my site. This is what I want,
Is jqGrid the best way to go? All I want is that search parameter interface. The search result I want to display in a tabbed window, which I will work on next.
...
Hello,
I'm making an ASP.NET MVC website and I have a certain group of forms that are related (let's called them Foo). My first attempt to organized them was to have this structure:
Controllers/FooController.cs
...and to have routes like this:
Foo/{type}/{action}/{id}
Unfortunately, since there are about 8 Foo sub-types, the FooC...
What the hell does this mean? Ignore the return, and the get, The results will be flattened and stuck in the application mem (so this will be a set... probably)
"Could not find an implementation of the query pattern for source type 'System.Linq.IQueryable'. 'Join' not found. Consider explicitly specifying the type of the range variable...
I have a problem with validation messages not showing after a redirect, even when Im using MVCConrib's ModelStateToTempData. Am I overlooking something fundamental?
[ModelStateToTempData]
public class AccountController : BaseController
{
public ActionResult LogOn(string email, string password, string returnUrl)
{
if (!Va...
I am creating my own custom T4 Template that integrates with an ADO.NET Entity Framework Model (.edmx file) included in my MVC Web Application.
For Reference
Please take a brief look at the following two URLs.
Scott Hanselman - "T4 Code Generation Visual Studio Best Kept Secret"
Visual Web Developer Team Blog - Quick Start Guide for ...
I am trying to pass Eval to Html.RenderPartial inside ASP.NET Repeater but it does not work can any one help?
<asp:Repeater runat="server">
<ItemTemplate>
<% Html.RenderPartial("UserControl1",Eval("Title")); %>
</ItemTemplate>
</asp:Repeater>
by the way I know that I can do it in other ways but ...
I have a controller action that checks
this.User.Identity.IsAuthenticated
What do you suggest how to tackle unit test on such an action?
...
How should one split up the controllers in an ASP.NET MVC site? For example, the default project has a HomeController and an AccountController. Should there be one controller for each section of the site, or something else?
I'm learning how to use the MVC framework, and any help would be appreciated.
...
Is there any wiki module for asp.net mvc or soemthign that can be adapted with relative ease :)
alternatively, are there any formatters for the wiki markup which perhaps implment the most common wiki markup formatting etc.
...
What is the best way to protect certain areas of your web application in asp .net mvc. I know we can put [Authorization] attribute at each action, but this seems very tedious since you have to put it all over the place. I'm using membership provider and trying the way I used to do in postback model by setting this protection based on the...
I have a client who has a product-based website with hundreds of static product pages that are generated by Microsoft Access reports and pushed up to the ISP via FTP (it is an old design). We are thinking about getting a little more sophisticated and creating a data-driven website, probably using ASP.NET MVC.
Here's my question. Since...