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
13 views

Uncaught RangeError: Invalid array length in ASP.NET AJAX - How to Resolve?

I'm facing a tough problem with my ASP.NET web app that uses AJAX. When I press the submit button on my webpage, I'm getting an error that says "Uncaught RangeError: Invalid array length." ...
Snooper_A's user avatar
1 vote
2 answers
34 views

After saving the data to the database once, it does not save the second one

I'm pretty new to this industry. This is the Create method in BaseRepository: public async Task CreateAsync(TEntity entity) { await _db.Set<TEntity>().AddAsync(entity); ...
Dilara PINAR's user avatar
0 votes
0 answers
19 views

datatable pagination and filtering disappear after clicking imagebutton from gridview

Good day. I'm using a datatable in my program, at page load all is working fine but when i clicked the imagebutton within the gridview, the datatable pagination and filtering disappeared. Below is my ...
Onel's user avatar
  • 1
1 vote
0 answers
59 views

How to parse json with persian keys?

I have a json string that contain some keys and values.In this case key's of json is persian character like "شماره قرائت قبلی". {قطر انشعاب آب":"1/2اینچ","شماره قرائت ...
M Javad Salehi's user avatar
0 votes
0 answers
25 views

F# JsonConverter seems to be ignored in .NET7

First of all, the problem appeared once we upgraded to .NET 7. For the previous versions, both 5 and 6 the attr worked as intended. There is custom JSON converter: type RouteCheckConverter() = ...
eastwing's user avatar
  • 165
0 votes
0 answers
35 views

Can't debug in Blazor Webassembly hosted

I have an Blazor Webassembly hosted Project in which I cant debug in the Frontend. The Breakpoints just dont get hit. The project once was a Blazor Server application but was then refactored into an ...
IseySkrr's user avatar
0 votes
0 answers
46 views

Table name [Table] can't be identified by Visual Studio [closed]

I made a database for my project for ASP.NET in Visual Studio. Then I made a table however after updating the table, Visual Studio itself named it as 'Table'. Now when I'm trying to run a query: ...
Alishba Mumtaz's user avatar
-1 votes
0 answers
9 views

Could not load file assembly "crystalDeciaion web version=13.0.3500.0"

enter image description herein the.net code crystal report showing issue to download excel reports The software is showing issue of crystal reports already in my software there is crystal report but ...
shubhz_2002's user avatar
0 votes
0 answers
14 views

ASP.NET Session Cleared Online

I created a sample app (the default one), ASP.NET MVC, with one controller only: public ActionResult Index() { Session["Test"] = "OK"; return View(); } public ActionResult ...
Plexis Plexis's user avatar
0 votes
0 answers
14 views

How to keep ASP.NET Blazor WebAssembly client pages alive to prevent reloading when navigating back?

In an ASP.NET Blazor WebAssembly Client, when the user navigates away from page A (by using a browser button, a navigation menu item, etc) to page B within the same SPA, page A is disposed, then page ...
Gilles jr Bisson's user avatar
-1 votes
1 answer
49 views

Microsoft.Data.SqlClient.SqlException (0x80131904): Login failed for user

I'm working on a microservice with C# and ASP .NET Core 6 and I am trying to connect the docker image of the microservice with a docker image of SQL Server containers. I'm using docker compose for ...
John F's user avatar
  • 1
0 votes
1 answer
20 views

Blazor Fluent UI example doesn't generate styles.css

I am looking to try out the Fluent UI example template and noticed some strange behavior. In the documentation it states that you need to add this to your _Layout.cshtml. <link href="{...
Killnine's user avatar
  • 5,784
0 votes
0 answers
31 views

Getting error after deploy Google calendar app

I'm facing "access denied" message after deploy my App to server. While running it on my PC it worked perfectly. This is part of my code where I get the authorization (as I said above it ...
Eduardo's user avatar
  • 103
-1 votes
0 answers
19 views

Using google Source Sans Pro font in Website without referring to google API url

I am trying to rebrand the Web App with new font - Source Sans Pro, but have issue in following google steps in referring google api url directly as these or any external link is blocked from server ...
Pradeep H's user avatar
  • 590
0 votes
1 answer
23 views

Get tables from splitted datatable and run a foreach for every table

I need to get all tables created when splitting a datatable and the run a foreach onevery row on every table that has been created with the split This is the code i am using to split the datatable ...
NiclasNilsson's user avatar
-1 votes
1 answer
16 views

How do I load multiple images (approximately 100 images) from a folder to asp: image buttons using any loop?

The code is currently resulting in a null value for the image URL. string Commented = "~/Files/Temp/"; DirectoryInfo dir = new DirectoryInfo(MapPath(Commented)); FileInfo[] ...
Rashad ras's user avatar
1 vote
0 answers
58 views

Why can't I connect to my SQL Server Express database from a .NET website running on IIS Express in Windows 11 ARM on M1 Macbook using Parallels

I am running Windows 11 ARM on my Macbook with M1 processor using Parallels. I can connect to my SQL Server Express database from development tools like Visual Studio (ARM) and Rider (ARM). Also ...
Eastlander's user avatar
0 votes
0 answers
12 views

