I have a C# script I'm trying to call via HTTP on IIS7. When I make a call to it, I get the following.

I am having an issue where I am trying to serve .cs files in iis 7 but I'm not sure what to use as a handler mapping? I have allowed the file to be executed but I get this when I go to it.

HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

I am not sure what handler mapping to use. I haven't found any other references. I know the script works because when I go to rextester.com and test it in C# compiler, it works. Trying to just do it locally on my box with the same result that just fetches an API key.

  • IIS does not support C# script. What you see from sites like rextester.com is not executing C# on the web page or web server, but might delegate to a worker engine elsewhere (such as a C# compiler hosted in a console application). That's much bigger a project with multiple components, so you won't merely clone that by vanilla IIS or a simple IIS extension. – Lex Li Dec 15 '18 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.