New answers tagged asp.net
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 ...
-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 ...
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.
(?!....
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 ...
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.
0
votes
launchSettings.json launchUrl doesn't work "api/values"
The solution for me was modify launch.json...
{
"version": "0.2.0",
"configurations": [
{
[...]
"serverReadyAction": {
...
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.
...
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": {
&...
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 ...
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 ...
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 ...
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.
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 ...
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....
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"...
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 ...
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 ...
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 ...
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 : ...
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.
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 ...
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="...
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 ...
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(...
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 ...
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;
}
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, ...
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:
...
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 ...
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 ...
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, ...
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; ...
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....
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 ...
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 ...
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 ...
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=&...
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....
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 ...
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 ...
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 ...
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, ...
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
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 ...
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 ...
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
{
...
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 ...
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.
...
-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
...
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=&...
Top 50 recent answers are included
Related Tags
asp.net × 374709c# × 177240
asp.net-mvc × 38866
javascript × 34202
.net × 27318
jquery × 26077
vb.net × 18748
html × 15445
gridview × 14350
iis × 12179
webforms × 11983
sql-server × 11652
ajax × 10588
asp.net-core × 10123
sql × 10053
entity-framework × 8420
css × 7940
asp.net-web-api × 7920
asp.net-mvc-4 × 7747
visual-studio × 6285
web-services × 5953
asp.net-mvc-3 × 5614
razor × 5593
linq × 5451
json × 4767