IdentityServer ErrorContext and getting as much detail as I can

I have this Error page in my IdentityServer code: public async Task<IActionResult> Error(string errorId) { var vm = new ErrorViewModel(); // retrieve error details from identityserver ...
yesman's user avatar
  • 7,205
0 votes
1 answer
40 views

.net Mocking ToListAsync() in repository is not working

So I am trying to mock GetQueryable().ToListAsync() but I keep getting this error "System.NotSupportedException : Unsupported expression ... Extension methods (here: ...
Nour Mawla's user avatar
-2 votes
0 answers
19 views

Textbox into drop-down

In my code I have drop down and textbox Now the issue is I want to hide the textbox and use the same functionality to drop-down instead of changing the backend there is any other ways of doing (in asp....
1926JB55 Soundarya.S's user avatar
0 votes
0 answers
17 views

How to fix timeout issues with WCF services in ASP.NET?

Basically, I (the client) am trying to implement a WCF webservice (configured with HTTPS) in a ASP.NET Web Forms app and I have it configured basically, but it doesn't work. It only works in SoapUI ...
JustT4ser's user avatar
-2 votes
0 answers
23 views

Scraping Government Website for Compliance Data: Handling Missing Data and Website Issues [closed]

I am scraping compliance data from a government website using Python, and I've encountered issues when there is no data for certain years or some pages fail to load, possibly due to website problems. ...
kizzeee's user avatar
1 vote
0 answers
34 views

Api Key authentication in .NET 6 Web API

I'm trying to create Web Api that allows both JWT and Api key based authorization and authentication. JWT authorization works really well for example header: Authorization | Bearer ds2dsa....... But I ...
Pan Michal's user avatar
0 votes
1 answer
32 views

asp.net core 7.0 RedirectToAction method send route values as post

in my asp.net core 7.0 web app, I have been using RedirectToAction(string? actionName, string? controllerName, object? routeValues) and it was fine but it sends the route values as Get, is there any ...
Abdelrahman Almowafy's user avatar
-3 votes
0 answers
28 views

How do I setup Kerberos to be able to authenticate to a lMSSQL server running as a docker instance locally on a Mac? [closed]

Displayed Error Message connecting with ASP.Net Application: Cannot authenticate using Kerberos. Ensure Kerberos has been initialized on the client with 'kinit' and a Service Principal Name has been ...
Abbracx's user avatar
0 votes
0 answers
39 views

IQueryable create query fails with error Expression of type 'System.Object' cannot be used for parameter after upgrading to .net 6 and ef 6

I am calling a chunk of code ` var m = typeof(IQueryProvider).GetMethods().First(x => x.Name == "CreateQuery" && x.IsGenericMethod); var gm = m.MakeGenericMethod(queryType); var ...
SpyrosT's user avatar
0 votes
0 answers
16 views

RabbitMq error RabbitMQ.Client.Exceptions.BrokerUnreachableException: None of the specified endpoints were reachable

I get this error when trying to execute a POST method via swagger UI. Swagger UI error message For context I am trying to make simple RabbitMq application. Full error code: RabbitMQ.Client.Exceptions....
karim 076's user avatar
-2 votes
0 answers
19 views

External API calls are getting blocked on AWS windows t3 instance after every 2 to 3 months [closed]

We have created an EC2 Windows (server 2019) T3 micro instance. Assigned a security group with Outbound traffic on for All ports. We run an ASP.NET Core web application on it (IIS 10). In which we are ...
Ajit Satam's user avatar
0 votes
1 answer
29 views

asp.net Response.WriteFile not working with Azure App Proxy?

I've written an on-premise web app that allows the user to download a file from the backend server, using Response.WriteFile(file.FullName) This works perfectly, when I access the on-premise web app ...
John Doh's user avatar
-1 votes
1 answer
42 views

I have tried to use Update-Database but get an error - how to fix this? [closed]

System.InvalidOperationException: The ConnectionString property has not been initialized. appsetting.json "ConnectionsString": { "GShopConnectionString": "Server=...
Ali Garivani's user avatar
-1 votes
0 answers
21 views

Create User Controls from loop in JS ASP.NET Web Forms [closed]

I want to create a multiple instance of user control in asp.net when a ajax function returns a data. Data will be in list. I am trying to create user control from Javascript or jQuery but i am not ...
Anuj Karki's user avatar
1 vote
1 answer
27 views

Add Click Event to TextBox in GridView Using JQuery

I am trying to access the textbox that is in my Gridview and add a click event. I added a click event to a textbox that is outside of the Gridview with no issues using jQuery. <asp:TextBox ID = &...
Demetrius Rhodes's user avatar
0 votes
0 answers
24 views

How to disable any autoformatting and setup "block" identing for Razor pages in Visual Studio 2022?

I need to write html + js code in .cshtml file and I don't want Visual Studio to format anything automatically, but it does: VS aligns and formats spaces in js code line in .cshtml file each time ...
Nikita Andreev's user avatar
0 votes
1 answer
50 views

DI and Activator.CreateInstance

I'm attempting to refactor code that has quite a few dependencies that are relying on a static global instance. The project is using Microsoft's DI. A large number of objects are being created with ...
Wesley Rolnick's user avatar
1 vote
1 answer
70 views

.Net 6 use option pattern to read json file with int as key

I am trying to read a json file using a c# option pattern. However, I am running into a problem where a property of Dictionary<int, myClass> is not being mapped correctly unless I changed it the ...
ZpfSysn's user avatar
  • 817
0 votes
0 answers
12 views

Uploading files from ASP.NET app deployed on Elastic Beanstalk, I get this error: the page was not displayed because the request entity is too large

My ASP.NET application is deployed on AWS Elastic Beanstalk and it provides functionality for uploading files and after that they are stored on S3 Buckets. When I test my application on localhost, ...
Samuel_V's user avatar
0 votes
1 answer
28 views

Forms authentication ASP.NET webforms

I have an ASP.NET webforms application that uses forms authentication. For the pages that don't need authentication I have those in a separate folder. All other pages are in the main folder and use ...
Karl's user avatar
  • 35
0 votes
0 answers
26 views

Docker Scout CVEs have incorrect severity levels for base Microsoft .NET docker images

I'm trying to understand what's wrong with security for base Microsoft aspnet docker images, like mcr.microsoft.com/dotnet/aspnet:6.0 or aspnet:6.0-bookworm-slim. I pulled actual images and got ...
Artem Repko's user avatar
0 votes
0 answers
16 views

Creating a user with ShouldChangePasswordOnNextLogin flag true Abp.io 7.2.2

I need to create a method that inserts a new AbpUsers with the ShouldChangePasswordOnNextLogin marked, but I can't because the column is protected. Is there any way to solve this? I could generate a ...
1 vote
0 answers
22 views

ASP.NET Core Minimal Api Custom Middleware with authorization

I have a ASP.NET Core Minimal API Backend which uses JWT Authentication and authorization and Entity Framework code first database access The User has Username and Password and each user is associated ...
Keval Bhavsar's user avatar
0 votes
4 answers
77 views

I'm unable to create an @onclick event in Blazor, following an ASP.NET tutorial

I'm following the ASP.NET tutorial on youtube, and I'm having trouble creating an onclick event. I'm using blazor and the following code is a razor file. I'm using .NET 8.0 preview. Image where code ...
Håvard Bakke's user avatar
0 votes
0 answers
13 views

How to combine multiple structured data into one script tag (ASP.NET, JS)

I have several JSON-LD markups which come from components, they are loaded depending on the webpage, I want to combine them into a script tag when all components are completed loading For example, on ...
kachi_kachi's user avatar
0 votes
0 answers
28 views

mscorlib.dll throws 'System.NullReferenceException' when using SendAsync() function in ASP.NET 4.7.2

I have a web application (ASP.NET 4.7.2, C#). I am using HttpClient to do a POST request to webservice. When it comes to the point to execute this response = await client.SendAsync(request); it ...
athskar's user avatar
  • 228
0 votes
1 answer
19 views

Asp.net ajaxToolkit:HtmlEditorExtender rich text editor won't send the whole message

I have an asp.net project and what I want to do is to make a textarea a rich text editor and for this I am using ajaxToolkit:HtmlEditorExtender. The problem is that when I enter some text in the ...
Alex's user avatar
  • 67
0 votes
0 answers
25 views

ERROR TypeError: Cannot read properties of null (reading '_rawValidators')

I'm kinda new to programmin.. I recently got this error on my project and I can't figure out what it means exactly. enter image description here when I press the submit button nothing happens. this is ...
user22629947's user avatar
-1 votes
1 answer
70 views

Unable to cast object of type 'System.DateTime' to type 'System.String'. ASP.NET Core

I'm just a beginner in ASP.NET Core. I have a column in the customers table (SQL Server) of date type. I want to update the customer status in the program but when trying to execute the update method ...
skyusman's user avatar
-1 votes
1 answer
41 views

how to run .net project on Microsoft Edge [closed]

I have never worked on a .net project before and I'm trying to learn it by cloning someone's project and running it on my machine, so this question may be stupid. I'm trying to run this project on ...
Leon's user avatar
  • 1
0 votes
1 answer
21 views

Code will not continue with datatable foreach

I have code that breaks the foreach and goes to the top and another foreach It go trough the datatable 2 times as the batchsize says, and then go down and doing the restsharp, but after that it goes ...
NiclasNilsson's user avatar
0 votes
0 answers
11 views

SAGE - ODBC via IIS - minimum required folder permissions for ACCDATA folder

I have a website which I want to connect to SAGE ACCDATA folder (which resides on a different server but same network to the intranet server) using their proprietary ODBC driver. For security purposes ...
Paul Zahra's user avatar
  • 9,522
0 votes
0 answers
14 views

Running a localhost ASP.NET web server via Tizen C# NUI application

I have a basic Tizen NUI application with just a web view inside. The web view is just supposed to show a web server that I created. // from TizenApp solution internal class Program : NUIApplication ...
enricosebastian's user avatar

1
2 3 4 5
7478