asp.net-mvc-2

Not allowed to use reflection in asp.net mvc2 running on a secure server?

I'm trying to deploy a web site on a secure server, but I'm having problems with reflection. I guess this have something to do with security, but I'm not quite sure. The error occurs when doing Assembly.GetTypes() ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for...

Unable to locate my nhibernate config file when debugging my MVC web-application

I've got an MVC web-project that's referencing a class-library-project that contains my Domain and Persistence tiers. I'm using nHibernate for my OR/M. Since I've got multiple databases to connect to, I'm initializing my session-factories by specifying the file-names: var config = new Configuration().Configure(nHibernateCfgFileName) ...

ASP.NET Cross-Sub-Domain Single Sign-On Cookies

I have a Single Sign-on solution which is working great in our test environment. It uses Cross-Sub-Domain cookies to share the authentication ticket between 2 web applications. Sign-on is done only on one of the applications and on the second site the user is authenticated by the cookie created by the first site. The problem is that wh...

Wrapping up ASP.net MVC

Hi All, Im currently in the final stages of testing on my first professional ASP.net MVC page (well really first real website). Just wanting to get advice on stuff i need to do before it is exposed to the web. This has been done a million times so Im hoping you can help this noob out. Thanks ...

Use ActionInvoker with url to return a MethodInfo

I’m trying to create my own smart ActionLink htmlhelper that determines if a user is authorized to perform the action that the link points to. If they are not authorized then I want to launch a javascript modal login box to screen. I have gotten it to work in cases where my method names are all unique. But I need it to be more intellige...

MVC Entity Framework connection string error

What are the possible reasons for getting this error: "The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid." I am using the auto-generated connection string that the EF Wizard created and added to my app.config, so I would think it should work? ...

MVC2 HttpPost Not Recieving Data Members

I have a simple model class (UserAddress) that is not being passed properly to the HttpPost function. The data always has null values for all the member data. public class User { public string Name { get; set; } } public class Address { public string Address1; public string Address2; } public class UserAddress { public...

custom Passing values from view to controller in asp.net mvc 2.0

Hi friends,i have one critical scenario.I have a index page of a user area.there if i click Register button i will go to register form .after registering if i click register button in that form it will go to registration confirmation page.If i click Continue button in that page i have to go to order page i,e it will go order controller p...

validation of customised registration page in asp.net mvc 2.0

how to validate the fields of customised registration page while registering the user using cusomised membership provider in asp.net mvc 2.0.My customised code to create the user is as follows, if(ModelState.IsValid) { string firstName = FirstName; string lastName = LastName; string userNa...

C# mvc2 nhibernate problem

I've got the following mapping in my application. The mapping is generated, by a custom tool. Other mappings generated work ok, but this one is giving me a strange error which I don't understand. This is the mapping; <?xml version="1.0" encoding="utf-8"?> <!--Generated by NHibernate.Mapping.Attributes on 2010-10-29 08:39:48Z.--> <hiber...

T4MVC MVC2 Views in Areas not generated

I just create an empty MVC2 project. Add an Area and a controller and a view to it. Include T4MVC files into the project and run the custom tool. Everything is generated except the ViewNames for the views in the Area. My tree structure: Areas MyArea Controllers MyTestController.cs Views MyTest MyTestView.aspx MySecondTestVie...

LOGON issues with Crystal reports

Please Help, I am creating a Simple Crystal report that views outstanding logs for our call centre,I have a stored procedure that retrieves all the Info I need.Here is where it gets interesting. The Report retrives all the relevant data and shows me page One.When i try to view the second page i get the following " The report you request...

How to display Model internal validation messages in asp.net mvc 2?

Hi, I have developed the application in asp.net mvc 2 with c# language. I have deployed it successfully on IIS 5.1 , working perfect. but one of form only displaying the red shade box after execution. It seems like this : May be this is issue of date format but tough I give it as dd/MM/yyyy it shows same. Also While I have debug the ...

ASP .NET 2.0 integration with ASP .NET MVC 2.0 ...

Is there any reason why this configuration should not work?: parent application (A) is a closed (uneditable) ASP .NET 2.0 application in IIS 6.0 an ASP .NET MVC 2.0 (B) application installed in a subfolder of A; however the MVC application CANNOT be set as an application in IIS as A will then not pass security information through I h...

modelstate validation in asp.net mvc 2.0

Hi Friends,I have implemented customised registratio page by extending the membership provider using profile provider.I successfully registered the user .Now i want to validate the fields of registration page.Built-in Registration page has builtin validation messages. Bu in my coding i am not passing model to the registration action, ins...

View returned from mvc action is blank using moq

The topic says it all. I'm guessing this is because of some missing setup related to MVC, but I'm very new to the world of http, asp.net and mvc, so I'm not quite sure what's wrong. public class MyController : Controller { public ActionResult MyAction(MyModel model) { return View(model); } } var controllerMock = new M...

MVC partial rendering issue using Razor

Hello, I have _Layout.cshtml defined for my mvc application, which is shown below: @inherits System.Web.Mvc.WebViewPage @using Webdiyer.WebControls.Mvc; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> @RenderSection("HeaderContent", false) </head> <body> @RenderBody() </body> </html> On the page SomePage.cshtml, ...

How can I validate an MVC view model from a unit test?

I am writing unit tests to test an MVC application. How can I validate my view models from a unit test? ...

Connect ActiveDirectory with ASP.NET or PHP

Hi Im looking to create a web application using ASP.NET MVC or PHP (not decided yet!) and I want to use the local ActiveDirectory to register users. Can anyone point out how to do this on PHP or ASP.NET? Would like answers on any of the technologies Best regards, David ...

mvc2 - getting the URL to reflect the form submission

I have an MVC2 application with a form (like ya do). The user enters a query into the form (in the /Cars/Index view) and hits the "submit" button which posts to the Details action of CarsController - the Details view renders with results, and all is well and good. The user can enter a URL (such as /Cars/Details/123-125) and they get th...