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

Custom login pages built/hosted at frontend using OpenIddict

We have a ASP.NET API server which aim to service multiple tenants with front ends written in Angular and React. We have implemented authentication and authorisation using OpenIdDict authorisation ...
Rahul Misra's user avatar
0 votes
0 answers
17 views

Is blazor `dotnet publish` hard-coded to `web.config` and the `wwwroot` folder for WebAssembly standalone deployment or am i missing out on the docs?

Yes, I see that dotnet publish has an --output parameter but the conventional wwwroot directory (with a web.config in a parent directory) will be appended; is there a way to stop this from happening ...
rasx's user avatar
  • 5,298
0 votes
0 answers
23 views

Firebase .NET SDK how to validate user with email and password Web API

I have configured the Firebase Admin, but I do not see an option to check on login if a user entered valid credentials. I was able to create a user by calling FirebaseAuth.DefaultInstance....
Nandor Krizbai's user avatar
0 votes
0 answers
16 views

Second level menu in Bootstrap navigation bar showing hidden links

I am using Bootstrap in an ASP.NET application with C#. I have two level menu, with some option available to user and others to admin. The page load in the master page determines the options to show ...
Noobie's user avatar
  • 107
0 votes
0 answers
25 views

ASP.NET vb.net "The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value."

I'm using calendar from tool box of VS IDE, and I want to get data from database according to selected date from calendar between 20/7/2020 to 20/7/2021, but I got an error The conversion of char ...
user2501024's user avatar
0 votes
0 answers
22 views

When background is added to text in cell of the table, text resolution will be bad

I have a datatable which has some records, and I want to add red background to the one cell. But when I add background to the cell with javascript, Text will be very bad. What should I change to fix ...
henryisfixingbug's user avatar
0 votes
0 answers
14 views

How to check duplicate email from database for subscription email get all email from database and check if duplicate or not then post that email

I am checking the the condition but not shown any result I am try to get all email from database and check it is an already posted or not and show toast message and post that email const onSubmit = ...
Urmila Sirase's user avatar
0 votes
2 answers
74 views

Invalid column name error although it exists ASP.NET Core

