You do not have permission to access the IIS configuration file – Web app error

I was able to solve this issue doing the following: 1- Go to C:\Windows\System32\inetsrv and double click on directory config and accept the warning message. 2- Go to C:\Windows\System32\inetsrv\config directory and double click on directory Export and accept the warning message. Then you will be able to run the app in your local IIS without … Read more

How to include XML comments files in Swagger in ASP.NET Core

For .Net Core 2 up to 8* versions it’s slightly different, for those who come across it using a newer version you would create your private void ConfigureSwagger(IServiceCollection services) constructor, add the reference to swagger services.AddSwaggerGen(c => { c.SwaggerDoc(/*populate with your info */); then define a new parameter which will be the path for your … Read more

Error: Each parameter in constructor must bind to an object property or field on deserialization

but i don’t deserialize anything, i don’t understand. You might not do it directly, but you certainly ask the framework to deserialize something for you: [HttpPost] public async Task<IActionResult> UpdateEquipment(EquipementDto equipment) Here you tell the framework you expect the call to contain a serialized string of json representing an object matching your EquipementDto and to … Read more

How to use executeReader() method to retrieve the value of just one cell

using (var conn = new SqlConnection(SomeConnectionString)) using (var cmd = conn.CreateCommand()) { conn.Open(); cmd.CommandText = “SELECT * FROM learer WHERE id = @id”; cmd.Parameters.AddWithValue(“@id”, index); using (var reader = cmd.ExecuteReader()) { if (reader.Read()) { learerLabel.Text = reader.GetString(reader.GetOrdinal(“somecolumn”)) } } }

How to force Visual Studio to re-create the SSL certificate for a .NET Core Web Application running Kestrel?

I finally figured it out. For anyone else who runs into this, the steps to fix it are: All localhost certificates must be deleted in certificate manager. They can be found in Personal and Trusted Root The secrets.json file must be deleted. This can be found in \Users\[user]\AppData\Roaming\Microsoft\UserSecrets\ In powershell, re-run dotnet dev-certs https –trust … Read more

net::ERR_CERT_AUTHORITY_INVALID in ASP.NET Core

Do this in the order dotnet dev-certs https –clean Remove your keys and pem from C:\Users\%username%\AppData\Roaming\ASP.NET\https dotnet dev-certs https –trust Run SPA project with “start”: “set HTTPS=true&&react-scripts start” If you run your project(Point 4) before anything else. The authority is not trusted(done by 3) and results in authority invalid errors

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)