asp.net-mvc

asp.net MVC, how to work with HTTPApplication class

How do I go about gathering site statistics in MVC? (users online.. etc?) ...

add item to application from controller in asp.net mvc

from my controller I want to assign a value to an application variable much like I would a session variable. I assumed I could just use: Application("MyValue") = "test" ...

ASP MVC server requirements - Is Server 2008 very desirable?

I read in a few places that MVC requires Windows Server 2008 for full support. Can the same be achieved on a Vista Ultimate dev machine or will some things be missing? If you have worked with MVC, have you had trouble finding relatively inexpensive hosting for Windows Server 2008? Though hosting is not as big a concern for me right (I k...

Binding action parameters to request cookies in ASP.NET MVC - what happened?

In several early previews of ASP.NET MVC, arguments to controller methods would be resolved by inspecting the query string, then the form, then the cookies and server variables collections, as documented in this post from Stephen Walther. For example, this code used to work: public class MyController : Controller { // This should ...

Do you have links to any tutorials on setting up MVC on Amazon EC2?

Please share links to tutorials on how to set up and run ASP.NET MVC on an Amazon EC2 virtual machine. I know that it's possible, but I'd like to follow behind someone else that's already set it up and has it running. It'd be great to know of a EC2 bundle that already has everything set up as well. ...

ASP.NET MVC AJAX with jQuery

I have a site where each user's page shows comments and allows other user's to add comments. I want to have it so the add comments form is on the page and when a user adds a comment, it is added to the database and shows up in the comment section with AJAX. I am using jQuery for the AJAX and LINQ to SQL to handle the database logic. How ...

Need help approving a user with encryption url.

I'm working on a piece of a web application in ASP.Net MVC where the user registers for membership using an sql membership provider. When they register they are put in the system but not approved. The code then sends an approval email to the user with the email given. BfEncrypt refid = new BfEncrypt(); refid.Encrypt(user.ReferenceID);...

Using VS 2008 Web Deployment Projects with ASP.NET MVC

Has anyone got a Web Deployment Project to work with ASP.NET MVC? When I open the "deployed" project, a lot of the files are missing that MVC requires and makes it tough to Publish to the server with all the missing files in the project. Or... Is there a better way than a Web Deployment Project to modify the Web.Config for MVC apps? I ...

Deploying an ASP.NET MVC app to IIS7 and keeping a clean web.config

I'd like to deploy my ASP.NET MVC application to a web hosting company (like DiscountASP.net). I'm confused about what needs to be in the web.config file on the web server. When I create the project locally, I get a bloated web.config with all sorts of additional modules, handlers, compilers. Do I need to add all these items to the pr...

MVC ActionLink generating different types of links... why?

I'm new to MVC land, and have an app that i'm working on. i have 2 different links with 2 routes in my global which are fairly similiar route 1 routes.MapRoute("Category", "Movies/{category}/{subcategory}", new { controller = "Catalog", action = "Index", category = "", subcategory = "" }); route 2 routes.MapRoute("Movie", "Mov...

HOW? Controller return nothing/current view

SHORT: How do I make a controller return the current view or just simply do nothing? LONG: I have a partial view where i've created an imageslider. It contains a link which sends a request to a controller to get the next image (using ajax). The controller fetches the next image, stores it in ViewData and sends back a partial view (the o...

How do I set the request timeout for one controller action in an asp.net mvc application

I want to increase the request timeout for a specific controller action in my application. I know I can do it in the web.config for the entire application, but I'd rather change it on just this one action. Web.config example: <system.web> <httpRuntime executionTimeout="1000" /> </system.web> How do I do it? Thanks, Kyle ...

Injecting a dependency into a custom ModelBinder

Hey all I have an ASP.net MVC project in the works at the moment, and I'm wondering if the following could be possible: I have a custom ModelBinder class that has a reference to a service (essentially a fetcher) as a dependency. I want the dependency to be injected using an IoC container (currently Ninject) but there seems to be nowhere...

What are the minimum security permissions for a website in ASP.NET?

Can someone guide me to a reference for the minumum security permissions on each webfolder in an IIS7 website? For Users, Admin, System, Network Service? I have Network Service as a DB Owner on SQL as well, is this necessary or should I restrict access from it? EDIT: MVC FOLDERS SPECIFICALLY ...

SQL Server Database item in VS08 without SQL Server Express.

Hi. I've encountered this problem (while trying to add SQL Server Database (.mdf) file to my asp.net mvc project): Connections to SQL Server files (.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL: http://go.microsoft.com/fwlink/?LinkId=49251* I have ...

How to do a ASP.NET MVC Ajax form post with multipart/form-data ?

I am working on a ASP.NET MVC web site which has a form that allows for the upload of files using the multipart/form data enctype option on the form tag like so <form enctype="multipart/form-data" method="post" action='<%= Url.Action("Post","Entries",new {id=ViewData.Model.MemberDetermination.DeterminationMemberID}) %>'> How would I ...

How do I set a value for the default option with Html.DropDownList

Hi, I'm using ASP MVC RC1. A form I'm using contains a dropdownlist which I have put in a view with this code. <%= Html.DropDownList("areaid", (SelectList)ViewData["AreaId"], "Select Area Id")%> However, when rendered, this is what I get <select id="areaid" name="areaid"> <option value="">Select Area Id</option> <option value=...

Getting Started with ASP.NET MVC

Can anyone recommend any documentation, article, or blog to get started with ASP.NET MVC? ...

Preventing ASP.NET MVC from Replacing period with underscore in Html Helper IDs

Having just upgraded to the latest ASP.NET MVC Release Candidate I noticed that, when using Html Helpers, any name with a period "." in it will have this replaced by an underscore "_" when the element's ID is output. I believe this is to aid in using JQuery and the use of the period is to aid in the use of ModelBinders. This has broken ...

ASP.NET MVC jQuery migration from 1.2.6 to 1.3.2

Hi! I have a problem with jQuery migration from 1.2.6 to 1.3.2 in my project. The intellisense for jQuery in VS doesn't work. To test this issue I created new project, added jQuery to master page, built solution and checked intellisense - works OK. After this I deleted in solution this files: jquery-1.2.6.js jquery-1.2.6.min.js jque...