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
1answer
22 views

How to get all the values in a row of a DB relation and assign each of them to a variable in asp.net C#

So I'm trying to find a way to have access to all the values in a row following code give me back one cell. if I change 'select id' to select * I have access to the row but how can I break it apart? ...
0
votes
0answers
10 views

Do I need to re-register a COM Interop dll if no changes to the interface have been made

I am working on a web application that contains a mix of asp.net and classic asp pages. The classic asp pages make use of a COM Interop library. Currently, when changes are made to the application, ...
0
votes
0answers
15 views

AspNetCore.Authentication.Negotiate.NegotiateHandler: An anonymous request was received in between authentication handshake requests

I created a Blazor application with Windows authentication and hosting with Kestrel/Negotiate following the steps in the question Windows Authentication works on IIS but not Kestrel / Microsoft....
1
vote
2answers
39 views

JavaScriptSerializer does not convert Json string to object?

the code below does not return any errors but still does not convert the JSON to object JSON string I got from an API { "genres": [ { "id": 28, "name": "Action" ...
0
votes
2answers
19 views

Allow nuget to download missing packages in Azure AppService

Iam trying to deploy a asp.NET application with Azure AppService. But at the end it fails and the message says : error : This project references NuGet package(s) that are missing on this computer....
0
votes
0answers
13 views

DataGrid calls javascript then won't call code-behind

I have an ASP.Net control called PendingControl. There's a DataGrid on PendingControl. This DataGrid has OnItemCommand="dgPending_ItemCommand" and one of its template columns has an ImageButton: &...
0
votes
1answer
31 views

Split by regex on multiple line

I have a file document who contains my messages archive from a website. I would like to make a split for each message but the format is terrible. Date: Nov 27 2019 08:35am From: dsad (123) ...
-3
votes
2answers
31 views

How to do a switch statement using a url and Contains()

I have some urls that look like this: /Collection/Summary?ViewBy=AZ I'm trying to implement a switch statement so that if the url contains X, then Y will happen. This was working when it was just an ...
0
votes
0answers
14 views

On asp:button click update panel to show loading message and run vb.net code behind

I have an ASP application which has a page where the user can select different options which are then used to generate an excel report. The report processing is triggered through a button click. I ...
0
votes
1answer
22 views

C# string being truncated in Firefox

I have an ASPX app that saves some HTML into to a PDF. My issue is when building the filename string. Here is my code. string ext = ".pdf"; string custname = custnamehidden.Value....
0
votes
0answers
36 views

The 'DateOfBirth' property on 'Patient' could not be set to a 'System.Byte[]' value. You must set this property to a non-null type 'System.DateTime

We have a AngularJS FE web app based on Entity Framework using SQL database with Always Enabled and experiencing issues two encrypted columns DateOfBirth and PatientID that are encrypted. This is the ...
0
votes
0answers
9 views

Unable to use IIS Windows Auth with Custom flow

Background Our product consumes a proprietary single sign-on (SSO) solution owned by our customer and uses Identity Server to handle authorization. Our product uses a Custom flow and implemented ...
0
votes
0answers
27 views

User.FindFirst(ClaimTypes.NameIdentifier) doesn't retrieve anything when called from frontend (Angular)

I'm facing a new problem - just like the title says. I'll managed to check where the problem happens but I can't resolve it. I'll start from the top. In the backend (ASP.NET 3.0) I have a class ...
-1
votes
1answer
21 views

How can I update database table using signalR?

I am working with sigbalR for the first time and following a tutorial on automatically updating a table in the UI. Unffortunately nothing is fired on the UI when I add/update/delete a row in the ...
1
vote
1answer
27 views

I added a column to an existing table in the database then after refreshing Entity Framework, data table (js) stopped working (server 500 error)

There is no relationship between the column I added to the table and the table attached to the datatable. I checked all the models files there are no differences. There are no warnings or errors. All ...
-1
votes
1answer
25 views

How to using pdf.js with asp.net c#?

how can view pdf file by pdf.js in asp.net page with c# language ? my pdf file is stored in : pdfpath = dr["FolderPath"].ToString() + "/" + dr["FilePath"].ToString() + ".pdf"; thanks
1
vote
0answers
13 views

Why isn't the .AspNet.ApplicationCookie Secure / SameSite set to Strict by default?

Why doesn't the identity cookie (.AspNet.ApplicationCookie) set by asp.net mvc framework which authenticates the user set to have SameSite to strict or Secure set to true by default? Doesn't this make ...
0
votes
0answers
5 views

Why Page.User.Identity.Name sometimes show domain part, sometimes doesn't

I'm building ASP.NET website (not web application) using Windows Authentication. I use Page.User.Identity.Name to get current login user. I use TFS for source control: in one branch, this ...
0
votes
1answer
16 views

.NET and SOAP tags question (serialization of object into XML)

quick question: I am working on creating a XML souap envelope that should have this structure: <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/...
0
votes
0answers
45 views

Migrated from ASP.NET to .NET Core and my API is now very slow. What can I do to diagnose?

I just migrated a pretty old API (development was started in early 2000s)to .Net Core. I'm not super comfortable in the environment but I managed to get it working ok and it seems like it's way easier ...
0
votes
2answers
30 views

Deserialize Multidimensional JSON array with ASP.NET Core

I have been trying for a few days to find this issue, perhaps I am missing something. I followed the recommendations from Microsoft when I built my sample application based on GitHub: https://docs....
0
votes
0answers
16 views

I want to improve my search function to isolate the correct class in order to save changes to my database [duplicate]

I hope I can explain this as best I can. I have created an Inventory management system for my dad's company. Originally I had an abstract class named Product, and used inheritance to pass on ...
0
votes
1answer
37 views

Instantiating object with full name

quick theoric question. I have the following code: if (partnership != null && partnership.UseCustomNotifier) { //some behavior } else { Integration.Protocol.Client.Notifier ...
0
votes
0answers
14 views

CORS allowed origins with a multi-tenant web app?

tl;dr ASP.NET Framework WebForms application with large number of domains on same web app needs subdomain CORS matches. Is there a good way to do this? My team is moving from self-hosting with IIS to ...
0
votes
0answers
9 views

How to specify server certificate for a self-contained Kestrel/Blazor application deployed on a production server?

I created a Blazor application to be run using Kestrel (.Net core 3.1). Import NuGet package Microsoft.AspNetCore.Authentication.Negotiate Add the following code in ConfigureService() in Startup.cs. ...
0
votes
1answer
7 views

MSDeploy throwing MissingMethodException on EventWriteVerbose when trying to deploy package to IIS

I am using Jenkins to build and package an ASP.NET project. Everything works well up until I attempt to run the <ProjectName>.deploy.cmd file that is output with the packaging process This ...
0
votes
1answer
29 views

Fill in Textboxes with Address Info, when Dropdownlist item is selected .NET Core

I have read a ton of articles and none of them have been much help for in the context I am trying to do this. I have a Dropdownlist within an Edit User Modal, for Companies. When I select an item ...
0
votes
1answer
29 views

Cron expression to skip only public holidays of the year

I've a ASP.Net MVC application, We are using calender control to pick the date on UI. We are using cron expression to set the public holiday date. My requirement is Date picker on UI should not allow ...
0
votes
1answer
25 views

How to get ASP.NET Web Application (.NET Framework) for c#?

I have just downloaded the VS Community 2019 Version 16.3.9 and I can't seem to find the ASP.NET Web Application(.NET Framework) with the C#. It just only starts with the VB script by default. What ...
2
votes
1answer
37 views

How to convert an IHttpActionResult (with JSON inside) to an object I can process with LINQ

It might be a noob question or an architectural misunderstanding, but I ask it anyhow because I am out of ideas and search terms: The goal is to implement a controller CountriesController() which is ...
0
votes
3answers
45 views

merge 2 lists into a new list that contains both data from list 1 and list 2 - where the unique key is “VariantId”

I have two lists of data (they are using the same class "SaleNumber"). Each list contains a list of sale numbers. The first list is taken from the danish "DK" database and the other from the swedish ...
0
votes
0answers
15 views

“context.Resource as AuthorizationFilterContext” returning null in ASP.NET Core 3.0

I am trying to implement a custom authorization requirement following a tutorial. It seems like context.Resource no longer contains AuthorizationFilterContext and as a result: var authFilterContext =...
0
votes
1answer
38 views

ASP.NET C# ApiController and Static Config Class

I have an issue with an ASP.NET C# API application. It uses the AuthApiAttribute class to check authorization, using 2 HTTP header to authenticate the query. Once I have validated the credentials, I ...
0
votes
1answer
42 views

DropDownList event not firing with AutoPostBack set to true

I have DropDownList in my webpage and I would like to fill TextBoxes every time when user change selected value in DropDownList. My problem is that this event is not firing when I change this value. ...
0
votes
0answers
3 views

Defining multiple Foreign Key for the Same table inasp.net mv core Entity Framework Code First

Question I have two entities in my Core MVC application. There are two Bolge Id in the BolgeToBolge entity; one of them is FromBolgeFk , the other one is ToBolgeFk. After "update-database" command ...
0
votes
0answers
7 views

Anonymous on the entire site except for one page using asp.net

I would like to have anonymous access for an entire asp.net site except for one page. On that one page, I would still like everyone to access the page but I would like to retrieve their username. ...
-1
votes
0answers
10 views

AWS serverless lambda buildspec for multiple environments issue [closed]

I am new to AWS, and I am trying to do a code pipeline. I am able to deploy my application in a single environment, but I want to deploy the app in multiple environments. Please help! Build spec ...
1
vote
1answer
20 views

Unable to debug some asp.net core2.2 web pages with Firefox. How can I debug with Firefox?

Background asp.net core 2.2 Browser: Firefox Edition : 71.0(64 bit) Code editor: VS profession 2019 Source code Detial During this time, I tried to debug my pages with Firefox, but I couldn't debug ...
1
vote
0answers
19 views

Web form Azure Active directory : Failed to load resource: the server responded with a status of 401

I have a web site (web form, entity framework) and I use AAD connection. I did modifications following this blog Problem, scripts and css are not loaded. Failed to load resource: the server responded ...
2
votes
3answers
62 views

How to remove (via linq) duplicates from a List of objects

My main object, has a property which is a List of tags [SharedCosmosCollection("shared")] public class GlobalPageTemplate : ISharedCosmosEntity { /// <summary> /// ...
-3
votes
0answers
20 views

Why DotNet is not used For Banking or to build Other Websites [closed]

for banking application as i searched 100 websites of banks only 2 or 3 banks website build with ASP.NET rest of the 97 or 98 website build with JAVA even i know we have ASP.NET Core even though why ...
-1
votes
2answers
46 views

need to embed the url inside hyperlink in mail

I have a button on an ASP.NET webpage. When the button is clicked an email is sent to users. Inside the body of the mail message I have the following URL; https://synerg.abc.com/abctool/Login.aspx. ...
1
vote
1answer
17 views

I'm getting an error in my .asp file, and I don't know how to solve this (I don't know ASP). The error what i'm getting is the following

ADODB.Field error '800a0bcd' Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record. /Index.asp, line 216 and line 216-- <%ip=0 ...
0
votes
0answers
7 views

Do i require notify_url with Auto Return?

Building an ASP .Net site using C#. I have set Auto return for website payments to on and set my URL to a handler i.e. www.example.com/nonExistentUrl/myHandler.ashx Enabled Payment Data Transfer ...
0
votes
1answer
25 views

Master Page Server Error - Compiler Error Message: CS0426

Hello! I've created a Master Page with ASP.Net, C# and right after that I created a "Web Form With Master Page" which I named Index.aspx so I could see the page in a browser. Now when I choose IIS ...
0
votes
0answers
25 views

.Net Core session is returning null on certain controller method

I have tried to figure this issue out for the past 2 days, im passing in a username once a user has logged in. private readonly IHttpContextAccessor _httpContextAccessor; private readonly ISession ...
0
votes
2answers
34 views

HttpClientFactory: Typed HttpClient with additional constructor arguments

With HttpClientFactory we can configure dependancy injection to create and manage the lifetime of HttpClients: public class GitHubService { public HttpClient Client { get; } public ...
1
vote
0answers
55 views

How do I display a record of database in asp.net mvc?

I m working with asp.net with MVC code-first approaches. In my database, 4 records and I want to display record but a record not display? table name:empls How can I get records of database and ...
1
vote
0answers
11 views

.net core 3 Changing controller name, action name and domain name by culture

how to change domain name, controller name according to culture on a site for asp.net core 3.0 Urls: /tr/anasayfa/index /en/home/index /fr/maison/index There will be a single controller that will ...
0
votes
0answers
14 views

How can get a empty string from data base? [duplicate]

I was building an sign in form, on ajax call parameters in my method get the value from the text boxes, then i put it in a sql query which is. string user_id_query = "SELECT p_word, userId FROM ...