8,428 questions
0
votes
1
answer
207
views
The controller for path '/' could not be found or it does not implement IController
I'm working on a Web Forms application and using EXT.NET framework for the views, i have a panel on the side with buttons that when i click on them, a view opens in a tab on the same page, like an ...
1
vote
0
answers
88
views
how to add bootstrap template to ASP.net MVC 2 project
layout file is not there how to add bootstrap template in MVC 2 project . And there is no template in add item to add a .cshtml file
0
votes
1
answer
42
views
Suggestion with MVC2 DI and migrating a legacy system
I have an old legacy system (more than 10 years) made in MVC 2 with structuremap(2.6.1.0) as DI. We have begun migrating the back with nHibernate (also 10 years old) to entity framework core in a ...
0
votes
2
answers
517
views
Upgrading from MVC2 to MVC5 project
Could someone please help me how I can upgrade and MVC2 application to MVC5?
Please consider that I had never had any experience with upgrade before.
I do not want to do rewrite only upgrade to MVC5.
...
0
votes
0
answers
92
views
The IControllerFactory 'Munq.MVC.MunqControllerFactory' did not return a controller for the name 'Home'
My client has legacy application based on ASP.NET MVC 2 Framework which runs well on WinSrv 2008 R2 VM. I've cloned this machine, changed IP, hostname etc. and this cloned machine was upgraded to ...
0
votes
1
answer
50
views
Showing Bootstap Model to Create Form with Some Parameters
i want to show model through which i want to update status of order. i already created post action method which require order_id and status to update order status.But i dont understand how to pass ...
3
votes
0
answers
195
views
System.OutOfMemoryException when tried with 70 files SharpZipLib
I have tried zipping 70 pdf documents but ended up having a System.OutOfMemoryException.
Please look into the following code and let me know whats wrong with it.
Please note that I have posted issue ...
0
votes
2
answers
111
views
Find All Extension Methods for HTMLHelper, URLHelper and AJAXHelper Types
Looking to find a way with Object Browser (in Visual Studio, or another tool) to find all of the extension methods defined for HTMLHelper, URLHelper and AJAXHelper. Any ideas?
0
votes
1
answer
1k
views
Active Directory with multi factor authentication for an existing web application
Customer is asking for LDAP / Active Directory authentication along with OTP (one time password) / multi-factor authentication for an old existing web application written in (asp.net MVC2). Is this ...
0
votes
0
answers
148
views
How to receive an array in AJAX send from the ASP .NET controller?
The tecnologies are:
ASP .NET MVC2
JQuery v3
My code is as follows:
Controller:
public ActionResult Create()
{
ViewData["department"] = new SelectList(_db.department.ToList(), "...
0
votes
2
answers
662
views
How do I create an empty model to pass to an insert-update view when there are more than on model in the dbcontext?
I need to create an empty form for database update. In the controller this is called: public ViewResult Create() => View("Edit", new List());
<TargetFramework>netcoreapp2.2</...
4
votes
1
answer
436
views
Binding List of Lists in MVC 2.0
I need to handle a List<List<T>> in a form and couldn't find how to proceed with old version of MVC and .NET.
I did try the following:
Model:
public class MyModel
{
public List<...
4
votes
0
answers
52
views
How to use Google Calendar Api in .net MVC 2 using this sample https://developers.google.com/calendar/quickstart/dotnet
We have a legacy application which is written in .Net MVC 2 and required to use Google Calendar API. I have found this link which is mentioned prerequisites VS 2013 and above. Is there any way to use ...
6
votes
2
answers
7k
views
How to override default required error message
I have an old C# MVC 2.0 web application.
Whenever I use a [Required] attribute, the default validation error message goes:
The [whatever] field is required.
My problem is that the application ...
0
votes
1
answer
153
views
Automatically add column to data table according to week
I'm working on a table that shows data per week. How can I automatically add a column after a week has passed by and show its data from the database? Thank you in advance.
MVC2
Jquery
0
votes
0
answers
434
views
Windows.Web.Http.HttpClient post send special characters (A potentially dangerous Request.Form value was detected from the client)
I need to send the following text to a web application (MVC2)
Hello <>~!@#$%^&*()_+|}{":?><
Hello <>?:"P{{}|+)_)_&*()&^*^%&#%^@#$~!@#~!@#~Q
I'm sending ...
1
vote
0
answers
168
views
asp.net mvc no <assemblies> in webconfig
I have an issue with one of my .ascx files, when I hover over a red <%=Html.BeginForm it says:
The type RouteValueDictionary is defined in an assembly that is not referanced. You must add a ...
0
votes
1
answer
150
views
How to download pdf file in mvc2
I have a "Gallery" folder with one pdf file
I view the pdf file using an object, then I need to download that pdf by clicking a "Click here to download the pdf file" link
please help me,
I view ...
-1
votes
2
answers
283
views
How to make use of the conditional statement in where clause?
Here is my below code
string CampusId = "1";
string ClassId = "1";
var Class = GetClassesselect();
var model = (from sr in db.StudentRequests
join c in db.Classes
on sr.ClassId equals c.ClassId
where ...
0
votes
1
answer
72
views
Use a variable in View
On an ASP.net project, I have to pass a message list, which I would like to display in an HTML list. So I have my Message class in my model folder, and in my controller, I get my list.
public ...
1
vote
2
answers
2k
views
MVC CORE 2.0.0 run c# code on every page
I need to run some c# code each time any page based on _layout.cshtml is viewed. I don't want to put something in every controller.cs file, just something central like you used to have in ASP.NET's ...
0
votes
1
answer
474
views
How can I import javascript file in a file extension *.aspx*? [duplicate]
I am a novice in ASP.NET MVC. Recently, I try to import a javascript file in a asp file.
But I get this Error:
Not allowed to load local resource
no matter using IE, Chrome or Firefox.
My code:
*...
1
vote
1
answer
561
views
How to implement single sign on MVC 2 using ADFS?
I have MVC 2 application which has used in Windows authentication mode. The requirement has changed to that application needed to be on single sign one(SSO) in multiple active directories.The client ...
0
votes
0
answers
30
views
mvc2 to mvc3 validation issues
I'm extremely new to .NET and was given the task of upgrading an old application that we have so that it can run on a Windows 2012 server. Right now, it is running on a 2003 server, but that will be ...
-4
votes
3
answers
3k
views
Mvc 5 pagination using view model
Hi i am newbie to Mvc i have a json service which returns a list of walletstatementlogs based on fromdate and todate. I have a controller TopUpReqLogController every time when i hit the action index ...
0
votes
2
answers
2k
views
reset id(primary key) after deleting record in sql
How to reset the value after deleting particular record in sql using mvc2
ex
records are: 1,2,3
deleted record:3
now i am adding new record .it should have the id 3 not 4.
what can i do for that??
-1
votes
1
answer
378
views
expand a drop downlist when click on the more option
I have a dropdownlist and it contains a list of names and a 'more' option.When the user click on the more option,it will load more names from database and display those names in the dropdownlist.But ...
0
votes
0
answers
48
views
Equivalent of ViewData["MenuItem.StoreMenuId"] using ViewBag? ViewBag.MenuItem.StoreMenuId doesn't work
Is it possible to convert ViewData["MenuItem.StoreMenuId"] to ViewBag? I use ViewBags to store IEnumerable<SelectListItem> so I can bind to @Html.DropdownListFor in my views. This works fine if ...
0
votes
1
answer
741
views
How to generate authentication token after FormsAuthentication success in mvc 2
I'm developing MVC 2 web application. I'm using FormsAuthentication for sign in users to my application. I want to generate an authentication token after users are successfully login to the ...
0
votes
1
answer
474
views
Cannot display items from list in ViewData Dictionary
I am new to ASP.NET and MVC 2. I'm trying to iterate over a list of lists of strings within my view page. However I cannot get any data to be displayed.
Controller Code.
public class ...
-1
votes
1
answer
65
views
ViewModel that is being posted back to the controller - all members are null?
I'm trying to post back the model to the controller, but the members within the ViewModel are null (rather than the entire model just being null). This is the View Model:
public List<...
7
votes
3
answers
2k
views
What happens when there is network request time out during AJAX request to ASP.NET MVC Action
As stated in the title, i would like to know what happens when an AJAX request is sent to a controller action and, during this time, a network timeout happens for a few ms before the request is ...
0
votes
1
answer
117
views
MVC 2 - JavaScript array to controller is not working
I am working in MVC2 and .net framework 3.5
While trying to pass a single object to mvc controller it is working fine. But when I try to pass the value as an array, I'm getting property values as ...
0
votes
1
answer
538
views
Mvc 2 - ActionLink Create new Id and pass to Controller
In my database i have Books and RentBooks. I created a View for Books where the Index return a list of all books that have been created. What i would like to do now is following:
I have a ActionLink ...
1
vote
2
answers
36
views
MVC 2 EF 4.0 Proper way to handle edits for something like products
I have an exam on monday and i wanted to ask you if someone knows what would be the best way to handle edits in a ProductView for example.
More or less it's about the code within the ProductController....
0
votes
1
answer
48
views
Aspnet Entity Data Model wont work as expected
To start with I'm really new into developing with C#, ASPNET, and MS SQL so perhaps I'm just missing a simple point here or missunterstood a basic concept so please have patience with me :)
I'm Using ...
0
votes
0
answers
639
views
Getting null values in asp.net mvc model when passing values through angular js
I have created model in asp.net mvc with constructor to create new guid id for ID field which inherits from base class. Now i pass values for two parameters of the model other than ID from html page ...
1
vote
2
answers
3k
views
'' Unable to load DLL 'mfplat.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)"
Here I used the below code for converting a wav formatted audio file for removing unwanted noise and better quality. This code works great in local host.. but while code run in IIS server, I got an ...
1
vote
0
answers
73
views
DefaultControllerFactory.RequestContext replacement when migrating from MVC1 to MVC2
I am migrating an old 3rd party project from MVC1 to MVC2, which I am not very familiar with. One of the documented breaking change in MVC2 is "Changes to the DefaultControllerFactory class break ...
2
votes
1
answer
3k
views
FileContentResult and international characters in the file name
I am using this code to return the file to the client
return new FileContentResult(Encoding.UTF8.GetBytes(sb.ToString()), MimeType)
{
FileDownloadName = String.Format("{0}....
0
votes
1
answer
881
views
Accessing Data attribute of html input control in MVC2 controller
I am submiiting a form from view which contains input field with specific data attribute
<form>
<input type="text" data-user="001" name="mytext" />
</form>
this from is submitted ...
4
votes
0
answers
1k
views
ASP.NET MVC Getting Error 504 after 10 minutes of File Upload
I have an ASP.NET MVC2 Web application, working with SQL Server 2008 R2, managed by IIS 6.2. I have a functionality where one particular admin needs to upload about 5000 documents, which then get to ...
0
votes
1
answer
867
views
Open Modal Pop Up in Page Load MVC2
I am new to MVC. The project that I am working on is on MVC2. The current requirement is to open a modal popup after login. Basically after successful login, the user will be redirected to a landing ...
1
vote
2
answers
6k
views
The view '~/Views/Login/Login.aspx' must derive from ViewPage, ViewPage<TModel>, ViewUserControl or ViewUserControl<TModel>
So I am getting this error on ASP.NET mvc2 solutions that used to work fine. I had to install Visual Studio 2012 and was running low on disk space, so had to manually uninstall some Visual Studio 2010 ...
-1
votes
1
answer
1k
views
ASP .NET MVC 5 Video Conferencing
I know this question has been asked many times here but seems to be very old. Can you please help me to understand what are best approach ASP.NET MVC have to integrate video chat/conference in my ...
3
votes
0
answers
859
views
MVC Action called twice
I have a MVC Action Method which is being hit twice if the request takes time to complete. On checking chrome console network log and fiddler, the request is being sent only once from the JS.
In the ...
0
votes
1
answer
289
views
Compile ASP.NET MVC2 on Team City Build server
I have an old MVC2 project, which I am trying to move from an old cruise control CI server to our current TeamCity CI Server.
I'm getting screeds of build errors of the form:
Models\State\...
1
vote
0
answers
146
views
Controller can not serve request simultaneously
I want to convert video file using FFMPEG at server side which is long running process. I decided to send AJAX request to server so conversion process should run parallel. But my controller is serving ...
1
vote
0
answers
388
views
Sending Large file after converting to json to Action in MVC controller
I am reading a file in bytes using ReadAllBytes() method. Then convert these bytes to base64. Then send this base64 string as a part of JSON. On server side (which is MVC action) I receive the JSON ...
0
votes
1
answer
26
views
Query String Formatting not working in MVC2
I am trying to create a url with query string in MCV application
Here is the code
<%= Html.ActionLink(Resources.Strings.SignIn_lbl, "SignIn", "Account", new { lang = ViewData["user-language"] })%...