Andrew Richardson
Andrew Richardson

Reputation: 299

Cannot access my asp.net pages through Mono

I'm trying to set up a local asp.net server on OSX using mono and I feel like I've followed all the steps layed out in the documentation but I getting thrown this error when I go to view my test page on the local host.

When I attempt to route my web browser straight to the test file I get the source code so I know that part is there but it doesn't want to show it to me.

What's the issue here?

Upvotes: 3

Views: 181

Answers (2)

sisve
sisve

Reputation: 19781

You're using the file extension .asp instead of .aspx. Asp.net will not touch it when looking for which file to show (when surfing to /), or process the content when browsing directly to it.

Upvotes: 1

Artur
Artur

Reputation: 7257

Looks like the problem here lies on HTTP header side. Your browser shows your html source as if it was an editor. This happens when you have your Content-Type header missing, malformed or set to 'text/plain'.

For your page to show correctly you must have:

Content-Type: text/html

How it is set is easy to find - get a Firefox browser with Firebug plugin - when activated go to 'net' tab to check your request responces.

Upvotes: 1

Related Questions