Search Results

Search found 9325 results on 373 pages for 'mvc 2'.

Page 34/373 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Is there a suggested solution structure for ASP.NET MVC Production Apps

    - by Eoin Campbell
    In general, I don't like to keep code (BaseClasses or DataAccess Code) in the App_Code directory of an ASP.NET Site. I'll usually pull this stuff out into a MySite.BusinessLogic & MySite.DataAccess DLL's respectively. I'm wondering should I be doing the same for ASP.NET MVC. Would it be better to Organise the solution something along the lines of MySite.Common - DLL - (Basic Functionality built on .NET System Dlls) MySite.DAL - DLL - (DataAccessLayer & DBML Files) MySite.Models - DLL - (MVC Models e.g. Repository Classes) MySite.Controllers - DLL (MVC Controllers which use Models) MySite - ASP.NET MVC Site. Or am I missing something... presumably, I'll lose some of the nice (Add View, Go To Controller, context menu items that have been added)

    Read the article

  • Does DotNetNuke support ASP.NET MVC?

    - by Alexander
    Hi, I'm going to build a web app. I need some CMS that can be integrated with ASP.NET MVC. The possible solution list is: 1) Oxite 2) MVC CMS 3) AtomSite 4) N2. Sorry for obvious question, but can the DotNetNuke be used with ASP.NET MVC? TIA

    Read the article

  • Asp.net MVC and MOSS 2010 integration

    - by Robert Koritnik
    Just a sidenote: I'm not sure whether I should post this to serverfault as well, because some MOSS admin may have some info for me as well? A bit of explanation first (without Asp.net MVC) Is it possible to integrate the two? Is it possible to write an application that would share at least credential information with MOSS? I have to write a MOSS application that has to do with these technologies: MOSS 2010 Personal client certificates authentication (most probably on USB keys) Active Directory Federation Services Separate SQL DB that would serve application specific data (separate as not being part of MOSS DB) How should it work? Users should authenticate using personal certificates into MOSS 2010 There would be a certain part of MOSS that would be related to my custom application This application should only authorize certain users via AD FS - I guess these users should have a certain security claim attached to them This application should manage users (that have access to this app) with additional (app specific) security claims related to this application (as additional application level authorization rights for individual application parts) This application should use custom SQL 2008 DB heavily with its own data This application should have the possibility to integrate with external systems as well (Exchange for instance to inject calendar entries, ERP systems etc) This application should be able to export its data (from its DB) to files. I don't know if it's possible, but it would be nice if the app could add these files to MOSS and attach authorization info to them so only users with sufficient rights would be able to view/open these files. Why Asp.net MVC then? I'm very well versed in Asp.net MVC (also with the latest version) and I haven't done anything on Sharepoint since version 2003 (which doesn't do me no good or prepare me for the latest version in any way shape or form). This project will most probably be a death march project so I would rather write my application as a UI rich Asp.net MVC application and somehow integrate it into MOSS. But not only via a link, because I would like to at least share credentials, so users wouldn't need to re-login when accessing my app. Using Asp.net MVC I would at least have the possibility to finish on time or be less death marching. Is this at all possible? Questions Is it possible to integrate Asp.net MVC into MOSS as described above? If integration is not possible, would it be possible to create a completely MOSS based application that would work as described? Which parts of MOSS 2010 should I use to accomplish what I need?

    Read the article

  • Hosting Asp.Net MVC Applications

    - by Rishabh Ohri
    I am working on an Asp.Net MVC project. I had a doubt and please someone clarify it fast.. -- Do we need the MVC framework installed in the Hosting server from where the application is installed. I have installed the MVC framework on my developer machine but do we need the framework installed in the hosting server also.

    Read the article

  • Struts or Spring MVC or Struts & Spring?

    - by Shaw
    I need some information to understand design decision: Is Struts a better choice than Spring MVC? I hear about Strus-Spring-Hibernae combo - Is struts used at MVC layer because its a matured framework than when compared to Spring MVC? Any one used this combination for projects or aware of issues?

    Read the article

  • Where is this System.MissingMethodException occurring? How can I tell?

    - by Jeremy Holovacs
    I am a newbie to ASP.NET MVC (v2), and I am trying to use a strongly-typed view tied to a model object that contains two optional multi-select listbox objects. Upon clicking the submit button, these objects may have 0 or more values selected for them. My model class looks like this: using System; using System.Web.Mvc; using System.Collections.Generic; namespace ModelClasses.Messages { public class ComposeMessage { public bool is_html { get; set; } public bool is_urgent { get; set; } public string message_subject { get; set; } public string message_text { get; set; } public string action { get; set; } public MultiSelectList recipients { get; set; } public MultiSelectList recipient_roles { get; set; } public ComposeMessage() { this.is_html = false; this.is_urgent = false; this.recipients = new MultiSelectList(new Dictionary<int, string>(), "Key", "Value"); this.recipient_roles = new MultiSelectList(new Dictionary<int, string>(), "Key", "Value"); } } } My view looks like this: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ModelClasses.Messages.ComposeMessage>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">Compose A Message </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <h2> Compose A New Message:</h2> <br /> <span id="navigation_top"> <%= Html.ActionLink("\\Home", "Index", "Home") %><%= Html.ActionLink("\\Messages", "Home") %></span> <% using (Html.BeginForm()) { %> <fieldset> <legend>Message Headers</legend> <label for="message_subject"> Subject:</label> <%= Html.TextBox("message_subject")%> <%= Html.ValidationMessage("message_subject")%> <label for="selected_recipients"> Recipient Users:</label> <%= Html.ListBox("recipients") %> <%= Html.ValidationMessage("selected_recipients")%> <label for="selected_recipient_roles"> Recipient Roles:</label> <%= Html.ListBox("recipient_roles") %> <%= Html.ValidationMessage("selected_recipient_roles")%> <label for="is_urgent"> Urgent?</label> <%= Html.CheckBox("is_urgent") %> <%= Html.ValidationMessage("is_urgent")%> </fieldset> <fieldset> <legend>Message Text</legend> <%= Html.TextArea("message_text") %> <%= Html.ValidationMessage("message_text")%> </fieldset> <input type="reset" name="reset" id="reset" value="Reset" /> <input type="submit" name="action" id="send_message" value="Send" /> <% } %> <span id="navigation_bottom"> <%= Html.ActionLink("\\Home", "Index", "Home") %><%= Html.ActionLink("\\Messages", "Home") %></span> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="Scripts" runat="server"> </asp:Content> I have a parameterless ActionResult in my MessagesController like this: [Authorize] public ActionResult ComposeMessage() { ModelClasses.Messages.ComposeMessage FormData = new ModelClasses.Messages.ComposeMessage(); Common C = (Common)Session["Common"]; FormData.recipients = new MultiSelectList(C.AvailableUsers, "Key", "Value"); FormData.recipient_roles = new MultiSelectList(C.AvailableRoles, "Key", "Value"); return View(FormData); } ...and my model-based controller looks like this: [Authorize, AcceptVerbs(HttpVerbs.Post)] public ActionResult ComposeMessage(DCASS3.Classes.Messages.ComposeMessage FormData) { DCASSUser CurrentUser = (DCASSUser)Session["CurrentUser"]; Common C = (Common)Session["Common"]; //... (business logic) return View(FormData); } Problem is, I can access the page fine before a submit. When I actually make selections and press the submit button, however, I get: Server Error in '/' Application. No parameterless constructor defined for this object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.MissingMethodException: No parameterless constructor defined for this object. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [MissingMethodException: No parameterless constructor defined for this object.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0 System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86 System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230 System.Activator.CreateInstance(Type type, Boolean nonPublic) +67 System.Activator.CreateInstance(Type type) +6 System.Web.Mvc.DefaultModelBinder.CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) +307 System.Web.Mvc.DefaultModelBinder.BindSimpleModel(ControllerContext controllerContext, ModelBindingContext bindingContext, ValueProviderResult valueProviderResult) +495 System.Web.Mvc.DefaultModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +473 System.Web.Mvc.DefaultModelBinder.GetPropertyValue(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor, IModelBinder propertyBinder) +45 System.Web.Mvc.DefaultModelBinder.BindProperty(ControllerContext controllerContext, ModelBindingContext bindingContext, PropertyDescriptor propertyDescriptor) +642 System.Web.Mvc.DefaultModelBinder.BindProperties(ControllerContext controllerContext, ModelBindingContext bindingContext) +144 System.Web.Mvc.DefaultModelBinder.BindComplexElementalModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Object model) +95 System.Web.Mvc.DefaultModelBinder.BindComplexModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +2386 System.Web.Mvc.DefaultModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +539 System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +447 System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +173 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +801 System.Web.Mvc.Controller.ExecuteCore() +151 System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +105 System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +36 System.Web.Mvc.<c_DisplayClass8.b_4() +65 System.Web.Mvc.Async.<c_DisplayClass1.b_0() +44 System.Web.Mvc.Async.<c__DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +42 System.Web.Mvc.Async.WrappedAsyncResult1.End() +140 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +54 System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) +40 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +52 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +36 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8677678 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155 Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082 This error shows up before I can trap it. I have no idea where it's choking, or what it's choking on. I don't see any point of this model that cannot be created with a parameterless constructor, and I can't find out where it's dying... Help is appreciated, thanks. -Jeremy

    Read the article

  • Asp.net MVC/Silverlight and Sharepoint 2010 integration

    - by Robert Koritnik
    Just a sidenote: I'm not sure whether I should post this to serverfault as well, because some MOSS admin may have some info for me as well? Additional note 1: I've found this document (Asp.net MVC 2 & Sharepoint integration) if anybody with sufficient expirience is willing to comment on its content whether this can be used in my described scenario or not. Additional note 2: I've discovered (later) that Silverlight is supported in Sharepoint 2010 so I'm considering it as well. So if anyone would comment on silverlight integration as well. A bit of explanation first (without Asp.net MVC/Silverlight) Is it possible to integrate the two? Is it possible to write an application that would share at least credential information with MOSS? I have to write a MOSS application that has to do with these technologies: MOSS 2010 Personal client certificates authentication (most probably on USB keys) Active Directory Federation Services Separate SQL DB that would serve application specific data (separate as not being part of MOSS DB) How should it work? Users should authenticate using personal certificates into MOSS 2010 There would be a certain part of MOSS that would be related to my custom application This application should only authorize certain users via AD FS - I guess these users should have a certain security claim attached to them This application should manage users (that have access to this app) with additional (app specific) security claims related to this application (as additional application level authorization rights for individual application parts) This application should use custom SQL 2008 DB heavily with its own data This application should have the possibility to integrate with external systems as well (Exchange for instance to inject calendar entries, ERP systems etc) This application should be able to export its data (from its DB) to files. I don't know if it's possible, but it would be nice if the app could add these files to MOSS and attach authorization info to them so only users with sufficient rights would be able to view/open these files. Why Asp.net MVC/Silverlight then? I'm very well versed in Asp.net MVC (also with the latest version) and I haven't done anything on Sharepoint since version 2003 (which doesn't do me no good or prepare me for the latest version in any way shape or form). This project will most probably be a death march project so I would rather write my application as a UI rich Asp.net MVC application and somehow integrate it into MOSS. But not only via a link, because I would like to at least share credentials, so users wouldn't need to re-login when accessing my app. Using Asp.net MVC I would at least have the possibility to finish on time or be less death marching. Is this at all possible? I haven't done any serious project using SIlverlight, but I will sooner or later have to. So I'm also considering a jump into it at this moment, because it still might make this application development easier than strict Sharepoint 2010. Questions Is it possible to integrate Asp.net MVC/Silverlight into MOSS as described above? If integration is not possible, would it be possible to create a completely MOSS based application that would work as described? Which parts of MOSS 2010 should I use to accomplish what I need?

    Read the article

  • MVC - Calling Controller Methods

    - by JT703
    Hello, My application is following the MVC design pattern. The problem I keep running into is needing to call methods inside a Controller class from outside that Controller class (ex. A View class wants to call a Controller method, or a Manager class wants to call a Controller method). Is calling Controller methods in this way allowed in MVC? If it's allowed, what's the proper way to do it? According to the version of MVC that I am following (there seems to be so many different versions out there), the View knows of the Model, and the Controller knows of the View. Doing it this way, I can't access the controller. Here's the best site I've found and the one describing the version of MVC I'm following: http://leepoint.net/notes-java/GUI/structure/40mvc.html. The Main Program code block really shows how this works. Thanks for any answers.

    Read the article

  • ASP.net MVC 2 and MonoDevelop 2.2

    - by rifferte
    Is it possible to utilize MVC 2 from MonoDevelop 2.2 (using Mono 2.4)? If so - is it as simple as grabbing a reference to the new System.Web.Mvc or is there something else to consider? I realize that any templating support in MonoDevelop may not be 100% there since it was built to utilize MVC v1 (at least as of MonoDevelop 2.2). If anyone can add any other tips or tricks that would help as well.

    Read the article

  • [Strange problem] ASP.NET MVC 2.0 RTM cannot work with VWD 2008 Express on a new Windows 7 Pro

    - by silent
    The MVC 2.0 RTM works great on my old Vista machine with VWD 2008 Express, but I just bought a new computer with Windows 7 Pro, installed VWD 2008 Express SP1 and MVC 2.0 RTM by using Web PI 2.0. but after installation, I found the VWD doesn't have any MVC options, that means I can't either create new MVC projects or compile existing MVC projects. Why? What other steps I need to do to make it work? I'm sure the MVC has been installed properly since my MVC site on the new computer works well (so the IIS side has no problem), just the VWD can't 'realize' that the MVC framework is already installed... (tried to uninstall and install many times, but won't work)

    Read the article

  • MVC 2 Data annotations problem

    - by Louzzzzzz
    Hi. Going mad now. I have a MVC solution that i've upgraded from MVC 1 to 2. It all works fine.... except the Validation! Here's some code: In the controller: using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Security.Principal; using System.Web; using System.Web.Mvc; using System.Web.Security; using System.Web.UI; using MF.Services.Authentication; using System.ComponentModel; using System.ComponentModel.DataAnnotations; namespace MF.Controllers { //basic viewmodel public class LogOnViewData { [Required] public string UserName { get; set; } [Required] public string Password { get; set; } } [HandleError] public class AccountController : Controller { [HttpPost] public ActionResult LogOn(LogOnViewData lvd, string returnUrl) { if (ModelState.IsValid) { //do stuff - IsValid is always true } } } } The ModelState is always valid. The model is being populated correctly however. Therefore, if I leave both username and password blank, and post the form the model state is still valid. Argh! Extra info: using structure map for IoD. Previously, before upgrading to MVC 2 was using the MS data annotation library so had this in my global.asax.cs: ModelBinders.Binders.DefaultBinder = new Microsoft.Web.Mvc.DataAnnotations.DataAnnotationsModelBinder(); Have removed that now. I'm sure i'm doing something really basic and wrong. If someone could point it out that would be marvellous. Cheers

    Read the article

  • Crystal Reports in ASP.NET MVC

    - by Odd
    I know the use of server-side controls is a no-no in ASP.NET MVC, however we have a long list of crystal reports that the company has already produced for a previous application that I would like to utilize for our new ASP.NET MVC application. Is there an appropriate way to use crystal reports in ASP.NET MVC? If so, how?

    Read the article

  • ASP.NET MVC Best Implementation Practices

    - by RSolberg
    I've recently been asked to completely rewrite and redesign a web site and the owner of the company has stressed that he wants the site to be made with the latest and greatest technology available, but to avoid additional costs. As of right now, I'm torn between looking into a CMS implementation and writing a new implementation with MVC. The site is mainly brochure ware, but will need to allow the visitors to submit some data through forms. There are quite a few lists and content features that are dynamic and should be treated as such. Since ASP.NET MVC is new, I don't want to bastardize the implementation if I go that way... Any recommendations on best implementation practices for a MVC website? Also, has anyone had their MVC implementation hosted anywhere that they would recommend?

    Read the article

  • mvc action link error message

    - by user281180
    What is wrong with this statement? <%= Html.ActionLink("Assign Users", new { Controller="Users", Action="Index", Query="Index", Page=2932 })% I`m having the following error: Error 10 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'ActionLink' and the best extension method overload 'System.Web.Mvc.Html.LinkExtensions.ActionLink(System.Web.Mvc.HtmlHelper, string, string)' has some invalid arguments c:\Code\MvcUI\Views\Project\Index.aspx 17 22 MvcUI Error 11 Argument '3': cannot convert from 'AnonymousType#1' to 'string' c:\Code\MvcUI\Views\Project\Index.aspx 17 54 MvcUI

    Read the article

  • Avoiding deployment when debugging an ASP.NET MVC application

    - by John Kaster
    Once an asp.net MVC project has a web deployment project associated with it, there doesn't seem to be a way to avoid deploying when you build the MVC project. I still want to be able to debug my MVC project locally and avoid deploying new versions of it. How do I configure the web deployment project to skip the deployment step when I'm trying to debug?

    Read the article

  • Error with Ajax.Beginform on ASP.NET MVC Page

    - by Rupa
    Hi I am using Ajaxy Call to load the partial view. It is working fine in Firefox and IE without in Debug Mode. But in Debug mode, I am getting the follwoing error: Error: 'Sys' is undefined Ajaxy call Code: <% using (Ajax.BeginForm("SearchResults", new AjaxOptions { UpdateTargetId = "divLoadSearchResults" } )) {%> HTML View Source corresponding to this: <form action="/Home/SearchResults" method="post" onclick="***Sys.***Mvc.AsyncForm.handleClick(this, new Sys.UI.DomEvent(event));" onsubmit="Sys.Mvc.AsyncForm.handleSubmit(this, new Sys.UI.DomEvent(event), { insertionMode: Sys.Mvc.InsertionMode.replace, updateTargetId: 'divLoadSearchResults' });"> I am using MVC RC2 framework. Anyone have similar problems with RC2? If it is not in Debug mode, it is working fine. Again, if i run it using Debug mode or CTRL+F5, it shows up the error. Appreciate your responses.

    Read the article

  • ColdFusion MVC frameworks & RESTful Service mismatch?

    - by Henry
    Most CF MVC Frameworks use the front controller pattern. Usually Search Engine Safe (SES) plugin together with URL Rewrite are used to construct friendly URLs. However, when it comes to implementing RESTful services, using a MVC framework seems like a layer of complexity added on top of another layer of complexity. How should one tame this beast? Any nice and clean approach of supporting RESTful services with ColdFusion? Any MVC framework out there that can expose RESTful services easily? Thanks

    Read the article

  • ASP.NET MVC Beginner's question

    - by Amutha
    Just I am learning MVC,(ofcourse i get enough information from MS Website).I want to quickly clarify some details. 1) What is the use of PartialView in MVC,Is it similar to partial update of Ajax? I am does the partialView modify the HTML DOM structure? 2)Can i use Response.Redirect() in MVC?

    Read the article

  • Custom Html Helper is not working in asp.net MVC 2.0

    - by chobo2
    Hey I was using this custom html helper in asp.net mvc 1.0 but now I am trying to use it in a 2.0 project and it crashes http://blog.pagedesigners.co.nz/archive/2009/07/15/asp.net-mvc-ndash-validation-summary-with-2-forms-amp-1.aspx This is the error I get. System.MissingMethodException was unhandled by user code Message=Method not found: 'System.String System.Web.Mvc.Html.ValidationExtensions.ValidationSummary(System.Web.Mvc.HtmlHelper)'. Source=CustomHtmlHelpers StackTrace: at CustomHtmlHelpers.ActionValidationSummaryHelper.ActionValidationSummary(HtmlHelper html, String action) at ASP.views_signin_signin_aspx.__RenderContent2(HtmlTextWriter __w, Control parameterContainer) in SignIn.aspx:line 23 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at ASP.views_shared_site_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) Site.Master:line 64 at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Control.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) at System.Web.UI.Page.Render(HtmlTextWriter writer) at System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) at System.Web.UI.Control.RenderControl(HtmlTextWriter writer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) InnerException: My other html helpers in the same library do work. I added the namespace into the webconfig.

    Read the article

  • ASP.NET MVC F# controller action ignoring parameter

    - by Matt H
    Hi. I have a C# ASP.NET MVC project but my controllers are written in F#. For some reason, the following code doesn't work properly. namespace MvcApplication8.Controllers open System.Web.Mvc [<HandleError>] type ImageController() = inherit Controller() member x.Index (i : int) : ActionResult = x.Response.Write i x.View() :> ActionResult The parameter of the action is seemingly ignored. http://localhost:56631/Image/Index/1 = The parameters dictionary contains a null entry for parameter 'i' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult Index(Int32)' in 'MvcApplication8.Controllers.ImageController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parameter name: parameters The controller otherwise works fine. I know that plenty of people have written F# mvc code, so, any ideas where I'm going wrong?

    Read the article

  • ASP.NET MVC on IIS6

    - by Seb Nilsson
    Where can I find some good pointers on best practices for running ASP.NET MVC on IIS6? I haven't seen any realistic options for web-hosts who provide IIS7-hosting yet. Mostly because I don't live in the U.S. So I was wondering on how you best build applications in ASP.NET MVC and make it easily available to deploy on both IIS6 and IIS7. Keep in mind that this is for standard web-hosts, so there is no access to ISAPI-filters or special settings inside IIS6. Are there anything else one should think about when developing ASP.NET MVC-applications to target IIS6? Any functions that doesn't work? UPDATE: One of the bigger issues is the thing with routes. The pattern {controller}/{action} will work on IIS7, but not IIS6 which needs {controller}.mvc/{action}. So how do I make this transparent? Again, no ISAPI and no IIS-settings, please.

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >