ISession Extension methods
For creating/adding sessions I am using app.UseSession(); // middleware registering services as builder.Services.AddSession(options => { options.Cookie.Name = "Session"; options.IdleTimeout =…
CS0246: The type or namespace name "ProductDto" could not be found(are u missing a using directive or an assembly reference?)
hey anyone give me the solution of this issue https://github.com/GavinLonDigital/ShopOnlineSolution/issues/1
Returning a Vector3 over an ASP.NET Core Web API returns empty JSON
I'm assuming I'm doing something wrong here but whenever I try to return a Vector2/Vector3 over an ASP API it always gives me '{}'. JsonConvert seems to be able to serialize and deserialize it just fine but not over an API. To replicate this create…
Asp.net using angular and html
I want get a leave balance of particular leave type using function "GetAllLeaveBalance()" Now i have values in registrar as How to get that value in leavetype =x.leavetypemodel.Name
Need help in Razor Pages in ASP.NET Core ( Loop )
Hi. I've Static Menu as following. I can do in html Parent Menu Child Menu <li class="nav-item"> <a class="nav-link " asp-controller="marketing"…
OData $select and $expand not working on XML response?
I have been developing an API with XML and JSON responses integrating OData, but I'm having a problem retrieving XML responses with OData $select and $expand methods, but other methods work fine like $top, $filter and $orderby etc... In JSON response…
Setting up VS 2022 ASP.Net Core Web API with Authentication working
I have been trying to get my ASP.Net Core Web API working with an AAD app registration for authentication and I'm not able to authenticate using either the default Swagger page or Postman. At this point, I'm just trying to get the WeatherForecast API…
Use API into a WebApi project
I need to call Graph API without user interaction. Users access to a Angular website through ADFS and the backend is served by .Net Core WebApi. Users ask the server to upload/download a file and the server must "self login" to Graph and do…
which vs of visual studio supports .net core 3.1 vs
which vs of visual studio supports .net core 3.1 vs
Use Multiple Type in Generic T C#
i have this interface base repo with genric type T public interface IRepositoryBase<T> where T : class { void Add(T obj); } and this interfaces heritance from the IRepositoryBase public interface IClass1Repository :…
A process serving application pool 'xxxx' failed to respond to a ping. The process id was '26636'. Event ID 5010
I am facing this error from sometime. Our application hosts multiple application pools in IIS, but this issue happens only with one/single app pool. All the app pool settings are same across the application pools. Moreover this failed to respond to a…
Web Config use
I have a typical requirement. We have several WCF services using NetHttpBinding. We are developing a new Core Web API for a new project. We plan to use the existing WCF DLLs in new web API that. one of the DLLs is data layer that uses connection…
SQL Server 2017 connection problems with Asp.Net core runtime 6.0.x
We have an application running on Asp.Net Core 3.1.x runtime. Recently the application is moved to Asp.Net Core 6.0.x runtime. After the upgrade, we are facing issue while connecting to SQL Server 2017 database when application is running from…
How return the format of the size file in datatable
Hi, In the class FilePath I've a class public class FilePath { //.. public Int64 Size { get; set; } //.. } This class is based to the View [dbo].[FilePath] in Sql The datatable is returned via…
bootstrap modal form validation with slect2
I am using partialview in modal form. In this form there is a select2 option list which working fine. But when press submit button, required fields as per model are not validating i.e. not showing error. I have used lots option from internet, but…
How to set up server variables for URL Rewrite through Appcmd for site
Hi, I am currently trying to create the rewrite URL for my site using Appcmd.exe. I have managed to create the rules, conditions, patterns as like below. system("C:\WINDOWS\system32\inetsrv\appcmd.exe set config ""Check""…
How can I run javascript codes, css files and javascript files into wkhtmltopdf in asp.net core api project?
I use the Chart.js library to draw charts, but I use the wkhtmltopdf library to convert pdf. But my javascrip codes and css codes are not working. How can I make it work?
<span asp-validation-for can not trigger if html is appended.
If I use jquery.html(""); append html <input type="text" asp-for="MyValue" /> <span asp-validation-for="MyValue" ></span> it can not validate for it.
Convert DateTimeOffset to Date format in aspnet core
Hi, In the class FilePath I've a class public class FilePath { [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy/MM/dd}")] public DateTimeOffset Created { get; set; } } This…
Dependency Conflicts after Upgradation
I've upgraded my Webform application from 4.8 .NET Framework to .NET Core 6.0. Now the main issue is that my system is not reading the .dll which were used in the older version, for e.g System.Web is unavailable in the newer version. Is there any…