3

See duplicate: Customizing the cassini webserver


I have a web service hosted using Cassini web server. It works fine if I reference it by localhost, but when I use my machine's name (even using the browser locally), I get:

Server Error in '/' Application.
HTTP Error 403 - Forbidden.
Version Information: Cassini Web Server 1.0.40305.0 

How can I configure it to accept all requests?

Community
  • 1
  • 1
Grzenio
  • 35,875
  • 47
  • 158
  • 240

3 Answers3

3

Cassini is specifically build to reject any outside connections. You could rebuild from sourcecode if you want it to accept outside connections.

Edit:

In reply to the below comment on what to edit in the sourcecode, you'd probably want to change the following in Server.cs on line 88:

_socket = CreateSocketBindAndListen(AddressFamily.InterNetwork,
             IPAddress.Loopback, _port);

Into something like this:

_socket = CreateSocketBindAndListen(AddressFamily.InterNetwork,
             IPAddress.Any, _port);

This will bind the listening socket to all available IP addresses on the system instead of only to the localhost address (127.0.0.1).

Benjamin Wegman
  • 465
  • 4
  • 15
2

To update this answer, IIS Express is a new alternative that allows this.

http://weblogs.asp.net/scottgu/archive/2010/06/28/introducing-iis-express.aspx

makerofthings7
  • 60,103
  • 53
  • 215
  • 448
0

To avoid anyone else having to go further, if you need a lightweight web server for production use, IIS-Express is not recommended (by themselves) for that purpose .

nchaud
  • 377
  • 3
  • 13