简体   繁体   中英

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM