1,171 questions
1
vote
1
answer
72
views
Connecting DB from godaddy to Azure web app
I have an ASP.NET Core 6 web app on Azure that uses a database from godaddy. The problem is that I get an error in the connection string, but I can't find out what the problem is.
In the Azure ...
0
votes
1
answer
99
views
How to fix ingress into a HTTPS ASP.NET Core 6 app with Kestrel with a custom domain
I am having some serious issues with running my app in my pipeline to Azure.
I am building an ASP.NET Core 6 app which runs on 0.0.0.0:5001. My dockerfile looks like this:
FROM mcr.microsoft.com/...
0
votes
1
answer
61
views
SignalR - .NET Core 6.0 working in local and failing with cors error once deployed
I am implementing simple signal R real-time messaging. It works absolutely fine in local but moment its deployed i get CORS error
8DUpdate.html:1 Access to fetch at 'https://test.test.test.com/...
0
votes
2
answers
176
views
ASP.NET Core 6 MVC: UseStatusCodePagesWithReExecute redirects before Windows authentication occurs
I have an ASP.NET Core 6 MVC App with Windows authentication. I use UseStatusCodePagesWithReExecute to handle failure status codes.
When I run the application in Visual studio 2022, it directly goes ...
0
votes
0
answers
51
views
How to implement enhanced security on a website to be access on specific Mobile/Tablets only
I have developed a website and I want certain mobile or tablets to access the application after login which are registered within the system and approved by administrator through ACL list
Is it ...
0
votes
1
answer
216
views
How to add swagger to ASP.NET Core Web API areas controllers
I am using .NET 6, and I am trying to add Swagger to existing service, controllers are placed in two different folders based on it's functionality, one set of controllers are under Controllers folder, ...
0
votes
0
answers
22
views
Cannot Upload image of 50 MB in Asp.net Core 6 [duplicate]
I tried the below code by changing upload limit of 100 MB and tried uploading 50 MB file and still get error 413 Payload too large and after that i tried to follow steps of adding attribute to the ...
1
vote
1
answer
682
views
System.IO.InvalidDataException: 'The archive entry was compressed using an unsupported compression method.'
I am using ASP.NET Core 6.0. I have an API which returns compressed data. Simplified version of my code looks like this:
[HttpPost("[action]", Name = "GetData")]
public ...
-1
votes
1
answer
147
views
Razor page not loading but no errors
I have a razor page that has several AJAX functions running to fetch data and update it.
The pages work fine locally and in SOME of the production instances.
But in a few instances, I get a console ...
0
votes
1
answer
61
views
Program.cs file after ASP.NET Core 6
I wrote a simple token generating API with ASP.NET Core 6. I need to do an integration test. When I write the integration test, it needs to reference the Program class, but I get an error
The ‘...
0
votes
0
answers
68
views
Response to Preflight request does not pass Access Control Check:No Access Control Allow Orig header is present on the requested header
I am getting this error when calling .net core 6 API from Ajax and passing Authorization in header. Configuration in program.cs:
builder.Services.AddCors(options=\> { options.AddPolicy("Name ...
0
votes
1
answer
390
views
Redirecting failed Entra ID authentication error page back to our application
Requirement:
When any error occurs during Entra ID authentication, a custom error page should open in new tab and preserving the original error message in the first tab.
Entra ID authentication flow:
...
0
votes
1
answer
216
views
ASP.NET Core 6 : HttpContext.Request.Body stream cant go higher than 4096
I'm writing an ASP.NET Core 6 program which receives many files and writes them to a SQLite database.
I'm using the following code on the client to send the file:
var request = new HttpRequestMessage()...
0
votes
2
answers
1k
views
.NET 6.0 error. Could not load file or assembly System.Diagnostics.PerformanceCounter
I got this error when I set up a .NET Core 6 app:
Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'System.Diagnostics.PerformanceCounter, Version=8.0.0.0, ...
0
votes
1
answer
104
views
Running the application ASP.NET Core 6 as a Windows service
My problem is that when launching the ASP.NET Core 6 application through the windows service, I get the following error:
System.InvalidOperationException: Unable to configure HTTPS endpoint. No ...
0
votes
0
answers
55
views
ASP.NET Core 6 MVC Razor : checkbox list showing checked when value of column is false
I wanted to set up a list with checkboxes on a reminder column to remind people to continue with their application which could be ticked and then returned to the controller to update the source ...
1
vote
0
answers
56
views
ASP.NET Core 6 Web API : autogenerate server certificate (same name as projectname)
I have an ASP.NET Core 6 Web API project running with kestrel, which hosts an OPC UA client library (OPCLabs easyopc, based on OPCFoundation OPC UA client library). This client library is wrapped in a ...
0
votes
1
answer
71
views
Error 500 or 404 when trying to connect localhost to the SQL Server DB by string in appsettings.json
I have SQL Server on the server. It has a username/password and a mixed auth. If I open port 1433 on the server and connect to the database via IP:Port, site works as it should.
A string in ...
0
votes
1
answer
81
views
API cannot see Website middleware assignments to HTTPRequest
I am trying to understand why the API cannot see what assignments I am making in the middleware of the Website.
public async Task InvokeAsync(HttpContext httpContext) { try { ...
0
votes
0
answers
59
views
Visual Studio C# (.NET Core 6): Text and UI Elements Pixelated, Not Smooth (ugly)
I have been experiencing this issue for a long time and have tried everything I could think of to resolve it. In Visual Studio C# (.NET Core 6), the text and UI elements are consistently pixelated and ...
0
votes
2
answers
72
views
Unable to access the registration page in ASP.NETCore
Account folder in project and Register.cs modelProgram.cs codeThis is the user registration controller code on the site that returns the registration view, but when it runs and clicks on the ...
0
votes
1
answer
141
views
SQLite throws exception during connection opening when SingleFile is true
I am trying to pack my app in a single file, but I keep getting this exception that kills my exe:
Value cannot be null. (Parameter 'path1')
System.Private.CoreLib
at System.IO.Path.Combine(String ...
0
votes
0
answers
35
views
ASP.NET Core 6 sending data from view to controller
I'm using ASP.NET Core 6, and I'm wondering if I can send data from one HTML view to the same controller but to two different methods using a single submit button? I'm using a single ASP form, and so ...
0
votes
2
answers
109
views
Remove id in url in .net core
How do I omit the Id from the URL? Change from this URL:
https://localhost:7002/Product/109
to this instead ====>
https://localhost:7002/Product/productName
My controller is:
[Route("/...
0
votes
1
answer
403
views
How to modify the default AspNetUsers table in ASP.NET Core 6.0 MVC?
I am new to ASP.NET Core 6.0 Identity. I am planning to achieve the following:
Make the default ID field to be of type int instead of GUID in the AspNetUsers table.
I want to rename this field from ...