Skip to main content

New answers tagged

0 votes

ASP.Net Web Application Add Config Transform Grayed Out

Most probably your web.debug.config and web.release.config files don't exists in your directory and you have both release and debug option in your publish settings. If you click on your solution and ...
esenkaya's user avatar
  • 176
-1 votes

I am getting this error while using standard tools such as Label, Textbox etc

After looking around StackOverflow I have found a possible solution to this issue. It seems to be related to the Framework version installed on your machine. The gist is, when targeting a lower ...
SimpleCoder's user avatar
0 votes

What's the breakdown of the following regex?

(?!.*cats.mydomain).*mydomain.com$" is used to match strings that contain mydomain.com but exclude specific subdomains. Let's break it down step by step: ^: Asserts the start of the string. (?!....
Zeeshan Javaid's user avatar
0 votes

How to get value to text field after model validation message

-> the PurchaseOrderNumber is removed from the field Per my understanding, we need to check whether we set value for PurchaseOrderNumber when the validation failed and return to the Form view. See ...
Tiny Wang's user avatar
  • 14k
1 vote
Accepted

How to Isolate Developers' Kafka Message Consumption in MassTransit Without Using Temporary Topics?

Either don't share the same Kafka broker (run it locally in Docker) for testing, or you'll need separate topics for each developer.
Chris Patterson's user avatar
0 votes

launchSettings.json launchUrl doesn't work "api/values"

