MVC2 Futures Conflicting With Existing System.Web.Mvc?

Feb 9, 2011

I downloaded MVC2 Futures and referenced it to my current MVC2 Project. However, if I want to call an HtmlHelper from MVC2 Futures I need to <%@ Import Namespace="Microsoft.Web.Mvc" %>

So I decided to add it on my Web.Config:

[code]....

but, this caused me errors. Could this assemblies co-exist? If yes, How?

View 1 Replies


Similar Messages:

MVC2 And MVC Futures Causing RedirectToAction?

Apr 12, 2010

I've been trying to get the strongly typed version of RedirectToAction from the MVC Futures project to work, but I've been getting no where. Below are the steps I've followed, and the errors I've encountered.

I created a new MVC2 app and changed the About action on the HomeController to redirect to the Index page.

Return RedirectToAction("Index")

However, I wanted to use the strongly typed extensions, so I downloaded the MVC Futures from CodePlex and added a reference to Microsoft.Web.Mvc to my project.

I addded the following "import" statement to the top of HomeContoller.vb

Imports Microsoft.Web.Mvc

I commented out the above RedirectToAction and added the following line:

Return RedirectToAction(Of HomeController)(Function(c) c.Index())

So far, so good. However, I noticed if I uncomment out the first (non Generic) RedirectToAction, it was now causing the following compile error:

Error 1 Overload resolution failed because no accessible 'RedirectToAction' can be called with these arguments:
Extension method 'Public Function RedirectToAction(Of TController)(action As System.Linq.Expressions.Expression(Of System.Action(Of TController))) As System.Web.Mvc.RedirectToRouteResult' defined in 'Microsoft.Web.Mvc.ControllerExtensions': Data type(s) of the type parameter(s) cannot be >inferred from these arguments. Specifying the data type(s) explicitly might correct this error.
Extension method 'Public Function RedirectToAction(action As System.Linq.Expressions.Expression(Of System.Action(Of HomeController))) As System.Web.Mvc.RedirectToRouteResult' defined in 'Microsoft.Web.Mvc.ControllerExtensions': Value of type 'String' cannot be converted to 'System.Linq.Expressions.Expression(Of System.Action(Of mvc2test1.HomeController))'.

Even though intelli-sense was showing 8 overloads (the original 6 non-generic overloads, plus the 2 new generic overloads from the Futures assembly), it seems when trying to complie the code, the compiler would only 'find' the 2 non-gneneric extension methods from the Futures assessmbly.

I thought this might be an issue that I was using conflicting versions of the MVC2 assembly, and the futures assembly, so I added MvcDiaganotics.aspx from the Futures download to my project and everytyhing looked correct:

ASP.NET MVC Assembly Information (System.Web.Mvc.dll)

Assembly version: ASP.NET MVC 2 RTM (2.0.50217.0)
Full name: System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Code base: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Web.Mvc/2.0.0.0__31bf3856ad364e35/System.Web.Mvc.dll
Deployment: GAC-deployed

ASP.NET MVC Futures Assembly Information (Microsoft.Web.Mvc.dll)

Assembly version: ASP.NET MVC 2 RTM Futures (2.0.50217.0)
Full name: Microsoft.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null
Code base: file:///xxxx/bin/Microsoft.Web.Mvc.DLL
Deployment: bin-deployed

This is driving me crazy! Becuase I thought this might be some VB issue, I created a new MVC2 project using C# and tried the same as above.

I added the following "using" statement to the top of HomeController.cs

using Microsoft.Web.Mvc;

This time, in the About action method, I could only manage to call the non-generic RedirectToAction by typing the full commmand as follows:

return Microsoft.Web.Mvc.ControllerExtensions.RedirectToAction<HomeController>(this, c => c.Index());

Even though I had a "using" statement at the top of the class, if I tried to call the non-generic RedirectToAction as follows:

return RedirectToAction<HomeController>(c => c.Index());

I would get the following compile error:

Error 1 The non-generic method 'System.Web.Mvc.Controller.RedirectToAction(string)' cannot be used with type arguments

