Home All Groups Group Topic Archive Search About

Seeking info on httpweblistener....

Author
9 Oct 2006 8:32 AM
smerf
There's damned little that I can find on this little gem.  Supposedly it
lets you create a mini webserver a lot easier than using sockets and covers
things like SSL encryption and authentication.

From what I can find it requires XP SP2 and above (can anybody verify
that?).

And, if you know of (or can find) any supporting info or code examples, I
would definitely be grateful.

Still searching......

Author
9 Oct 2006 8:48 AM
smerf
FYI : One other little irritating issue is that this class can only be run
under administrator privileges.

Show quoteHide quote
"smerf" <sm***@shroom.com> wrote in message
news:8OnWg.55032$vX5.37995@bignews8.bellsouth.net...
> There's damned little that I can find on this little gem.  Supposedly it
> lets you create a mini webserver a lot easier than using sockets and
> covers things like SSL encryption and authentication.
>
> From what I can find it requires XP SP2 and above (can anybody verify
> that?).
>
> And, if you know of (or can find) any supporting info or code examples, I
> would definitely be grateful.
>
> Still searching......
>
Author
9 Oct 2006 12:44 PM
Vadym Stetsyak
Hello, smerf!

s> FYI : One other little irritating issue is that this class can only
s> be run
s> under administrator privileges.

