XSP4 localhost doesn't respond (Windows 8.1)

547 Views Asked by At

I have installed Mono 4.0.2 under Windows 8.1 64bit

Now I'm testing how it runs: everything is ok with console and WF applications

However, I can't run any ASP.NET app/page. I tried my own web apps and the simple example from there, the result is the same:

  • xsp4 starts, listening on port 9000, shows root directory (webapp directory) and waits.
  • I try to access localhost:9000/, localhost:9000/hello.aspx
  • Browser keeps waiting for response forever, nothing happens in console (I tried --verbose and --loginfo).

I tried different ports and both mono.exe and xsp4.exe are in firewall exception list. IPv6 is disabled. Test-NetConnection succeeds, but telnet doesn't go further than "Connecting To 127.0.0.1..."

How do I make it work properly?

Here is that page that I'm trying to access for test:

<%@ Page Language="C#" %>
<html>
<head>
   <title>Sample Calendar</title>
</head>
<asp:calendar showtitle="true" runat="server">
</asp:calendar>

netstat output:

#just launched xsp4. 2772 is mono.exe
PS C:\Users\Orif> netstat -aon | findstr 9000
  TCP    0.0.0.0:9000           0.0.0.0:0              LISTENING       2772

#now tried to access a page through firefox (5008)
PS C:\Users\Orif> netstat -aon | findstr 9000
  TCP    0.0.0.0:9000           0.0.0.0:0              LISTENING       2772

  TCP    127.0.0.1:2199         127.0.0.1:9000         ESTABLISHED     5008

  TCP    127.0.0.1:9000         127.0.0.1:2199         ESTABLISHED     2772

UPDATE

I've installed Xamarin Studio which has own copy of xsp4. That copy works perfectly fine.

3

There are 3 best solutions below

0
On BEST ANSWER

It is still unclear what was causing the issue. Maybe it were system updates, or indeed it was a bug, but I've just installed Mono 4.4 and the issue is gone.

2
On

If hello.aspx and hello.aspx.cs is located in /var/www/firstaspnet , then you must run xsp4 from the same directory, /var/www/firstaspnet.

5
On

Seems like it should be working as it is not throwing a bind error on port 9000 and thus nothing else is using that port. The calander example you listed runs fine for me with no errors.

Try some quick diagnostics:

% Turn firewall off

% Use telnet if you have it installed to see if you can connect to that port:

ps> telnet 127.0.0.1 9000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

% And test via Powershell

Test-NetConnection -ComputerName 127.0.0.1 -port 9000 -InformationLevel Detailed
~~~
TcpTestSucceeded         : True

Assuming that works fine, try the complete XSP test directory installed by Mono (located under your install path ...\lib\xsp\test)

Note: you need admin rights to that directory otherwise some of those examples for fail. Start a cmd/powershell session as admin and then cd to the test dir and start xsp4.

Still not connected?

Try using the actual IP address of your PC instead of localhost. Start up xsp4 and bind it your network IP address:

xsp4 --address=xxx.xxx.xxx.xxx --port=9000

telnet xxx.xxx.xxx.xxx --port=9000

Also checkout your hosts file to see if localhost's ip is remapped(?)