473,320 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Seeking info on httpweblistener....

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......
Oct 9 '06 #1
8 1642
FYI : One other little irritating issue is that this class can only be run
under administrator privileges.

"smerf" <sm***@shroom.comwrote in message
news:8O*******************@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......

Oct 9 '06 #2
Not quite true; you can open this up ussing an admin tool, to say "group <x>
is allowed to use port <yto listen to <z>" etc.
http://www.oreillynet.com/windows/bl..._nonadmin.html
And if you google with the correct class name (HttpListener) you might get
some decent hits ;-p
http://west-wind.com/weblog/posts/3748.aspx
(just 1 of many)
Oct 9 '06 #3
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.

"Vadym Stetsyak" <va*****@ukr.netwrote in message
news:uQ**************@TK2MSFTNGP04.phx.gbl...
Hello, smerf!

sFYI : One other little irritating issue is that this class can only
sbe run
sunder 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.comwrote in message
s>
snews:8O*******************@bignews8.bellsouth.net ...
>>There's damned
slittle that I can find on this little gem. Supposedly
>>it
lets you
screate a mini webserver a lot easier than using sockets and
>>covers
sthings like SSL encryption and authentication.
>>From what I can find it
srequires XP SP2 and above (can anybody verify
>>that?).
>>And, if you
sknow of (or can find) any supporting info or code
>>examples, I
would
sdefinitely be grateful.
>>Still searching......

searching......


--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Oct 9 '06 #4
the class name is windows.net.httpweblistener

And, the tool you mention is for those that have command line access to a
PC. This is useless for distributed applications.

"Marc Gravell" <mg******@rm.comwrote in message
news:uZ****************@TK2MSFTNGP03.phx.gbl...
Not quite true; you can open this up ussing an admin tool, to say "group
<xis allowed to use port <yto listen to <z>" etc.
http://www.oreillynet.com/windows/bl..._nonadmin.html
And if you google with the correct class name (HttpListener) you might get
some decent hits ;-p
http://west-wind.com/weblog/posts/3748.aspx
(just 1 of many)

Oct 9 '06 #5
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" <va*****@ukr.netwrote in message
news:uQ**************@TK2MSFTNGP04.phx.gbl...
Hello, smerf!

sFYI : One other little irritating issue is that this class can only
sbe run
sunder 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.comwrote in message
s>
snews:8O*******************@bignews8.bellsouth.net ...
>>There's damned
slittle that I can find on this little gem. Supposedly
>>it
lets you
screate a mini webserver a lot easier than using sockets and
>>covers
sthings like SSL encryption and authentication.
>>From what I can find it
srequires XP SP2 and above (can anybody verify
>>that?).
>>And, if you
sknow of (or can find) any supporting info or code
>>examples, I
would
sdefinitely be grateful.
>>Still searching......

searching......


--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com

Oct 9 '06 #6
HttpWebListener?
Are you sure of that? 'cos MSDN has never heard of it... It has heard of
HttpListener, however. And I've used it a fair bit, so without meaning to
sound rude - please double check, and if you are talking about
HttpWebListener in "Frank's handy class library", then you might want to
give us a clue what that is...

And "distributed applications" can mean a whold range of things... depending
on how you interpret it, you can still have a pre-req that they enable (as
an admin) this usage (via an installshield you supply), and you can still
use ClickOnce (as a user) to distribute the main app.

It won't work for browser clients, obviously.

Marc
Oct 9 '06 #7
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 .

"smerf" <sm***@shroom.comwrote in message
news:BC******************@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" <va*****@ukr.netwrote in message
| news:uQ**************@TK2MSFTNGP04.phx.gbl...
| Hello, smerf!
| >
| sFYI : One other little irritating issue is that this class can only
| sbe run
| sunder 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.comwrote in message
| s>
| snews:8O*******************@bignews8.bellsouth.net ...
| >>There's damned
| slittle that I can find on this little gem. Supposedly
| >>it
| >>lets you
| screate a mini webserver a lot easier than using sockets and
| >>covers
| sthings like SSL encryption and authentication.
| >
| >>From what I can find it
| srequires XP SP2 and above (can anybody verify
| >>that?).
| >
| >>And, if you
| sknow of (or can find) any supporting info or code
| >>examples, I
| >>would
| sdefinitely be grateful.
| >
| >>Still searching......
| >
| >
| >
| searching......
| >
| >
| >
| >
| --
| Regards, Vadym Stetsyak
| www: http://vadmyst.blogspot.com
|
|
Oct 9 '06 #8
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
Oct 9 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: John MacLeod | last post by:
I'm stumped... If anyone here considers themselve's knowledgeable about databases & sql, and is open to a challenge, I would truly appreciate their help. I have a fairly limited knowledge of...
2
by: Matthijs van Waveren | last post by:
"Your opportunity to be a RECOGNIZED EXPERT in the HPC Community" The SPEC High Performance Group is seeking candidates for a benchmark suite based on Message Passing Interface (MPI)...
29
by: Jim | last post by:
I want to extract data from several websites that I visit daily. I'd like to condense the info into a single web page that I can visit (instead of the multiple websites I have to visit now to get...
1
by: BinnuChowdary | last post by:
Very Good news for all freshers and especially those who want to shift to Dotnet Technologies We have established an Training and Development Center Named Z-Axis Technologies in Our City at KPHB,...
5
by: smerf | last post by:
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. ...
3
by: Jia Lu | last post by:
Hello all I see there are lots of flat db or db-like modules in the standard python modules. What about the keywords seeking speed of them ? (I want to put about 10000 articles with 10000...
0
by: Reedick, Andrew | last post by:
<snip> I have a Perl background and have found the O'Reilly books to be useful. The Learning Python book (or whatever it's called) is good because it covers the paradigm shifts and potential...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.