Results 1 to 3 of 3

Thread: [RESOLVED] Embedded Web Server that supports ASP.Net 4

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2007
    Posts
    520

    Resolved [RESOLVED] Embedded Web Server that supports ASP.Net 4

    Hello guys,

    I am trying to make a asp.net app easier to use for my client; Currently I have him download Abyss Web Server and configure it, however that is causing him headaches. I am now looking into a Embedded Web Server.


    I have read I can use Mono's Web Server that will run off of .NET versus the Mono platform if on windows; And I tried to use it, however I can't get anywhere special.

    ASPNetServe looks great, but it appears it only uses .NET 2-3.x, and unfortunately the controls i use will not allow me to downgrade from 4 to 3.5. I keep receiving not declared messages.


    While using Mono.WebServer, I am using the following code:

    VB Code:
    1. Imports System.Net
    2. Imports Mono.WebServer
    3.  
    4. Public Class myserv
    5.     Dim port As Integer = 80
    6.     Dim path As String = "E:\Clients\Chuck\Website\Photoviewer\Photoviewer\"
    7.     Dim websource As XSPWebSource = New XSPWebSource(IPAddress.Any, port)
    8.     Dim WebAppServer As ApplicationServer = New Mono.WebServer.ApplicationServer(websource)
    9.  
    10.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    11.  
    12.  
    13.         'Dim cmdLine As String = port & ":/:" & path
    14.  
    15.         WebAppServer.AddApplication(vbNull, 80, "/", path)
    16.         'websource.SetListenAddress(80)
    17.         WebAppServer.Start(True)
    18.  
    19.         MsgBox("Servers Started")
    20.     End Sub
    21.  
    22.     Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    23.         WebAppServer.Stop()
    24.         MsgBox("Servers Stopped")
    25.     End Sub
    26.  
    27.     Private Sub myserv_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    28.  
    29.     End Sub
    30. End Class


    The server starts up, however when I try to visit http://localhost/ it just hangs. Nothing gets returned to the browser.



    Any help or recommendations of me using a easily controlled standalone, or some form of embedded web server would be fantastic. Thanks.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2007
    Posts
    520

    Re: [RESOLVED] Embedded Web Server that supports ASP.Net 4

    Fixed the issue.

    The debug messages were actually being sent to a console which helped me fix it.

    My path was wrong, and for some reason it was also looking for the Mono.WebServer & Mono.Security dll's in the website...Once I did that, everything worked fine.

  3. #3
    New Member
    Join Date
    Apr 2008
    Posts
    13

    Re: [RESOLVED] Embedded Web Server that supports ASP.Net 4

    Quote Originally Posted by TCarter View Post
    Fixed the issue.

    The debug messages were actually being sent to a console which helped me fix it.

    My path was wrong, and for some reason it was also looking for the Mono.WebServer & Mono.Security dll's in the website...Once I did that, everything worked fine.
    Excuse me, sorry for reviving an old post, but I'm wondering how to fix this too. How exactly did you go about fixing this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width