The ASP.NET MVC Framework is a Microsoft web application framework that implements the model-view-controller (MVC) pattern. The latest release of the framework offers REST-style web services development capability, also known as Web API.

learn more… | top users | synonyms (7) | asp.net mvc jobs

1
vote
1answer
13 views

ASP.NET MVC Cannot find user

I have setup an MVC website with Forms Authentication. Basically, here is the code that has error which says that there is no such user '2010108703' but still, it is logged on (we can see there is a ...
0
votes
0answers
15 views

Data Annotations using Regular Expression fails on client side

The regular expression below allows characters (from different locales) and apostrophes, dashes, and periods. string test = "Abcede"; string test1 = "Abc2ede"; string test2 = "Abce$de"; string ...
0
votes
2answers
8 views

Getting error while creating controller in Asp.net Mvc with tdk

I have a problem with my sintak controller on asp.net mvc, using Toyota.Common.Web.Platform; using FAMS.Models; namespace FAMS.Controllers { public class HomeController : Controller { ...
0
votes
0answers
5 views

Convert LLBLGen model class to View Model objects?

I do not think I worded the title correctly. I am trying to return results to populate a view. the error message I get in the browser console is "A circular reference was detected while serializing ...
0
votes
0answers
44 views

How to view the user and there roles in a razor view from asp.net mvc5 identity table

i'm building an mvc5 application that contain a companies and mangers and the mangers (users) stored in the AspNetUser table and the role manager in the AspNetUserRoles table and i need to list the ...
0
votes
0answers
6 views

Error: Cannot read property 'apply' of undefined with Automatic Image Montage with jquery

I'm using Automatic Image Montage with jquery in ASP.NET MVC. I fixed it run the fist image nice but when I use Scroll down enter code here var BlockNumber = 2; //Infinate Scroll starts from ...
0
votes
1answer
19 views

how to return results that have a date of yesterday and before

I am returning results using the LLBLGen adapter model. using break points because I cannot get them to populate the kendo grid yet, I can see that they are all coming back. However I need to only ...
1
vote
1answer
11 views

Cannot set cols in Asp.net MVC5 in TextAreaFor

I am using this code but cols=20 keeps getting HTMLed. I have seen other solutions but they do not seem to be using syntax like "new { htmlAttributes = new { etc". I am new to MVC and this syntax was ...
0
votes
1answer
12 views

How to package ASP.NET vNext projects and run elsewhere?

I know that in an ASP.NET vNext project directory (where project.json exists), we can execute k run (or k web depending on the configuration/code) and KRuntime runs/starts the application/server. I ...
0
votes
0answers
4 views

When preparing models for MS SQL Compact Edition why use native referenes and ID keys at the same time to associate objects/entities?

I follow this tutorial for ASP.NET MVC4: http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-4 Author prepares classes for creating database and putting its instances into this ...
0
votes
0answers
7 views

entity framework database issue - A network-related or instance-specific error occurred while establishing a connection to SQL Server

A network-related or instance-specific error occurred while establishing a connection to SQL Server The main page loads fine, but the error occurs when I try to goto Account/Register or ...
0
votes
1answer
20 views

Adding disabled attribute to a button using Razor

I have a bool in my ViewModel called DisableNextButton and I would like to use it to disable a button in my view. I should add that this button lives inside an if statement. Ultimately, I'm trying to ...
0
votes
0answers
16 views

mvc route cannot find conroller

I am following through with plural sight video messageboard app. it was working fine and suddenly routing is not finding the controller; i put break point on maproute function and it gets hit but ...
0
votes
1answer
17 views

How to skip ASP.Net form authentication of parent website on some ASP.Net MVC action of child website

I have ASP.NET MVC website which is hosted in a child directory of other website which is protected with form login like below: <domain>/parent --asp.net 2.0, with login form (standard ...
1
vote
1answer
20 views

The changes not updating on server

I have build MVC 5 application which works fine when running via VS. When I publish it to the server first time it also works. Now I have made few correction to my css file and publish whole project ...
-2
votes
0answers
21 views

Proper creation of Web service? [on hold]

How to create a web service working with the database and with different api. To maximize speed and expandability functional. сreate ASP.NET MVC сreate a WCF service use WCF and ASP.NET MVC And ...
0
votes
0answers
15 views

What's the difference between creating a Windows Azure Cloud Service Web Role and a MVC Website with Windows Azure remote resources (web site)?

I am trying to understand the differences from the Azure perspective between creating new websites through Windows Azure Cloud Services (web role) and creating a web application with Windows Azure ...
0
votes
2answers
9 views

How to specify a RedirectToRouteResult

My existing MVC code contains an action routine something like this: [HttpPost] public ActionResult Register1(SomeViewModel model) { return RedirectToAction("Register", new { p = model.PageNumber ...
0
votes
1answer
14 views

Multiple forms on the same view (asp.net mvc)

Im trying to make a Wizard registration form (multistep registration) in asp.net mvc. I have 2 methods on my controller (Login and Register) because I dont want that the URL changes. Well, in the ...
0
votes
0answers
11 views

Populating Grid with data from LLBL adapter model

I have been assigned with populating a grid on page load with data through a LLBL adapter model. I am able to retrieve the results as I can see them when i set a break point. The end result of my ...
2
votes
2answers
31 views

Is the antiforgery token function not safe?

Got one question about Mvc antiforgerytoken In mvc razor page, we can place code: @Html.AntiForgeryToken() inside the form, it will generate a token, this token will be fill into a hidden input field ...
0
votes
1answer
12 views

Kendo Grid and one row of JSON data and a single row of data

I feed JSON results to My Kendo Grid; seems like when I have one row of data, the grid can't function? Following works: <DocumentElement> <ResultXml> ...
0
votes
1answer
15 views

Prevent EF from adding new child objects instead of just association when inserting new parent object?

I have the following: public int CreateExercise(Exercise newExercise) { db.Exercises.Add(newExercise); db.SaveChanges(); return newExercise.ExerciseId; } Where ...
0
votes
1answer
17 views

Bind from Razor to Knockout?

I am using KnockOut JS and MVC. How do I bind the data from @ RAZOR view to my databind in KO. I tried doing this but did not return anything at the CONTROLLER. I would like to post the row to the ...
0
votes
1answer
14 views

Minification failed. Returning unminified contents

I have made my first website using MVC 5 which works fine on my local machine but when I publish it to the server some of the css not loading correctly. /* Minification failed. Returning unminified ...
-1
votes
1answer
17 views

Getting error for @dropdownlistFor".. item that has the key 'product' is of type 'System.Int32' but must be of type 'IEnumerable<SelectListItem>

The ViewModel is: namespace MockBDPWorkflowTestApp.ViewModels { public class WorkFlowTestViewModel { public string processInstance { get; set; } public string mail { get; set; ...
-1
votes
2answers
23 views

Invalid Arguments in Razor DropDownList

I'm receiving an error that a dropdownlist has invalid arguments. What's odd is that I have a similarly structured dropdownlist that is working fine, with no errors. The drop down with the error is ...
0
votes
2answers
27 views

WebAPI not serializing inherited class on POST?

Here is my controller method: [System.Web.Http.HttpPost] [System.Web.Http.Route("api/exercise")] public HttpResponseMessage CreateExercise(ExerciseDto exercise) { Here are my classes: ...
0
votes
0answers
9 views

MVC5 application communicating with other application (php) application

My MVC application is called from other application (might be php or java). In my mvc5 application, I have an action with parameters (which works as a query string) so that other applications can call ...
2
votes
0answers
15 views

Stored Procedure for finding N Level Child List

Recently i came across one problem of finding N Level Child from tables. Let say we have following list of tables: Table: **Country** PKCountryID CountryCode CountryName Table: **State** PKStateID ...
0
votes
0answers
14 views

what is better multiple tables or one table with full text search

I'd like to use full text search in entity framework 6 with table valued functions (I think TVF is the correct way to use full text search in EF6 but haven't implemented it yet?) in a MVC application ...
0
votes
1answer
13 views

Underscore in URL not working with attribute routing

The following problem occurs in the Visual Studio 2013 IDE. It seems to work correctly when deployed to IIS. I have an attribute route that looks like this: [Route("SiteCode/{sites:alpha?}")] ...
0
votes
1answer
23 views

REST api complex type parameter doesn't have properties populated

I'm trying to call a REST api via POST and passing in my parameter as a json array (username and password). The object is instantiated, but the properties are not. Where am I going wrong? [HttpPost] ...
0
votes
1answer
58 views

MVC Exception: Ambiguous between the following action methods

I am getting this error. The current request for action 'Login' on controller type 'AccountController' is ambiguous between the following action methods: System.Web.Mvc.ActionResult ...
0
votes
0answers
22 views

How to store ViewData in TempData when not using Sessions?

I recently learned that TempData for MVC is backed by Sessions by default, which is a terrible idea if one ever intends to have a web farm... I attempted to implement Brock Allen's Cookie based ...
0
votes
1answer
30 views

Maintain state of the object for same browser session

Following is my ASP.Net Web API controller code. Here as you can see there's a private class object, BL, that is used and both the Get methods implemented. For the first method ...
0
votes
0answers
9 views

how to use FetchEntityCollection instead of FetchEntity

I am trying to populate a kendo grid with data through the LLBL adapter. I am able to see a single result using a break point when I pass in a PK but I need to return the entire collection of results. ...
0
votes
0answers
28 views

ASP.NET MVC 4 Web.config Error

I am sure it is something very simple that I am missing. When I run my ASP web app it errors out in the browser with the following: Server Error in '/' Application. Configuration Error ...
0
votes
1answer
21 views

ajaxSetup beforeSend only being called the first time button is clicked

I am using ASP.Net MVC and jQuery 1.8.2 I have a form with a button that calls this javascript when it is clicked: $(function () { $('#SearchButton').click(function () { var data = ...
0
votes
2answers
31 views

AngularJS - Radio buttons in a loop?

We are using ASP.NET MVC and AngularJS (Newbie on Angular) and I'm really stuck with bloated html. I have a bunch of radio button choices that are true/false but are bound to a nullable (bool?) This ...
2
votes
0answers
27 views

Fire and forget call request timeout value

Using the following code for fire and forget call, what should be the appropriate timeout value for a HTTP call to a remote service. I do not care about the response. But there are times in the day i ...
0
votes
0answers
11 views

MVC5 razor DropDownListFor not displaying Spanish characters

I need to display special characters in a DropDownListFor. My approach worked well in HTML <select>, but I don't know how to make it work with Html.DropDownListFor. In my Controller Action I ...
0
votes
1answer
28 views

Enabling Disabling controls with Javascript in Asp.net

I have a fileupload control, Calendar control and a Textbox control in asp.net, which should be enabled or disabled on selection of a check box. I have included a javascript function to perform the ...
0
votes
1answer
15 views

How to fix infinite loop with Asp.NET Identity Login using AuthorizeAttribute?

I am trying to set up Asp.NET Identity, and it seems to be set up correctly, but when I place the [Authorize] attribute on my BaseController class, I get an infinite loop redirecting to the Login ...
0
votes
0answers
8 views

C# MVC google+ api person.Emails is Null

I am using the Google+ API to authenticate and log in users. I am able to get the First and Last name and Google id but the email field comes through as NULL. ps = new PlusService( ...
0
votes
0answers
11 views

How to plug my Autofac container into ASP. NET Identity 2.1

I have been looking into the new features of the new version of ASP.NET Identity 2.1 and one of its enhancements is the new IoC features integrated into the OWIN Middleware. One of the sentences that ...
0
votes
1answer
20 views

'AllowAnonymous' could not be found

Everything worked fine until I installed (Package Manager Console) the postal package, then uninstalled and installed an older version. Now I get an error where it previously was not. Error: The ...
0
votes
0answers
16 views

unable to change property value in httpcontext.current.user

Unable to change property value in httpcontext.current.user. When user logged in i getting user details and stored in HttpContext.Current.User. Below is my code. FormsAuthenticationTicket authTicket ...
0
votes
2answers
21 views

In asp.net mvc when updating data how does one know that the data beeing manipulated does really belong to the user making the call?

In asp.net mvc when creating, updating, deleting data how does one know that the data beeing manipulated does really belong to the user making the call? [Authorize] [HttpPost] public ActionResult ...
0
votes
0answers
13 views

Unable to set CurrentThread.CurrentCulture in MVC Controller Action

In the GET of my Controller Action I have the following code: string SelectedLanguage = "es-MX"; System.Threading.Thread.CurrentThread.CurrentCulture = ...