The solution for me was modify launch.json... { "version": "0.2.0", "configurations": [ { [...] "serverReadyAction": { ...
Eduardo Lucio's user avatar
0 votes

What's the breakdown of the following regex?

The negative look-ahead assertions are checked at successive positions. After consuming one character with ., a repetition with * will apply those assertions again at the next position, ...and so on. ...
trincot's user avatar
  • 340k
0 votes

How do I use Chrome API Sidepanel in a Blazor extension?

You are on the right track based on the documentation page you have linked to. In the manifest.json, instead of action, the side panel has a different key. { ... "side_panel": { &...
mylee's user avatar
  • 1,303
0 votes
Accepted

Print to Brother P-Touch using ESC/P from ASP.NET Webforms by IP

So the issue was definitely the format in witch I was sending data to the printer. The printer would not interpret the string and required a byte array to work. Something like this works. Dim IP ...
SoundWaves's user avatar
0 votes

ASP.NET on .NET 4.8 on Azure throws error 403 after 20 minutes of inactivity

As mentioned in the article, this issue can occur due to various reasons. If you are using Free Pricing Tier, the error could be due to the site has reached the billing limit and site has been ...
Pravallika KV's user avatar
0 votes

Filter Data Based on Time

Without some sample data and the expected result it's hard to tell what you realy want. Here is a blind guess of sample data and a query which results with the dataset you could use for different ...
d r's user avatar
  • 6,236
0 votes

RabbitMQ Connection Error " None of the specified endpoints were reachable"

In my case, after doing everything mentioned in above questions, when I update docker desktop and use latest rabbitmq: management, then connected perfectly.
Alimur Razi Rana's user avatar
0 votes
Accepted

ASP.Net: Can I fire "Application_Start" code programmatically?

There are two ways I can think of. A really easy way is to force a unload of the AppDomain, and then IIS will detect the unload, and re-load (recycle) the app pool for you. So, say behind some admin ...
Albert D. Kallal's user avatar
2 votes

How to listen to IIS shutdown event in ASP.NET

The modern way: I'm using .Net7. I have a 'Program.cs' file which ends in the line: app.Run(); I add a line of code after this (to call a static method on my Globals class): app.Run(); Globals....
Tim Cooper's user avatar
  • 10.4k
1 vote

.NET 8 Concurrency limiter to different rpc calls

You can use the EnableRateLimitingAttribute with corresponding policy name applied to the method implementations (and remove the RequireRateLimiting call): [EnableRateLimiting("GetPolicyName"...
Guru Stron's user avatar
  • 132k
0 votes
Accepted

ASP.NET Identity "new item scaffolded" not shown

After some search I found that Client-side Blazor apps use their own Identity UI approaches and can't use ASP.NET Core Identity scaffolding. Source: Scaffold Identity into an MVC project with ...
Wael Galal El Deen's user avatar
4 votes
Accepted

Is there a way to populate a HTML table from a database? (SQL Server, VB.NET, ASP.NET)

Well, you can fill out a HTML table, but you have "oh so" many better choices here. However, as a FYI, then if you tag the control (the table) with a runat="server", then code ...
Albert D. Kallal's user avatar
1 vote
Accepted

StringValues.Contains() always returns false

The Microsoft.AspNetCore.Http.HttpRequest defines a property called Headers which is an IHeaderDictionary. This interface defines an Accept property which is a StringValues. This type basically a ...
Peter Csala's user avatar
  • 21.1k
0 votes
Accepted

Blazor Standalone App doesn't save HTTP request cookies

I finally found the answer! You need to set the credentials (e.g. cookies) to Include on every request you send. You can do this with a custom DelegatingHandler: public class CookieDelegatingHandler : ...
Manuel's user avatar
  • 43
0 votes

Azure BLOB download yields 'Check internet connection' in browser

The error is caused by the line of code: response.Flush();. After removing it, the problem was resolved.
Neno's user avatar
  • 767
1 vote

Automapping problem when i try to map the collection from one entity to another

You could do something like ICollection<Adrese>? adreses = ((currentUser.AdreseConturi != null) ? currentUser.AdreseConturi : somefallback); but then, of course, you will need to define ...
Lajos Arpad's user avatar
  • 71.9k
0 votes

ASP.NET Radio Button Horizontal Direction, how to remove space between items

This worked for me .RadioButtonWidth label { margin-right: 10px; } <asp:RadioButtonList ID="abc" runat="server" RepeatDirection="Horizontal" CssClass="...
psychopython's user avatar
0 votes

Dropdown Menu Goes Beyond Right Side of Screen

Your js code of rect.right do not include the dropdown-submenu element. So, you can try this code as below, to calculate the right boundary of the dropdown-submenu element and add or remove the class ...
Yumiao Kong's user avatar
1 vote

ASP.Net Core Redirecting from POST endpoint to Custom URL

I solved my problem by sending response with 302 status code. You can see code below. [HttpPost] [Route("Callback")] [AllowAnonymous] public async Task<IActionResult> CallBackAsync(...
Akif Akkaya's user avatar
0 votes

How can i hadndle json data for registraton in my asp.net web api

How can i hadndle json data for registraton in my asp.net web api Acoroding to your error message, it might be happen due to couple of reason. First of all, if the request model doesn't match with ...
Md Farid Uddin Kiron's user avatar
0 votes

Dropdown Menu Goes Beyond Right Side of Screen

You need to override .dropdown-menu[data-bs-popper] class css from left: 0; to right:0; as below: .dropdown-menu[data-bs-popper] { right: 0; }
Vikas Jadhav's user avatar
  • 4,682
1 vote

Another way to get FilePath not Using Server.MapPath C #

The point of Server.MapPath is to convert a virtual path (e.g. a URL to a location in your web site) to a physical path. It sounds like your app is located on the c: drive. If this is the case, ...
John Wu's user avatar
  • 51.9k
0 votes

Blazor ProtectedSessionStorage timeout

I found that the problem was with the MaximumReceiveMessageSize, as mentioned in the comment by @mauro. To fix the issue, go into Program.cs (in the .Web project) add the following lines of code: ...
SendETHToThisAddress's user avatar
1 vote
Accepted

Backspace key not working while using Ajaxtoolkit masked edit extender and validator (ASP.NET, Microsoft Edge, Ajaxtoolkit)

Ok, now that I can try/test the markup with the newer version of the AjaxToolkit? When I paste in your sample markup, then the backspace does work fine. However, that is sure quite a bit of markup for ...
Albert D. Kallal's user avatar
0 votes

ASP.Net Core Redirecting from POST endpoint to Custom URL

The answer would be specific to the payment gateway you are using. As @akseli has mentioned in comment, Payment Gateways has success and Cancel URL parameters. Following code is implementation of ...
John Bhatt's user avatar
0 votes
Accepted

How to call Windows service methods from ASP.NET Web API?

As jeb mentioned in the comments, using communication protocols such as WCF or GRPC are valid options. I chose to go with named pipes. It worked well for my case because I just needed a simple, ...
ShockingRotom's user avatar
0 votes

Adding a SQL connection to my ASP.NET Core application - how to define ConnectionStrings

This is my connection string when I want to connect to sql server database on my local machine: "server=.; database=MyDB; Integrated Security=True;TrustServerCertificate=True; User Id=MyUserName; ...
Zahra's user avatar
  • 2,508
0 votes
Accepted

why modelstate.isvalid always false despite the picture property in model getting assigned

Model binding takes place before the code in your OnPostAsync method executes, and ModelState is not updated as a result of you assigning a value to the Picture property. You can use the ModelState....
Mike Brind's user avatar
  • 29.6k
0 votes

If I have an ASP.net application using Kestrel running inside a Kubernetes container, which Endpoint should the Kestrel server expose?

You needn't configure the Kestrel to other ip address, just use the as default localhost. Then after deployment, you will be able vist the application using "container" IP. What really ...
Qiang Fu's user avatar
  • 5,726
0 votes

What value to set ConcurrencyStamp in AspNetRoles table

When migrating data, you can add a GUID value to the ConcurrencyStamp field, but you need to make sure it is unique in your database. And it should be noted that if entity is modified, the value of ...
Yuning Duan's user avatar
  • 1,103
0 votes

Implementing Background thread for a long running task

There are many ways to do that, from the primitive Thread class, over Task to a full-fledged separate background process. Since the OP is tagged with the backgroundworker tag, a word about the ...
Mark Seemann's user avatar
0 votes

Is there a way to get different values from a single radiobuttonlist field used in ASP:Gridview

To retrieve the selected value from the radio button from grid view controller you could loop through each row and backend code ad get the selected value, below is the code: Gridview: <form id=&...
Jalpa Panchal's user avatar
0 votes

How to get SAML token using C#/ASP.NET

//This code will get you the SAML Token in C# protected HttpClient Client { get { if (client == null) { handler = new HttpClientHandler(); handler....
Ammar Bukhari's user avatar
0 votes

Is there a way to get different values from a single radiobuttonlist field used in ASP:Gridview

Sure, just keep in mind, that controls inside of the GridView repeat over and over. So, you don't have "one" control say called rblOptions, but you have a "new" control with an ID ...
Albert D. Kallal's user avatar
0 votes
Accepted

Context lost when IClientMessageInspector is configured on a WCF service and method is called with async/await

After talking with Microsoft, this behavior is by design. I ended up with a mix of the code I made and proposed to Microsoft for review and another approach made by some analyst on their side. The ...
bkqc's user avatar
  • 931
0 votes

What sets IsAuthenticated to true in ASP.NET using Cookie Authentication

The behavior you're observing is due to the way ASP.NET Core handles authentication cookies and user identity. Even though you don't have app.UseAuthentication() in your middleware pipeline, the ...
Gerardo's user avatar
0 votes

The form data doesn't insert in access database in .NET application

Change and debug your AddKadr method like below. Since your connection you are confirmed as correct try breaking AddKadr method and wrapping it out by a try-catch block if there are any errors. Also, ...
SELA's user avatar
  • 5,968
0 votes

Serilog.Sinks.Graylog works from a Web API app but does not appear to work from console app

.MinimumLevel.Debug() Try to switch it first to .MinimumLevel.Information() see what will happen
R.projects's user avatar
1 vote

Azure AD Authentication Issue with ASP.NET MVC Application Behind Proxy: Missing .AspNet.Cookies Cookie

Try adding the following configuration in web.config. According to https://techcommunity.microsoft.com/t5/iis-support-blog/changes-in-samesite-cookie-in-asp-net-core-and-how-it-impacts/ba-p/1150771 ...
Chris's user avatar
  • 21
0 votes

Docker Container for .NET 8 Web API Fails When Deployed to Azure Container Registry (ACR)

I created a sample ASP .NET 8 Web API and successfully deployed it to azure app service via Azure Container Registry. The error message you're encountering might be related to Environment ...
Sirra Sneha's user avatar
0 votes

Unable to cast object of type 'Server.Circuits.RemoteNavigationManager' to type 'WebView.Services.WebViewNavigationManager'

In the context of .NET MAUI with Blazor, the standard way to include Blazor components is using AddMauiBlazorWebView. MainProgram.cs should be like below: public static class MauiProgram { ...
Rena's user avatar
  • 34.4k
0 votes

Values from codebase and classid in object tag is not rendering

It is not at all clear why you using a "object" here? If you want to display a image, then a good choice is a image control. If I drop in a image control, and set it to your sample URL, say ...
Albert D. Kallal's user avatar
0 votes

How to change from readonly to not readonly of input in ASP.NET Core

You are trying to get the <input> elements under the #modalAddresses and #modalContacts <div> elements and stored in the inputsToModify (global) variable before the elements are rendered. ...
Yong Shun's user avatar
  • 46.9k
-1 votes

How can I get Entity Framework dynamic query result for web api result

Maybe just return a string and parse it when received. For example: SELECT CONVERT(NVARCHAR(MAX), Name) + '|' + CONVERT(NVARCHAR(MAX), Total) + '|' + CONVERT(NVARCHAR(MAX), Category) FROM TABLE_NAME ...
Geoff Davison's user avatar
0 votes

How to fix the status button appearing in the tasks column

I would suggest that a GridView would work rather well here. So, say this GridView, and note the markup for a button (row click). <asp:GridView ID="GridView1" runat=&...
Albert D. Kallal's user avatar

Top 50 recent answers are included