Questions tagged [asp.net-mvc]

The ASP.NET MVC Framework is an open source web application framework and tooling that implements a version of the model-view-controller (MVC) pattern tailored towards web applications and built upon an ASP.NET technology foundation.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Login request redirects to Account/Login?ReturnUrl

So basically I have this simple form in my index page: using (Html.BeginForm("ChangeUserName", "Manage", FormMethod.Post)) { @Html.AntiForgeryToken() <input name="newUserName" value="@...
0
votes
1answer
12 views

How to make my bootstrap carousel work witch ASP.NET Razor

i got a problem so i came here for some help, i got some pictures that i want to show like a carousel, i got the carousel working when i use stockphotos from the internet, but when i use photos i got ...
0
votes
2answers
11 views

Bootstrap 4 tooltip style only works in the first section

I have a table that at first only shows 10 rows and here the tooltip displays correctly , but if I change to the next page or display more entries the tooltip doesn’t work correctly in the next ones .
0
votes
0answers
8 views

Azure Active Directory ReturnUri is being ignored for IIS child application when returning from Microsoft login

The Backstory I have an existing ASP.NET MVC5 app that I am wiring up to use oauth2/Azure AD authentication. I actually have this already working in multiple environments (dev/qa/prod/localhost). In ...
0
votes
1answer
61 views

Any idea how to fix this so I don't get a Javascript TypeError: right-hand side of 'in' should be an object, got string

Have a view with 2 drop-downs the 2nd one disabled by default. When selection is made in first drop-down, it is supposed to both call an action in my controller to retrieve list of values for 2nd drop-...
1
vote
0answers
11 views

nuget package causing HttpRequest.GetBufferlessInputStream error

I've got an ASP.Net MVC project using net 461 that I added a nuget package (that I developed) to and when I attempt to do an ajax call I get "This method or property is not supported after HttpRequest....
0
votes
0answers
9 views

How can we pass list of spotcolor values in PDFLib set-graphics-option?

I have integrated PDFLib library in the c#.net code and I have a requirement to set multiple spotcolor values in set-graphics-option method. I tried the below code but it didn't work... Appreciate ...
0
votes
0answers
8 views

How to properly email a URL via sparkpost with single page applications

I have a single page asp.net mvc application. I create a url programmatically and then send the email off via sparkpost. Sparkpost rewrites the URL for engagement trackings. before rewrite http://...
0
votes
0answers
16 views

Get the filename HttpContent in ASP.NET MVC with Xamarin

My aplication sends an image in Xamarin to my Web API to save the file. I would like to save the file using the filename used in xamarin not the name I put in my code. The code I use in my webAPI ...
0
votes
1answer
28 views

How to pass or copy “invoice_number” value from order table to “invoice_number” value invoice_line_item table ASP.NET MVC and SQL Server

I have two tables named Order and Invoice_Line_Items.I have a column called invoice_number in both tables invoice_number and Invoice_Line_Items.But invoice_number column in Invoice_Line_Items table is ...
0
votes
1answer
43 views

How To Add Empty Row To DataTable

I am using JQuery DataTables and attempting to add an empty row to the DataTable. I have the code below but a new empty row is not added. How do I need to re-write this so that an empty row is added?...
1
vote
0answers
5 views

Swap with preview 'Complete Swap' step restarts production slot

I have Web App with two slots for ASP.NET MVC application. Slots have equal settings. I deploy to "preproduction" slot to check couple of things and warm up application itself. I don't quite ...
2
votes
0answers
19 views

RuntimeBinderException: Cannot perform runtime binding on a null reference

I'm making a create item page, and in this create item page there is a popup modal table where we can choose the type of UoM that we want. And normally when this form is submitted with all of the ...
0
votes
0answers
14 views

Unable to hide Server information from HTTP response header

I'm looking into improving the security of our ASP.net application HTTP response headers and as part of that, I want to remove/hide the server field shown below to avoid exposing the IIS version ...
0
votes
0answers
8 views

how to publish an angular 8 app to the subfolder of asp.net application?

I want to publish an angular application in a subfolder. In the main folder, an Asp.Net Mvc web application is running. But I get error. In the attachments, you can access Web config structure, ...
1
vote
1answer
29 views

Calling Multiple WebAPI - ASP.Net MVC

I have a task to retrieve data from endpoint webapi and display it to View. The external website developers provided me with 2 endpoints. The 1st endpoint is a list of data and only has got : id, ...
0
votes
0answers
7 views

EDMX/ EF Remove Existing primary key column and add new column with primary key

I have folowwing scenario in ASP.net MVC - code first [Table("api")] public class Api { [Column("Id")] public int Id { get; set; } [Column("api_key")] public string ApiKey { get; set; } ...
0
votes
1answer
22 views

Is there any way in an ASP.NET MVC app to determine which timeout setting caused execution of a report to fail?

I have a long running report in my app which causes the request to time out, and I want to increase the time limit but I'm not sure where that limit is. I tried setting the command timeout for my ...
0
votes
1answer
32 views

File system deploy to multiple servers

I am using TFS and Visual Studio 2017. I have two servers for load balancing purposes, both servers have identical release versions(In theory) of my MVC application. The current release process is ...
0
votes
0answers
5 views

How to pass AntiforgeryToken object along with HttpPost json object in Web API to mitigate CSRF attacks?

I have a MVC web application where Html.AntiForgeryToken() is included in View() to get the request antiforgery token. Also the HttpPost Save() method is having [ValidateAntiForgeryToken] attribute to ...
0
votes
1answer
14 views

SMTP SpecifiedPickupDirectory in Azure?

I'm working on a Episerver CMS-site that is being moved to Episerver DXC, which is their cloud solution using Azure. On the site the SMTP config in web.config is use. In the test and development ...
0
votes
0answers
7 views

internal server error 500 when using axios post/get in azure web app for fullcalendar

Having trouble with get/post in axios when deployed to azure web app, everything works in local pc. axios({ method: 'post', headers: { 'content-type': 'application/json' }, ...
0
votes
0answers
16 views

Validate Image binary data for the image content having malicious data injection in ASP.NET MVC

We need to validate the image file during upload from MVC application. To validate the image, we added the image header validation logic which is working fine if user tries to upload the file after ...
0
votes
0answers
15 views

asp.net mvc: creating httpcookie by activating query string, and deleting again

Hi everyone I am currently working in asp.net mvc and having the following problem: I have been succesfull in using a query string to create a cookie that is used elsewhere in my site. It now works ...
0
votes
0answers
8 views

Sending mail successfully in localhost but don't when publish on live server like[Somee, GoDaddy]

I am trying to send mail from Gmail and it's sent successfully in localhost but when publish the website on the server didn't send mail. website publish on somee and GoDaddy hosting server. when ...
0
votes
0answers
17 views

System.Runtime.Serialization.SerializationException in .NET API [duplicate]

I am trying to send data from .net API to angular so that I wrote a simple API as mentioned bellow, In Model(Generated from entity framework): public partial class LKEmployeeData { [System....
0
votes
1answer
28 views

ASP.Net MVC return file as attachment from external API

I have an API endpoint that returns file as attachment. for example if I access www.myfileservice.com/api/files/download/123 I could download the file directly. My requirement is to use this endpoint ...
0
votes
0answers
20 views

My Controller and Area Name is same, if i want to call Default Controller Method which has action same name of Controller Inside Area

I have created One simple MVC App. I have one Controller namely HelathController. In this HealthController I have two methods namely Index & BodyMass Now I have Created One Area Namely Health ...
-1
votes
0answers
12 views

How to display multiple different pdf at one page

I wanted to display sets of pdf in one screen using MVC. Can anyone can suggest the better way to load those and share any example similar.
0
votes
1answer
37 views

Problem with DropDownlist in asp.net core mvc

I am creating dropdown(country,state and city in table in mvc, but not inserted countryname,statename,cityname and country wise state not bind the proper data all the state and city display in ...
0
votes
0answers
16 views

MVC Bundle collection browser cache not cleared for all client browser's after code changes

We are using asp.net-mvc-5 with Bundling and minification that having cache problem: (browser cached old bundle files after code upgrade in server and every client needs to delete browser cache by ...
0
votes
0answers
22 views

How can I insert user's IP_Address to database dynamically after logged-in with the help of ID(Foreign Key)?

I have a store procedures for user login which I am calling in my Data Repository code. And now I want that, when user logged-in, the IP Address and Date time of the user's system should get saved in ...
0
votes
0answers
33 views

Change selected index of DropDownList into first index while change the checkbox into unchecked mode

In my ASP.NET MVC project I have a checkbox and when I check it then a DropDownList will be appeared and it is possible that I select an item from this DropDownList(I mean an item except first item in ...
-4
votes
1answer
52 views

How to count and increase the age of the user every year using their date of birth? [on hold]

I have registration form, in which the user has to select the date of birth, every year age of the user should be increased automatically and the current age should be stored in a database. Ex: ...
0
votes
1answer
23 views

api coming twice in URL “api/AuthenticationAPI/logout”

As a convention in our project, we have named all our API controller classes as AuthenticationApiController as opposed to controller's in MVC AuthenticationController. But now when API gets invoked, ...
0
votes
3answers
29 views

Navigation bar doesn't display right when I change the bootstrap

In default bootstrap in ASP.NET MVC, the page is just fine enter image description here But whenever I change the bootstrap, what ever the bootstrap is, the navigation bar goes like this: enter ...
0
votes
1answer
16 views

Google SignIn return access denied

I'm adding external logins to my MVC app. I've successfully added "Login with Facebook" but I have an issue with Google because my callback endpoint receives access denied Here is what I've done: ...
0
votes
2answers
29 views

Create page does not get styles and does not send parameters to database in

I used Asp.netMVC and created a view but CreateView page does not get styles and does not send parameters to the database but EditView and DeleteView work. View Code Iadded CkEditors code under the ...
0
votes
0answers
59 views

How controllers handle requests in ASP.NET MVC?

I'm reading a book which says something about ASP.NET MVC synchronous request handling: The controller is being run in a web application server that processes only one request at a time and if that ...
0
votes
0answers
29 views

in AdministrationController(asp.net core) i have so many actions. it is a problem to have so many actions in one controller? [on hold]

i am working on MovieProject in asp.net core where i have movie, moviecategory, actor, director ect. in Administration Controller i have so many actions like: getmovies, getmoviecategories, ...
-1
votes
1answer
39 views

Get the values from checkboxes in ASP.NET MVC

I have this for-each loop to display (and set checked if suitable): <div class="col-lg-9 col-xl-6"> @if (Model.PersonTypes != null) { foreach (var _t in Model.AllPersonTypes) ...
0
votes
0answers
31 views

How to manage javascript libraries in ASP.NET Core MVC application in VisualStudio [on hold]

Im really confused about this. When i watch some tutorials on youtube, when new asp.net mvc project is created, basic scripts like Jquery or bootstrap are listed in nuget package manager and in ...
0
votes
0answers
7 views

Unit Testing JavaScript in ASP.NET MVC with Jasmine and Karma

I am writing a sample ASP .NET MVC application, which has karma and requirejs to test the scripts. I see below error Uncaught (in promise) Error: No tests were run. I see below error in command ...
0
votes
1answer
30 views

How to use 3 different datatables under 3 different view models in same view?

I have a view page that has 3 radio buttons. I have 3 data tables and 3 view models. When I click search, I want only one data table to display and show data - that was chosen by radio button. If I ...
0
votes
0answers
22 views

C# MVC - jquery/bootstrap not found when being renderd

I have a C# MVC project, I'm trying to render in bootstrap and jquery but once the page is loaded the scripts are not found. Here is how I am rendering them in: _Layout.cshtml: <head> @...
0
votes
0answers
18 views

How can I send multiple data from view to action data?

I have an adding product form. I try to do as wizard. Firstly, I add product detail that I have Add_Product view. After that, I get the id of the added product. With redirectToAction I send the ...
0
votes
2answers
67 views

How to handle validation error(s) Server Side when a file is uploaded

I have a form which is validated server side and if the form has invalid items, the model is returned to the View and JavaScript then highlights fields which are invalid. This is a multi-part form ...
0
votes
0answers
31 views

Project doesn`t have access to referenced project in the c# solution

I'm trying to access a method from a class which is in another project but in the same solution. The problem i face is that it keeps saying that i'm missing a reference even when i'm using the using ...
0
votes
0answers
27 views

I set environemnt variable to developmen everywhere but still I am not getting error in deatil and still it's in production mode

It's been three days I am finding solution but all in vain. I set all environment variables to development mode but still I am not getting error in details. And getting messsage tha: "Swapping to ...
0
votes
0answers
12 views

How To Create Nested Comment with Replay?

i have to create a dynamically nested comment but i can't show all replays.. Is there a right way to do this? To display all replays, i have set for-each for every replays... Model: [...