West Wind WebSurge
WebSurge
Gravatar is a globally recognized avatar based on your email address. WebSurge
  John Casber
  All
  Nov 20, 2023 @ 10:32am

Hello there -

I'm attempting to conduct a load test on an internal website before its public release. Upon downloading the load testing tool WebSurge today, I tried to execute it, but it's requesting that the websurge-allow.txt file be accessible via HTTP. The application/website we developed is built using .NET version 5.0.

I've delved into articles and code samples on configuring URL rewrite, but none of them have been successful. Could you please assist me in resolving this issue so I can begin testing my application? Thanks,

Gravatar is a globally recognized avatar based on your email address. re: WebSurge
  John Casber
  John Casber
  Nov 21, 2023 @ 06:25am

Got it working..

[AllowAnonymous]
        [HttpGet]
        [Route("websurge-allow.txt")]
        public IActionResult WebSurgeAllow()
        {
            string webRootPath = _webHostEnvironment.ContentRootPath;
            string path = Path.Combine(webRootPath, "websurge-allow.txt");
            return PhysicalFile(path, "text/plain");
        }
Gravatar is a globally recognized avatar based on your email address. re: WebSurge
  Rick Strahl
  John Casber
  Nov 21, 2023 @ 04:15pm

You should be able to drop websurge-allow.txt into your wwwroot folder in a ASP.NET Core app. It's a static file - as long as you are loading the static file handler (either from you host Web server or from within the ASPNET startup code) that should load.

+++ Rick ---

© 1996-2023