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?
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:
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:
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#)
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.
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.
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.
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 ?
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.
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.
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);
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
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
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"
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.
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'
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.
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'
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
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
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?
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.