Questions tagged [asp.net]

ASP.NET is a Microsoft web application development framework that allows programmers to build dynamic web sites, web applications and web services. It is useful to use this tag in conjunction with the project type tag e.g. [asp.net-mvc], [asp.net-webforms], or [asp.net-web-api]. Do NOT use this tag for questions about ASP.NET Core - use [asp.net-core] instead.

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

Migrating RouteData Usage from ASP.NET to Blazor MAUI: Handling 'Page' Definition Issue

I'm facing an issue with the following code in Blazor: obj_arv.isi = Page.RouteData.Values("idi"); This code works well in ASP.NET, but when I try to use it in Blazor MAUI, it gives an error ...
Mohammad Taha Moghaddasi's user avatar
0 votes
0 answers
9 views

How to read the string values of multiple Language class files , Razor pages .net-core 7.0 frontend?

1.Explaination I have the login page, which is in English. I have created an Italian language class where i have inserted the public string translations. If i want to call only the italian language ...
Fillo's user avatar
  • 171
-1 votes
0 answers
11 views

Installation error on Microsoft Visual Studio Community C# 2022 version 17.8.3

Cannot install Microsft Visual Studio Community 2022 version 17.8.3 error appears Failed to install Microsoft.ClickOnce.BootStrapper.Msi Download Packages: Visual Studio Core Editor ASP.NET and Web ...
Эльнар Гурбанов's user avatar
0 votes
0 answers
8 views

Centralized Condition Check for Cancelling Hangfire Jobs in One Instance While Allowing Others to Proceed

I have a standalone application with multiple instances, and Hangfire is used for background job processing. In a specific scenario, I want to perform a centralized condition check before executing ...
ArminSharifi's user avatar
-2 votes
0 answers
14 views

get data from QR code to controller mvc core 5 c#

I need to pass data from js script to controller when web read a code (scan.content) <section class="scans"> <h2>Scans</h2> ...
yahya labeeb's user avatar
0 votes
0 answers
9 views

How to update user profiles of 2 classes inheriting one same class