What gives? It's not like I'm trying to do anything out of the ordinary.It's a simple vanilla MVC2 project with only a reference to the Futures assembly.

I'm hoping that I've missed out something obvious, but I've been scratching my head for too long, so I figured I'd seek some assisstance.

If anyone's managed to get this simple scenario working (in VB and/or C#)

View 1 Replies

Implications Of Conflicting Versions Of System.Web.Extensions?

Feb 23, 2010

One of the libraries I am including in my project makes use of System.Web.Extensions 3.5.0.0, which conflicts with my Framework 2.0 application, which uses (C:Program FilesMicrosoft ASP.NETASP.NET 2.0 AJAX Extensionsv1.0.61025System.Web.Extensions.dll). I can think of 3 possible solutions:

Ignore the warning and don't change anything. I am not sure what the application does to handle this.
Add an assembly binding element to my web.config (see below) Configure the application explicitly to use different assemblies (I think this is possible, but don't know how to do it).

However, I am unsure of the implications of each of these decisions. The application seems to work perfectly fine even when I ignore the warnings (solution 1), but ignoring warnings that I don't fully understand bugs me...as does having warnings like this show up at all.

[URL]

View 1 Replies

Looking For View Codding New Futures?

Nov 4, 2010

what are the new futures came in asp.net mvc2.. I am looking for View Codding new futures? Controller coding and Seurity?

View 2 Replies

MVC :: Thoughts On Html.Serialize In The MVC Futures

Feb 3, 2011

I'm learning ASP.NET MVC 2 I want to create a wizard-type application. I was reading you can accomplish this with the help of Html.Serialize method in ASP.NET MVC Futures assembly (To help preserve state as you step through views).

I haven't seen that this is even part of MVC 3.0 as well. how certain this feature will be included for sure in the future? I'm a little wary of relying on it being there.

View 2 Replies

MVC :: 2.0 Futures REST - Cross Domain - JSONP

May 5, 2010

I´m using mvc futures 2 with WebApiEnabled for XML and JSON support. But due to cross domain issues with jQuery $.ajax I´m lookin in to JSONP. Is there a simple way to extend futures rest function for JSONP or should I do something else.

View 1 Replies

C# - Conflicting Auto Completes?

Jan 19, 2011

I have an Ajax auto complete textbox in my .NET 4.0 asp.net page via a web service, but the browser auto complete dropdownlist feature shows up on top of my .net auto complete dropdownlist.

Is there a way to make sure the browsers auto complete feature does not popup on this textbox? Almost like an override to make sure the browser ?

View 1 Replies

How To Resolve Conflicting Assemblies In C#

Jun 15, 2010

In my web application I am using NHibernate.dll. This has a dependency on folowing assembly.

'Antlr3.Runtime, Version=3.1.0.39271,
Culture=neutral,
PublicKeyToken=3a9cab8f8d22bfb7'

Now in the same project for another requirement I have to introduce Antlr3.StringTemplate.dll. Which has a dependency on another version of the above assembly.

If I use the version of Antlr3.Runtime.dll which satisfies NHibernate , Antlr3.StringTemplate starts complaining and vice-versa.

View 4 Replies

Configuration :: Web Config Is Conflicting The Server?

Jun 10, 2010

I just uploaded all my aspx files including web config file to the server. I received a notice saying the web.config file has been removed from the server due to its conflict with their server. The aspx files are working fine without the web config file. But the email form from my site is not working. I have a few questions regarding this.

1. Is web.config necessary to run aspx pages?

2. What are the possible reason web.config files is conflicting with the server?

3. As mentioned, the email form is not working. I am predicting the reason is it is unable to access the mail setting in web.config file.

View 3 Replies

Scriptmanager Conflicting With Button - Unable To Postback

Jun 18, 2010

I'm working on an asp.net app and I have some controls that are created dynamically on the OnInit event. One of that controls is an asp button that has been working fine until now. When I add a ScriptManager to my page, that same button is unable to postback. It's only working if a take the ScriptManager out. Has anything like this ever appened to somebody else? Am I invalidating the page somehow? Edit: This is my script manager tag:

<asp:ScriptManager ID="ScriptManager1" runat="server"
EnablePageMethods="true" EnableScriptGlobalization="true"
EnableScriptLocalization="true">
</asp:ScriptManager>
//My Dynamic Button:
Button button1 = new Button
{
ID = "button1",
Text = "Ok"
};
button1.Click += new EventHandler(Button1_Click);

View 2 Replies

SQL Server :: Querying SQL Table For Conflicting Values?

Mar 8, 2011

I have this table in SQL that I'm trying to do some comparison work with Ok, onto the schema. It's like this:

[Code]....

Now, what I want to do is query my database in this manner:Display any records that conflict only Non-priority conflict based on: priority based on the time of day

[Code]....

View 4 Replies

State Management :: Conflicting Data Between Different Users

May 4, 2010

i'v an enquiry form, user is operator as Role users fill enquiry form (enquiry.aspx) and view enquiry list done by thmselvs in viewEnquiry.aspx page in GridView im testing using different users accssing this application same time The Problem:

user1 has done 10 enquiries, and in viewEnquiry.aspx able to see is 8 enquiries the 2 remaining enquiries is reflecting in user2's profile or (in viewEnquiry.aspx page as logged in user2) what i'v done: i'v used "public static string UserName;" in Global class file clGlobal.cs in App_Code when user done login successful i stored UserName = dr.GetValue(2).toString(); and clGlobal.UserName = "" on Logout and on master page Load of User im checking (if clGlobal.UserName == "") then redirct to Login.aspx

View 1 Replies

Partial Declarations Of '[Class.Class]' Have Conflicting Accessibility Modifiers?

Aug 10, 2010

I first need to apologize in case this has been answered before but I'm a newbie (green as they come) and this error keeps popping up even before I start debugging! There are two errors and the second one is:" Error 2

Missing partial modifier on declaration of type 'WFPKenya2.WFPKenya2'; another partial declaration of this type exists"

View 6 Replies

C# - Clean Conflicting Class Files From Temporary Files

Apr 21, 2010

Class file Conflicts in C:WINDOWSMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files is preventing me from building the solution. Even though I try emptying out the folder, each time Visual Studio starts the build process, it brings in the class file in to the temp folder with the same folder name. If I restart the machine or leave it overnight, project build without error. Is there anyway to tell Visual studio to delete/ignore/clean any lingering class files that could be in the temp folder?

Clean solution option in VS doesn't work either. Class file in conflict are from the App_Code folder.

View 4 Replies

Fluent Nhibernate System.ApplicationException : For Property 'Id' Expected '1' Of Type 'System.Int32' But Got '2' Of Type 'System.Int32'

Jul 6, 2010

I am writing unit tests for fluent Nhibernate, when I run the test in isloation it passes, but when I run multiple tests. or run the test more than once it starts failing with the message below System.ApplicationException : For property 'Id' expected '1' of type 'System.Int32' but got '2' of type 'System.Int32'

[TextFixture]
public void Can_Correctly_Map_Entity()
{
new PersistenceSpecification<UserProfile>(Session)
.CheckProperty(c => c.Id, 1)
.CheckProperty(c => c.UserName, "user")
.CheckProperty(c => c.Address1, "Address1")
.CheckProperty(c => c.Address2, "Address2")
}

View 2 Replies

A First Chance Exception Of Type 'System.Data.Odbc.OdbcException' Occurred In System?

Jul 6, 2010

I have been trying to get the data display on the datagrid after selecting a customer.

With the same connection it populates the selection right. But just do not seem to extract the following SQL.

The litABC is to check the flow of control.

There is no syntax error but in the debug menu,

I got A first chance exception of type 'System.Data.Odbc.OdbcException' occurred in System.

Where did I do wrong?

[code]....

View 1 Replies

MVC :: Method Not Found: 'System.Web.Mvc.MvcHtmlString System.Web.Mvc.Html.LinkExtensions.RouteLink(Syst...

Jan 27, 2010

I have a project that it had been developed under MVC1 and after aa few months ago I upgraded it in MVC2.

Everything was well, uppon the day I needed to format my computer.

And what can goes wrong with a format? I don't know

I have installed the MVC2, I build the project, no error displayed, but from the time I've uploaded the project in the production server

I am getting this error.

Method not found: 'System.Web.Mvc.MvcHtmlString System.Web.Mvc.Html.LinkExtensions.RouteLink(System.Web.Mvc.HtmlHelper, System.String, System.Object)'.

I can't understand what caused the problem.

Certainly I assumed that is have to do with MVC1 and I referenced it, but with no luck
again.

Theese are the methods that the problem is came from

[Code]....

View 15 Replies

AJAX :: Unable To Load Type 'System.Web.UI.ScriptReferenceBase' From Assembly 'System.Web.Extensions,

Oct 11, 2010

i have installed ajax control kit successfully and all controls already came in toolbar tab named "Ajax Control toolkit"But when i try to design any page using with ajax control toolkit, follow error is coming:

Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

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.TypeLoadException: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

Source Error:[Code]....

Stack Trace: [Code]....

[TypeLoadException: Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.]
AjaxControlToolkit.ToolkitScriptManager.OnResolveScriptReference(ScriptReferenceEventArgs e) in [code]...

I am using VIsual Studio 2008 , framework 3.5 but i don't know why in error information version is showing 2.0

i install tool kit according 3.5 framework.also note, framework built-in ajax tags i can use fine and they work properly.

View 1 Replies

Finding Difference System.web.httpcontext.current.application And System.Configuration.Appsettings?

Jan 22, 2010

Can anyone tell me the differnce between

System.web.httpcontext.current.application["tag"]

or

System.Configuration.Appsettings["tag"]

View 2 Replies

DataSource Controls :: SqlBulkCopy - Invalid Cast From 'System.String' To 'System.Guid'

Feb 19, 2010

I am attempting to use SqlBulkCopy to import data from an XML document. I receive the following error when executing WriteToServer: Invalid cast from 'System.String' to 'System.Guid'

View 1 Replies

DataSource Controls :: An Unhandled Exception Of Type 'System.InvalidOperationException' Occurred In System.Xml.dll

Jun 8, 2010

An unhandled exception of type 'System.InvalidOperationException' occurred in System.Xml.dll

View 1 Replies

First Chance Exception Of Type 'System.Data.SqlClient.SqlException' Occurred In System

Nov 25, 2010

When i fill my sql adapter daAuthors.Fill(dsPubs, "MYTable") sometime i get A first chance exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dllmy code can run for a lot hours without any problems but sometime i get the message

View 1 Replies

AJAX :: Ajaxtoolkit - Debug Error Could Not Load Type System.Web.UI.ScriptReferenceBase' From Assembly System.Web.Extensions

Dec 15, 2010

i have installed ajaxtoolkit 3.5 but when i debug i am getting this error Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' even i have changed my tags to

<asp:ToolkitScriptManager
ID="ToolkitScriptManager1"
EnablePartialRendering="true"
runat="server"></asp:ToolkitScriptManager>

View 6 Replies

System.diagnostics And System.Debug Not Working From Page Method

Feb 1, 2010

We have a Page Method on a web page using ASP .Net. We tried to put in a trace statement using both System.Diagnostics and System.Diagnostics.Debug. In Visual Studio 2008, the break point is not even hit for the line, but other break points on other lines are hit.There is no output from either method that we can see.

There is also a Global.asax error catcher that works fine in other cases, but in the Page Method is not being catched.why a Page Method and System.Diagnostics do not play well together?

View 1 Replies

Visual Studio :: How To Pass Values From 1 Form(in 1st System) To Another System.

Jan 25, 2011

I need to make a windows application and the requirements is like this: Data is to be entered through one form and those values are to be displayed in a form in different computer.should i use in order to get this done. My main concern is to efficiently transfer the data.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved