Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

538
Views
dotnet core 3.1 IIS Error "An attempt was made to access a socket in a way forbidden by its access permissions (10013)"

I've dotnet core 3.1 project. I launched a few machines on iis. But today i can't launched the app on iis. I can launch with "dotnet <app.dll>" command and everything's good. But when i launch on IIS, it gives this error.

"crit: Microsoft.AspNetCore.Server.Kestrel[0] Unable to start Kestrel. System.Net.Sockets.SocketException (10013): An attempt was made to access a socket in a way forbidden by its access permissions. at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)"

Any suggestion ?

PS: I checked my ports in use with command netstat -o. There is no using from any application

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

netsh interface ipv4 show excludedportrange protocol=tcp

Look at the ports listed and see if it overlaps with your port.

If so, rebooting your PC or changing the port has fixed this for me.

I'm using port 56240, Windows Update sometimes takes that range.

over 4 years ago · Santiago Trujillo Report

0

Finally I found my solution on my own. I removed UseKestrel() line from program.cs and everything's good.

        var config = new ConfigurationBuilder().AddCommandLine(args).Build();

       return  Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder =>
            {
                webBuilder.UseStartup<Startup>();
                webBuilder.UseKestrel(); **//remove this line.**
                webBuilder.UseUrls();
                webBuilder.UseIISIntegration();
                
            }).ConfigureServices((context, services) =>
            {
                services.AddHostedService<Worker>();
                services.AddHostedService<MonitorWorker>();
                services.AddHostedService<TransferWorker>();
            });

    }
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!