ApplicationUser inherits IdentityUser class of ASP.NET Core Identity with some build-in properties. public class ApplicationUser : IdentityUser { [StringLength(450)] public string? Address ...
JackieChain's user avatar
-1 votes
0 answers
15 views

Dotnet server in ec2 and postgress RDS connection timeout issue

I have a dotnet server in a AWS EC2 mechine that connect postgress RDS, after 1 hour if the system is not in use then the connection pool between EC2 and RDS getting timed out, i have set maxPoolSize ...
bibin antony's user avatar
2 votes
1 answer
24 views

Is it possible to enable third party sites to embed my webpage that is rendered on client-side?

I have an ASP.NET core razor page that is mostly rendered client-side using JavaScript. That means, as soon as the page loads, I call my render() function. The function involves cloning the content of ...
kylie's user avatar
  • 33
0 votes
0 answers
30 views

Is the CreateScope from IServiceProvider thread safe? [duplicate]

I've got a code snippet that looks a bit like this: // Program.cs services.AddScoped<IMyService, MyService>(); services.AddSingleton<SingletonService>(); // SingletonService.cs public ...
Luandersonn Airton's user avatar
-1 votes
0 answers
16 views

How can I save my Refresh Token to database on .Net7

I want to save my Refresh Token but its not work. I am asssigning string.Empty on user model and I am working on when user logged in update to database. I think refresh token generator is working fine ...
Fatih Demirbaş's user avatar
-1 votes
0 answers
21 views

Why I can't see ApiController's public methods and how can I fix uri?

I am using Unity Engine and I created a apı controllor for saving game data to there.I solved this system a little more, but now I encountered another problem. The problem is that I cannot see the ...
Recep Şamil's user avatar
0 votes
1 answer
45 views

Jquery Ajax Call is not working in Asp.net

I have searched many solution but nothing worked. I am doing just a simple Ajax call using Jquery in Visual studio 2019 but my code is not hitting Ajax call. Here is my code <script src="...
Shaiwal Tripathi's user avatar
1 vote
1 answer
74 views

minimal docker for ASP.NET Core

I can build a simple REST API endpoint with ASP.NET Core: $ rm -rf PPP && mkdir PPP && cd PPP # <--- make sure dir is empty $ dotnet new web 1>/dev/null $ dotnet run Building... ...
OrenIshShalom's user avatar
0 votes
1 answer
53 views

Using custom user model with .NET 8 Identity API Endpoints

I am using new Identity API endpoints form my asp .net core api project but I would like to use more custom properties for application user. My user class look like this: public class ApplicationUser :...
Piotr Apriasz's user avatar
0 votes
1 answer
37 views

Access Denied when Creating Folder on Remote Server via IIS 10

I have a web application deployed on an IIS server with the domain name "XXXXXX082.cs.net" The application, when a user submits a form, attempts to create a folder on another server, "...
Snooper_A's user avatar
  • 107
1 vote
0 answers
18 views

Index was outside the bounds of the array. Using PDFStamper and AcroFields to check a CheckBox, but it only works for one out of two PDFs

I am not sure why this issue is only happening for one PDFs. I have an ASP webpage set up to take information from Textboxes and such that a user inputs then copies them to a PDF template that I have ...
SALXAPHONE's user avatar
0 votes
0 answers
14 views

'System.InvalidCastException' when reading in from database, not a problem for a different field? (React)

This is a React app with the Asp.net. The issue concerns a C# controller and a SQL database. So I have a file that reads in a bunch of info from a database into a controller. Right now, only uses a ...
webstergem's user avatar
0 votes
0 answers
15 views

Move folder to other folder programmed by ASP.NET MVC 5

When I moved ASP.NET MVC 5 project folder from D:\EAMser\EAMser\EAMser to E:\EAMser, the views are not properly linked with their respective controllers. When I compile the page, the URL generated is ...
Abdullah Al-Mohammadi's user avatar
-2 votes
0 answers
24 views

How to have multiple .ASPX files per website? [closed]

Problem upgrading large internal website: Compiler update from VS2005 to VS2017. Successfully converted small websites from VS2005 to VS2017 One large internal website has 14 .asp subpages invoked via ...
PDFScripting's user avatar
0 votes
0 answers
12 views

One ASP.NET Web Service Cannot Get User.Identity.Name. The Other Web Service is OK

I need to convert an old ASP.NET application from Windows-XP era to Windows Server 2022. The program itself works fine when the server part and the client part both run in the same computer. But as ...
Jay C's user avatar
  • 141
0 votes
0 answers
18 views

Creating Middleware in Blazor WASM To Capture Page Events

I have a Blazor WASM Core Hosted Application (three projects: Client, Server, Shared) using .Net 7. I am trying to create an audit trail feature in my Blazor WASM Core Hosted Single Page App. Ideally,...
jason's user avatar
  • 3,523
0 votes
1 answer
46 views

.NET C# - How to sanitize the required error messages from ViewModel?

I have a question as regards to the handling of error messages in a form which I created. Whenever the user doesn't fill out the information will be stored in here ModelState.Root.Children. To iterate ...
Oris Sin's user avatar
  • 1,079
-2 votes
0 answers
28 views

The category list is not loaded correctly in TagHelper [closed]

This Tag Helper created the above code But the li tag that I selected must be outside the upper li tag and the lower ul tag must be inside the li tag.
AmirDashti's user avatar
0 votes
1 answer
23 views

Can't solve index.js?

I created a common angular + asp.net app and hasn't changed anything. But when I try to run dotnet I get this message I have the latest version of Angular, DotNet, Npm, Node Module not found: Error: ...
ParnayaBylochka's user avatar
0 votes
0 answers
21 views

Thread Sleep in Kestrel

I'm playing with asp.net core web api project and I wanted to test few things. One was to artificially extend execution time of one controller endpoint. I used: Thread.Sleep(10000). I'm using ...
beseus's user avatar
  • 41
0 votes
0 answers
42 views

Instance of model is not found

I want to pass instance of the model but it has an error:cs9035 at return View(new TransactionModel()). error:cs9035 public async Task<IActionResult> AddOrEdit(int id=0) { if (id == 0) ...
ray's user avatar
  • 23
0 votes
0 answers
37 views

Content Security Policy error in ASP.net forms

we are trying to implement CSP in asp.net forms. Adding all the hash to CSP header resolves most of the issues. But we are facing some inline style issues. In aspx page we have label like shown below ...
sona's user avatar
  • 11
-2 votes
0 answers
23 views

Initializing a property vs Getting it in C# [duplicate]

New to C#, trying to understand few things here, In a class I'm initializing hostUrl the following way, public string hostUrl = ConfigurationManager.AppSettings["hostUrl"]; But I can also ...
Ajay Managaon's user avatar
0 votes
1 answer
56 views

ASP.NET Core MVC application light/dark theme flickers on every page reload

I created an ASP.NET Core MVC web application and I added var colors in .css which I change via this JavaScript code. Every time the page reloads there is a small(few milliseconds) noticeable flicker ...
Richard's user avatar
-1 votes
0 answers
22 views

Npgsql.NpgsqlException (0x80004005)

I was given the project source . Net core C# and I could not refuse so you need to gain experience Experience with dotnet I have little When you start docker from the image appears docker run ...
Алексей Барышев's user avatar
0 votes
1 answer
48 views

Visual Studio and MS Access connection problem

Problem is: I can't connect my MS Access database to my Visual Studio ASP.NET code. Before I will explain the problem, my PC is 64 bit, I am using Microsoft Visual Studio 2019, and MS Access 2016 (of ...
Omer's user avatar
  • 1
0 votes
0 answers
18 views

SSRS Not Displaying Pictures from SharePoint On-Premises

Lately I have been working on a solution that would allow .rdlc files from an ASP.NET Webforms page to display images that are stored in a SharePoint On-Premises server that runs separately from the ...
Freerey's user avatar
  • 172
-1 votes
0 answers
26 views

How to call an aspx page from angular application?

I need to call an aspx page from my angular application. Need to show aspx page as part of my angular application. Is there any way to do it?
Rabia Basri's user avatar
0 votes
0 answers
32 views

ASP.NET MAUI Request.QueryString

I am building a asp.net maui app that uses a webview. I am trying to capture the Request object when the user navigates in the website. My first question is if this is even possible? I have tried ...
Scott's user avatar
  • 1
0 votes
1 answer
20 views

asp.net 4.7 web api not handling routing correctly when deployed

There is a reason why we had to go with asp.net web api for the time being and not going to look into core at this time. We deployed to our test server and we're getting a strange issue with the ...
James Jackson's user avatar
-1 votes
0 answers
47 views

SyntaxError: Invalid left-hand side in assignment Error on my Project

this is my HomeController.cs. i am using Microsoft.ClearScript.V8 library and when i run this code there get an error in "engine.Execute(additionalJson)" this line. public IActionResult ...
Om Makwana's user avatar
1 vote
0 answers
50 views

Angular and ASP.NET error, can't launch the webpage

I wrote a simple ASP.NET Web API. Then in cmd, in typed ng new and Angular files were created. I opened the folder in VS Code and typed ng serve --open in the terminal. I have the latest Angular, npm, ...
ParnayaBylochka's user avatar
0 votes
0 answers
16 views

ej2 synfusion ASP.NET conditional column template if condition not working for button

<script> const email = '[email protected]'; const email1 = '[email protected]'; const comparison = email.localeCompare(email1, undefined, { sensitivity: 'base' }); </script&...
Prithvi Kp's user avatar
2 votes
1 answer
40 views

Standard ASP.NET logger LogError to stderr

Is it possible to configure the ASP.NET Core default logger to log error level logs to stderr? This is my configuration: builder.Logging.AddJsonConsole(options => { options.IncludeScopes = ...
beseus's user avatar
  • 41
0 votes
1 answer
31 views

.net 8 identity login with custom login endpoint

In .net 8 i understand that .MapIdentityApi and .AddIdentityApiEndpoints are added. The issue is that they add a bunch of things i don't want. For example you are not allowed to register, only admins ...
Simon's user avatar
  • 1
0 votes
0 answers
16 views

Uncaught TypeError: Illegal invocation : selector-engine.js:41

I recently upgraded my ASP.NET MVC application to latest bootstrap and jQuery versions. I get the following error when loading up a partial view in a modal. Screenshot of error: https://i.stack.imgur....
Usama's user avatar
  • 1
0 votes
0 answers
37 views

HTTPRequestException: "Connection refused" when connecting to localhost API

I'm facing an issue with my ASP.NET Core application where I'm getting a "Connection refused" error when trying to connect to a localhost API. The specific error is: System.Net.Http....
omertascan's user avatar
0 votes
0 answers
21 views

How should I get C# unit test Stub and Shim work with abstract class?

I'm trying to test an abstract class. The goal is to make an abstract method of and an abstract class return some default value. To be more specific, I'm trying to get the GetItemLinqQueryable method ...
Tanny Xie's user avatar
0 votes
0 answers
17 views

Facing error while copying a file from one dir to another in ASP.NET

string tempKYCFolderPath = "~/Attachments/KYC/KYCTemp/"; string zipfolder = tempKYCFolderPath + "Userdata/"; DirectoryInfo tempPoposalFolder = new DirectoryInfo(HostingEnvironment....
DHRUV Mistry's user avatar
0 votes
1 answer
58 views

Fatal error encountered during command execution, i dont sure is command problem or connection

this is the code behind and now is the problem of while submit and update to sql have a problem. And i dont sure where the problem is it protected void Page_Load(object sender, EventArgs e) { ...
wengsiang ng's user avatar
1 vote
1 answer
21 views

Publishing issue Microsoft.NET.Sdk.Razor.StaticWebAssets.targets(593,5) MSB3026

I am facing a strange issue while publishing a site. The site is already published and I am just trying to update it. I am using the same publishing profile which worked perfectly well so far just 2 ...
somnath's user avatar
  • 41
0 votes
0 answers
21 views

Session values sometimes null in HttpHandler

I have an ASP.NET page that calls an HttpHandler which sets a Session value. Then the page redirects to another page. That second page calls the same HttpHandler to get user name from the Session. ...
unqualified's user avatar
0 votes
2 answers
39 views

Have an ASP.NET endpoint accept a request with a JSON object of unknown type in it

I would like to accept an object of a known type where one of the properties is simply a Record<string, any>. Currently the only way I can get this to work is to force my client to JSON....
kamii's user avatar
  • 237
-1 votes
0 answers
27 views

Looking for a better Double-Submission Solution [closed]

The following code solved an issue that occurred using a session variable, but then it caused another problem. Problem A (Critical): Users A & B were participating in a group discussion. Both ...
TonyV's user avatar
  • 1
-3 votes
0 answers
21 views

OWASP - Visual Studio Security 2022 [closed]

I believe the security tab was deprecated a while ago. I am interested in adding OWASP security to .Net C# ASPX projects. What has taken the place of ClickOnce Security Settings checkbox or is used ...
John G Hedstrom's user avatar

1
2 3 4 5
7483