10

I'm on a Mac trying to locally host a copy of an old ASP-based site for testing purposes. Not (yet) using mod_mono for Apache, just the basic standalone XSP server. It was enough of an ordeal just getting to the point where I can at least display a ASP.NET error page from localhost.

If I point it to a .htm or .html file, it serves it up without complaint. But every ASP file I try gives an "Access Forbidden" error.

I'm guessing this means I need a config file for XSP, something like a .htaccess or web.config file, and need to whitelist those extensions as things it will serve. ( Which is pretty dumb, because why would anyone go to the trouble of installing Mono and XSP just to host static HTML files? )

xsp4 --help was no help, nor was man xsp, so here I am.

Application Exception
System.Web.HttpException
Access to file '/anysite/whateverpage.asp' is forbidden.

Description: HTTP 500.Error processing request.

Details: Error processing request.
Exception stack trace:
 at System.Web.DefaultHttpHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback callback, System.Object state) [0x0005e] in <79d7580b4e46487286a5f8386a98413d>:0 
 at System.Web.HttpApplication+<Pipeline>c__Iterator1.MoveNext () [0x00d9c] in <79d7580b4e46487286a5f8386a98413d>:0 
 at System.Web.HttpApplication.Tick () [0x00000] in <79d7580b4e46487286a5f8386a98413d>:0 
 Version Information: 4.6.2 (Stable 4.6.2.7/08fd525 Tue Nov 22 22:06:40 GMT 2016); ASP.NET Version: 4.0.30319.42000
blerg
  • 101
  • 2

1 Answers1

10

It looks like the problem is with what IIS would call handler mappings.

You said Not (yet) using mod_mono

Without it you would not get the .NET framework, so how would Apache know how to handle asp files?

Anthony Fornito
  • 9,526
  • 1
  • 33
  • 122
  • I mean I'm not using mod_mono because I'm not using Apache. Just [XSP](https://github.com/mono/xsp) as a standalone server, with no virtual application directories or any such configured, to serve the contents of "./" from the command line. Mod_mono wraps XSP so that Apache can hand asp files off to it. So if that's not working on its own, it probably won't work as a helper to Apache or nginX either. If anyone knows how to set up handler mappings for the xsp standalone server, that would solve my problem. – blerg Jan 04 '17 at 20:57