I am designing an online store (ASP.NET Core 6) for an accounting software (C# Winforms). I started this using ASP.NET Core and Razor pages. I am new and inexperienced in this field. The accounting ...
Virus 32's user avatar
-1 votes
0 answers
26 views

ASP.NET Core Websockets on remote server

I am trying to make some kind of messaging application and I want to utilize WebSocket. I found many tutorials on how to do it and I have made a working one which only works on localhost. How can I ...
Barta's user avatar
  • 15
0 votes
0 answers
44 views
+50

cache a httpmessage content

I would like to start caching some of the data in web API But I am getting some errors. I am using the HttpContent and storing it in cache using the CacheHelper.SaveTocache. On the next connection I ...
Jefferson's user avatar
1 vote
1 answer
31 views

How can I get the original type of a Mock after the Mock has been cast to an object

I have a ServiceCollection, and I want to make a method where I can pass in a set of parameters, and have the ServiceCollection return those services when the matching type is requested. I am using ...
Ben Rubin's user avatar
  • 6,951
-1 votes
0 answers
36 views

ASP.NET Web Forms site doesn't load correctly on the mobile devices

I have a site which is written in asp.net web forms framework which doesn't load correctly on the mobile devices Maybe some one could suggest something what can be done to this site potentially to ...
James's user avatar
  • 1,079
0 votes
0 answers
25 views

When I run my ASP.NET Web API always is hosted on a random port, how to avoid that?

So I have a solution with a Web Api, I also added Container Orchestation Support, so it's all dockerized. This is my docker-compose version: '3.4' services: acmeapi: image: ${DOCKER_REGISTRY-}...
Alexis252's user avatar
0 votes
0 answers
41 views

mscorlib.dll throws System.Runtime.Remoting.RemotingException

I have a .net application running in local machine connecting to Oracle db hosted in different server . The version of the Oracle client is 19c . When the application is ran and during the connection ...
user1907849's user avatar
2 votes
0 answers
36 views

Get unused value for ID from a set with concurrent services

For the system I'm developing, I have the following requirement: There is a certain request that a client can make where the backend needs to allocate an ID with the following restrictions: (this ID ...
Magnesiam's user avatar
0 votes
1 answer
17 views

Download file, stops at Responce.end()

I have a code that zip files in a folder and downloads the zip file But after the download the code stops at response.end() I have code after that delete all the files in the folder, but it never goes ...
NiclasNilsson's user avatar
-1 votes
0 answers
29 views

How can I check if an instance of CreateMapper has already been created, and how can I add multiple mapping profiles to it?

I'm about to use AutoMapper in my project, but I have some questions about managing instances of CreateMapper. I would like to know how to: Check if an instance of CreateMapper has already been ...
PippoBest's user avatar
-2 votes
0 answers
14 views

Best Cloud Solution for a Startup CRM Application [closed]

I need to deploy a web application for a startup with the following requirement : 1- Backend : Microsoft .NET Core ( Web API ) 2- Frontend : 2 Angular Applications 3- Database : Microsoft SQL Server ( ...
Amr Allam's user avatar
0 votes
1 answer
20 views

C# & ASP.NET MVC - The type or namespace name 'type/namespace' could not be found

I am new to ASP.NET MVC and I am creating a project. First, I created all my models and data access in one project. However I now moved them into separate projects like this: I updated all the import ...
Mat's user avatar
  • 429
0 votes
1 answer
46 views

c# Devexpress gridview SQL : how to add new data to the drawn table without adding a column?

I am pulling data from a SQL Server database without adding any columns on the C# ASP.NET devexpress gridview aspx side. How can I update this data I captured or add new data to the table? In my ...
Murat Gültekin's user avatar
-4 votes
0 answers
12 views

Update the EMI Based on the Months

I want to Update the EMI text box based on the dropdown selection for example i select the 12 Months Amount is Change based on the 12 Months and I Enter the No emi is 1 the EMI Amount also Displaying ...
1926JB55 Soundarya.S's user avatar
0 votes
0 answers
15 views

ASP.NET Identity - Different MaxFailedAccessAttempts for different users

How can I configure MaxFailedAccessAttempts dynamically so that it is user specific? The user specific attempts are stored in cache and should apply when they try to log in. This is how I am currently ...
jkamz's user avatar
  • 11
0 votes
3 answers
33 views

How to change main page as Identity's Login page(with different template) in ASP.NET Core 7?

I'm trying to create the initial page that comes up as soon as the program runs in an ASP.NET Core 7 MVC project. I want this initial page to be the login screen from Identity. I will customize this ...
Kiziltan Cihan Oral's user avatar
0 votes
0 answers
26 views

How to use AzureCliCredential when authenticating via Keyvault through "EnableTokenAcquisitionToCallDownstreamApi" in ASP.NET

When I access a secret or certificate from Keyvault, I use ChainedTokenCredential. This makes sure that for local development, the AzureCLI is used to obtain a token for Keyvault and in production ...
David Mason's user avatar
0 votes
1 answer
18 views

Cookie is not expired, but it doesn't work after 10 minutes in .NET 6 Web API

use cookies for my project. When I set a cookie for a user, I use this method to check the user is authenticated or not. public async Task<IActionResult> Login() { try ...
ari23yan's user avatar
0 votes
1 answer
29 views

Show value on a second razor page passed from the first

I have one page that collects the users initials and the entry date. I then pass that to as secondary page where some input work is going to be done but I have not been able to get the initials or ...
Buck Hicks's user avatar
  • 1,536
0 votes
0 answers
19 views

DotNet and Ionic API performance

So i have this code in the backend which fetches data from the Redis cache since it is cached everytime someone clicks the link from the webpage, here is the code for that [Route("story/filter&...
seventhball's user avatar
3 votes
2 answers
53 views

Exception handling when mixing IAsyncEnumerable with IActionResult in ASP.NET Web API

With ASP.NET Web API, we generally use IActionResult as a return type for a method, potentially wrapped in a Task<> when working asynchronously. We now have IAsyncEnumerable<> return type ...
SirKumbskull's user avatar
0 votes
0 answers
31 views

Is it possible to change Bootstrap variables at runtime

I'm wondering if it is possible to change the bootstrap color variables at runtime. I'm using Orchard Core and I would like to create a Bootstrap module where we can pick the colors in the admin area. ...
Crafty's user avatar
  • 1
0 votes
1 answer
13 views

CreatedAtRoute - No route matches the supplied values. (passing Parent/child values)

First, I have searched here for a similar situation to mine but have yet to find it. I am trying to Create a company (child) that has a Tenant (parent) and return the URI value in the response. API ...
Kent Hub's user avatar
  • 141
-1 votes
0 answers
22 views

Upload Excel data and insert it into the database using ExcelDataReader [closed]

I am trying to read data from excel upload and insert it into the database. But cannot insert the data successfully. While debugging I found that the date of order stores null value while in the excel ...
Ashley Ferns's user avatar
0 votes
1 answer
27 views

ASP.NET cookie value null

I have cookie that I create in a Login page and the read in the Home page Login: HttpCookie cookie = new HttpCookie("Login"); cookie.Values["User"] = textBox.Text; cookie.HttpOnly =...
João Pedro Sousa's user avatar
0 votes
1 answer
20 views

Incorrect reference to child control when user control is reused in page

Adding a user control that accepts a few properties and is used to be able to generically set different configuration values within our application. There are instances where this will require two of ...
ClearlyClueless's user avatar
1 vote
0 answers
18 views

GeoServer WMS URL is taking much time to load

We have two GeoServer URLs, on which one is taking much time, while other is loading the map quickly. URL, which is taking more than 8 minutes to load, https://geoserverhost:8443/geoserver/MapData/wms?...
praj's user avatar
  • 11
-1 votes
0 answers
28 views

Format of the initialization string does not conform to specification starting at index 0. .NET API [closed]

I'm trying to create an admin login in an ASP.NET Core 6.0 Web API project, but the error message shown in the title appears. I checked other posts that talked about this and I didn't find anything ...
Albi Tushaj's user avatar
0 votes
0 answers
22 views

ASP.NET WebForm : Invalid JSON primitive on Page Change

I am working on ASP.NET WebForm app. I have a page which calls Handler through AJAX call. Data are loaded into telerik radgrid and html chart for presentation. I am copying those html elements to ...
Anuj Karki's user avatar
0 votes
0 answers
31 views

I need a way to Unit Test my command handlers in asp.net core 6

This is my Unit Tests file. using FluentValidation; using Microsoft.Extensions.Logging; using Moq; using QueryStore.Application.Common; using QueryStore.Application.Queries; using QueryStore.Domain; ...
Hardik Dhuri's user avatar
0 votes
0 answers
44 views

How to fix Repeated Storing Data to DB table using C#

I am struggling to prevent the data from repeating in my db table, even chat gpt keeps on repeating the solution. here is the code from visual studio var premArrearsGet = await _autoLISContext....
Cyrus Yabut's user avatar
0 votes
0 answers
34 views

Why do I have to restart IIS Only then can the image be loaded when connect by new PC or new browser

Why do I have to restart IIS Only then can the image be loaded when connect by new PC or new browser. before restart IIS after restart IIS: My code: In Program.cs: app.UseStaticFiles(); ...
Phát Sơn's user avatar
0 votes
0 answers
14 views

Reset 302 after HttpContext.Current.Response.Redirect

I have a web API endpoint that's utilizing a third party library that calls HttpContext.Current.Response.Redirect(someUrl, true); The problem is that I want a status 200 from my endpoint, with ...
Johan's user avatar
  • 34.7k
-1 votes
1 answer
26 views

Using Azure B2C with userName as login, How to Verify Authentication Email Address PRIOR to Sending Code in Password Reset Policy

We're trying to implement Azure B2C in our legacy .Net Framework web application, using userName instead of email address to log in (we migrated accounts from a legacy system). Our Password Reset/...
Ageonix's user avatar
  • 1,748
0 votes
0 answers
17 views

Propagating a Variable in All Hyperlinks on Page (Weird Issue)

So I need to propagate a particular variable in the querystring to all hyperlinks on a page, except a select number of them. In this example, the var is "referralCode" (I also look for just &...
clamum's user avatar
  • 1,267
0 votes
0 answers
12 views

Telerik Scheduler

Does anyone know how get rid of this error message "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index mscorlib"? Project is Using ...
Jose Saiz's user avatar
0 votes
1 answer
17 views

How do I configure IIS 6.2 to handle Ajax requests

I have a web application that is currently running on a windows server running IIS 6.2. I am not trying to migrate into a new environment. I have the application up and running but the ajax calls ...
Zoop's user avatar
  • 872
0 votes
1 answer
24 views

unable to remove x-powered-by and server headers for non-page resources (png, css, js, etc.) on ASP .NET Core web app in Azure

I have a web app running on ASP .NET Core in Azure. The web config is as specified below. When I view the page in Edge, and look at the headers for a web page, the X-Powered-By and Server response ...
WayneRoseberry's user avatar
0 votes
0 answers
14 views

Environment Keyring Issues: The key {9ef91d59-7718-4765-a8a0-da0e4cd0069a} could not be found in the key ring. Something went wrong

Question: I have been using the Elastic Beanstalk service for multiple users. While Elastic Beanstalk successfully creates one instance, I encountered key ring issues when attempting to reset my ...
dotnetdeveloper's user avatar
0 votes
0 answers
60 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
1 answer
53 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
36 views

jquery datatable pagination and filtering disappear after any postback [closed]

I'm using a jquery datatable in for my gridview, after binding grid for the first time it is working fine, but after any postback grid is not rendering back as datatable. Below is my sample code. --...
Onel's user avatar
  • 1
1 vote
0 answers
67 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

1
2 3 4 5
7478