Quantcast
Channel: ASP.NET Core
Browsing all 9386 articles
Browse latest View live

How can I create a new controller dynamically after building the project?

I have made an API controller by asp.net core to communicate with a third-party APP.When the user authorizes my API in the third-party APP, my API needs to provide a brand new controller and URL to the...

View Article


Solution Architecture and Referencing

Evening All,For the longest I've worked in VB with Visual Studio, recently I migrated to C# which was interesting.  But now I want to learn more about ASP.Net Core.My question is as follows, normally i...

View Article


Returning a mp3 file trough File Action results, stops after being played for...

I have an action that returns mp3 file as below :  var memory = new MemoryStream(); using (var stream = new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)) { await...

View Article

smtp virtual server question

Hello,I have an asp.net core web app, It is working on the IIS 8 windows server 2012. I need to send an e-mail to one of the action controllers. I installed the SMTP server. Did some googling and made...

View Article

How do i improve ttfb for my website

Hello, I develop the web app on asp.net core mvc and the database is huge on it. So i checked in inspector of browser so the first touch on website browser is taking so long time. My website is...

View Article


WebApi using Token

Hi  I have Visual Studio 2012. I want to develop Restful Api using token. Is there any tutorial or link available.Can Api be developed in VS 2012 using Asp.net core.Thanks

View Article

how to change a asp.cs file to aspnet core razor

I am changing over to aspnet core razor from asp net web. It is a magazine that will be in the www root as they are JavaScript pages.  How do I change a default aspx file to the razor format . I can't...

View Article

Image may be NSFW.
Clik here to view.

Highlighting table cell depending of value

I have a controller, he takes four values from four dropdowns (vehicle1, vehicle2, etc) and returns selected value to ViewBag.[HttpGet]publicIActionResultCompare(int vehicle1,int vehicle2,int...

View Article


When using SaveChangesAsync() my other code stop execute

I have problem and i think its a deadlock and i cant resolve the problem. I know there simular problem discuse but i need help. When i try to saveChange on productReposotory it stuck and dont execute...

View Article


How to override HandleUnauthorizedRequest in ASP.NET Core?

I'm migrating my project to asp.net core and I'm stuck in migrating my CustomAuthorization attribute for my controllers. Here is my code.public class CustomAuthorization : AuthorizeAttribute { public...

View Article

bulk import into sql using ASp.net

im having a issues create a problem in asp.net C# that will import csv into SQL I used this tutorial but im still having issues, can some please help me creating a simple application that can import a...

View Article

Is it possible to use the tag helper to generate a hyperlink to a Razor...

Is it possible to use the <a> tag helper to generate a hyperlink to a Razor Component which has a @page directive? This is in a mostly Razor-Pages project which uses Server-Side Blazor and has...

View Article

Value of html Text column is not get updated from javascript , Please help

I have the following HTML@model ModernTyres.GO.Common.Models.EmpDocumentModel<input type="text" name="Claim" class="form-control" id="TxtClaim" asp-for="Claim" data-role="text" disabled...

View Article


checking of correct datetime format is not working

HiI want to check the given string value is correct  format for converting into  datetime  variable before to convert into date time variable.  But the value '05/03/2020 8:15:00' is showed as incorrect...

View Article

IdentityResult IdentityError

Hi - when creating a user by calling "UserManager.CreateAsync(user, password)", one can receive an error (or several) in the returned IdentityResult.I want to map these errors to specific input fields...

View Article


Razor table add/remove data

Hi,I have a cshtml page as follows:<form class="needs-validation" novalidate><div class="container-fluid"><div class="row"><div class="col-md-6"><div class="row"><div...

View Article

Save Form Array Data at Once into Database

I have a form with multiple data, that i want to save to the Database at Once. I am new to C# but i have been able to do this with PHP in the past. See the form  in the table below:<tbody> @{int...

View Article


how to set select option value as "Y ' from controller to view Select dropdown

I am trying to set the value 'Y' into a select list item from controller. Please can I ask your help to get sorted ? with Many ThanksI have the following modelEmpDocumentModel { [NotMapped] public...

View Article

Instrumentation Profiler in CoreCLR(.Net Core) - Ways to get HttpContext in...

I am trying to Instrument .NET Core web applications that runs on .NET Core 3.1 using CoreCLR Profiler. When I allow injecting the code into the Web application's method the helper assembly(.NET...

View Article

WebAPI: why does it use MVC namespace and classes?

Hello,I'm pretty new to the WebAPI world.So far I've read some great articles on how to create and call WebAPI; however, I'm still a bit puzzled about one thing: even if we create "just" a WebAPI, not...

View Article
Browsing all 9386 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>