Nope, that's not true.
you can use httpcfg.exe util to configure HttpListener to work on some
other account.
Have a look at
( http://www.leastprivilege.com/HttpCfgACLHelper.aspx )

s> "smerf" <sm***@shroom.com> wrote in message
s>
s> news:8OnWg.55032$vX5.37995@bignews8.bellsouth.net...
>> There's damned
s> little that I can find on this little gem.  Supposedly
>> it
>> lets you
s> create a mini webserver a lot easier than using sockets and
>> covers
s> things like SSL encryption and authentication.

>> From what I can find it
s> requires XP SP2 and above (can anybody verify
>> that?).

>> And, if you
s> know of (or can find) any supporting info or code
>> examples, I
>> would
s> definitely be grateful.

>> Still searching......



searching......




--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Author
9 Oct 2006 1:28 PM
smerf
I saw that....but it looked to me like you had to have access to the machine
to make this work-around work.

There really is no way to distribute an app to the general population that
can use this class - that I can find.

Show quoteHide quote
"Vadym Stetsyak" <vady***@ukr.net> wrote in message
news:uQe6wA66GHA.1252@TK2MSFTNGP04.phx.gbl...
> Hello, smerf!
>
> s> FYI : One other little irritating issue is that this class can only
> s> be run
> s> under administrator privileges.
>
> Nope, that's not true.
> you can use httpcfg.exe util to configure HttpListener to work on some
> other account.
> Have a look at
> ( http://www.leastprivilege.com/HttpCfgACLHelper.aspx )
>
> s> "smerf" <sm***@shroom.com> wrote in message
> s>
> s> news:8OnWg.55032$vX5.37995@bignews8.bellsouth.net...
>>> There's damned
> s> little that I can find on this little gem.  Supposedly
>>> it
>>> lets you
> s> create a mini webserver a lot easier than using sockets and
>>> covers
> s> things like SSL encryption and authentication.
>
>>> From what I can find it
> s> requires XP SP2 and above (can anybody verify
>>> that?).
>
>>> And, if you
> s> know of (or can find) any supporting info or code
>>> examples, I
>>> would
> s> definitely be grateful.
>
>>> Still searching......
>
>
>
> searching......
>
>
>
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com
Author
9 Oct 2006 2:01 PM
smerf
The application in the link you provided does not work (at least on my XP
SP2 PC).

It doesn't see any accounts (admin or limited).


Show quoteHide quote
"Vadym Stetsyak" <vady***@ukr.net> wrote in message
news:uQe6wA66GHA.1252@TK2MSFTNGP04.phx.gbl...
> Hello, smerf!
>
> s> FYI : One other little irritating issue is that this class can only
> s> be run
> s> under administrator privileges.
>
> Nope, that's not true.
> you can use httpcfg.exe util to configure HttpListener to work on some
> other account.
> Have a look at
> ( http://www.leastprivilege.com/HttpCfgACLHelper.aspx )
>
> s> "smerf" <sm***@shroom.com> wrote in message
> s>
> s> news:8OnWg.55032$vX5.37995@bignews8.bellsouth.net...
>>> There's damned
> s> little that I can find on this little gem.  Supposedly
>>> it
>>> lets you
> s> create a mini webserver a lot easier than using sockets and
>>> covers
> s> things like SSL encryption and authentication.
>
>>> From what I can find it
> s> requires XP SP2 and above (can anybody verify
>>> that?).
>
>>> And, if you
> s> know of (or can find) any supporting info or code
>>> examples, I
>>> would
> s> definitely be grateful.
>
>>> Still searching......
>
>
>
> searching......
>
>
>
>
> --
> Regards, Vadym Stetsyak
> www: http://vadmyst.blogspot.com
Author
9 Oct 2006 2:34 PM
Willy Denoyette [MVP]
run the tool and enter a, you wil be prompted to enter an account, press
enter when done and the tool will return the command to enter from the
commandline.
Note that this is a sample tool, it includes the source so it can be easily
adapted to suit your specific needs.

Willy.

PS. Don't crosspost to inappropriate NG's. This question belongs to the
,microsoft.public.dotnet.framework.aspnet.security.

Show quoteHide quote
"smerf" <sm***@shroom.com> wrote in message
news:BCsWg.46194$KR1.2549@bignews2.bellsouth.net...
| The application in the link you provided does not work (at least on my XP
| SP2 PC).
|
| It doesn't see any accounts (admin or limited).
|
|
| "Vadym Stetsyak" <vady***@ukr.net> wrote in message
| news:uQe6wA66GHA.1252@TK2MSFTNGP04.phx.gbl...
| > Hello, smerf!
| >
| > s> FYI : One other little irritating issue is that this class can only
| > s> be run
| > s> under administrator privileges.
| >
| > Nope, that's not true.
| > you can use httpcfg.exe util to configure HttpListener to work on some
| > other account.
| > Have a look at
| > ( http://www.leastprivilege.com/HttpCfgACLHelper.aspx )
| >
| > s> "smerf" <sm***@shroom.com> wrote in message
| > s>
| > s> news:8OnWg.55032$vX5.37995@bignews8.bellsouth.net...
| >>> There's damned
| > s> little that I can find on this little gem.  Supposedly
| >>> it
| >>> lets you
| > s> create a mini webserver a lot easier than using sockets and
| >>> covers
| > s> things like SSL encryption and authentication.
| >
| >>> From what I can find it
| > s> requires XP SP2 and above (can anybody verify
| >>> that?).
| >
| >>> And, if you
| > s> know of (or can find) any supporting info or code
| >>> examples, I
| >>> would
| > s> definitely be grateful.
| >
| >>> Still searching......
| >
| >
| >
| > searching......
| >
| >
| >
| >
| > --
| > Regards, Vadym Stetsyak
| > www: http://vadmyst.blogspot.com
|
|
Author
10 Oct 2006 12:02 AM
Arne_Vajhøj
smerf wrote:
> There's damned little that I can find on this little gem.  Supposedly it
> lets you create a mini webserver a lot easier than using sockets and covers
> things like SSL encryption and authentication.
>
> From what I can find it requires XP SP2 and above (can anybody verify
> that?).
>
> And, if you know of (or can find) any supporting info or code examples, I
> would definitely be grateful.

I have a very simple example:

using System;
using System.IO;
using System.Net;

// two valid URL's
//   http://localhost/test/show
//   http://localhost/test/exit
public class WebServer2
{
     public static void Main(string[] args)
     {
         HttpListener srv = new HttpListener();
         srv.Prefixes.Add("http://localhost/test/");
         srv.Start();
         while(true)
         {
             HttpListenerContext ctx = srv.GetContext();
             HttpListenerRequest req = ctx.Request;
             HttpListenerResponse resp = ctx.Response;
             StreamWriter sw = new StreamWriter(resp.OutputStream);
             if(req.Url.AbsolutePath == "/test/exit")
             {
                 sw.WriteLine("Goodbye");
                 sw.Close();
                 break;
             }
             else if(req.Url.AbsolutePath == "/test/show")
             {
                 foreach(string hdrnam in req.Headers.AllKeys)
                 {
                     string hdrval = req.Headers[hdrnam];
                     sw.WriteLine(hdrnam + " = " + hdrval + "<br>");
                 }
             }
             else
             {
                 sw.WriteLine("Unknown URL");
             }
             sw.Close();
         }
         srv.Stop();
         srv.Close();
     }
}

Arne