473,378 Members | 1,094 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,378 software developers and data experts.

HttpListener in VS2005

Hi all,
I am using HttpListener class of VS2005 to send HTTP response . i am writing
data by outputStream and closing ResponseContext. Even i used stream.flush,
stream.close methods, i am getting error "cannot close output stream before
write all bytes to client". How do i close this problem?

expecting your valuable points on the above....

thankx...
rajManickam
Nov 19 '05 #1
2 1619
In what context are you using the HttpListener? Typically you use that if
you're desire is to host your own HTTP server all in you own code. If this
what you're doing, there's a MSDN article that shows an example:

http://msdn.microsoft.com/msdnmag/is...n/default.aspx

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi all,
I am using HttpListener class of VS2005 to send HTTP response . i am
writing
data by outputStream and closing ResponseContext. Even i used
stream.flush,
stream.close methods, i am getting error "cannot close output stream
before
write all bytes to client". How do i close this problem?
expecting your valuable points on the above....

thankx...
rajManickam


Nov 19 '05 #2
Dear Brock Allen,

Thanks for reply..

yes..i am trying to create my own HTTP Server to maintain some html pages
with jar files (html file having jarfile. aspx files will have link to html
pages )... with the help of the article what you have refered.. but when i am
sending binary data to client ...that time i am getting this error. when i am
trying with TCP listener ..it is working fine.. (which will not support aspx
files)..i need to use HTTP listener..

give me your idea...

again thanks,

cheers,
Raj

"Brock Allen" wrote:
In what context are you using the HttpListener? Typically you use that if
you're desire is to host your own HTTP server all in you own code. If this
what you're doing, there's a MSDN article that shows an example:

http://msdn.microsoft.com/msdnmag/is...n/default.aspx

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi all,
I am using HttpListener class of VS2005 to send HTTP response . i am
writing
data by outputStream and closing ResponseContext. Even i used
stream.flush,
stream.close methods, i am getting error "cannot close output stream
before
write all bytes to client". How do i close this problem?
expecting your valuable points on the above....

thankx...
rajManickam


Nov 19 '05 #3

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

Similar topics

1
by: Antimon | last post by:
Hi, Anyone using the new System.Net.HttpListener class included in 2.0? How about the performance? And can it register for example "http://host:80/app" to use with iis running website on...
3
by: Martin | last post by:
How does one set up basic authentication on an HttpListener? I know I need to set the HttpListener.AuthenticationSchemes to AuthenticationSchemes.Basic but then I'm unsure how and against what...
1
by: googlegroups | last post by:
Hello everyone, I need a new web server for our existing website and I don't want subscribe to the whole IIS way of doing things. I thought I would implement a custom web server using the new...
5
by: davesmith | last post by:
I have a very simple console app using an HttpListener to listen for incoming HTTP requests (see code below). My client and server machines are both in an ADS domain and I'm logged into both using...
7
by: Pro1712 | last post by:
Hello, I need to write a simple proxy server. What I want to do is to use HttpListener to get requests from the browser, add some proxy information and some other stuff and send the request to...
1
by: =?Utf-8?B?V2lsZCBXaWxkIE1pa2U=?= | last post by:
I have a windows service implementation that creates an HttpListener in OnStart to help capture port conflict issues while starting vs. when the service is already started. On Windows 2003 servers...
1
by: khanhnk | last post by:
Hi, I'm using an HttpListener class to receive posts in my Windows Forms application. These posts contain several pictures in multipart mime format. Unfortunately, the HttpListenerRequest class...
3
by: Tom | last post by:
Hey, I have made a program, that simply runs as a tray icon in the systemtray, providing a HTTP Server using HTTPListener. I have one problem however, it idles at 70-100% cpu. It could be 1...
3
by: Hans-Jürgen Philippi | last post by:
Hi Group, I've created a (very simple) ASP.NET web application with a single *.aspx page and an *.aspx.cs CodeBehind file: By clicking an HTML form button, a text control value is written into a...
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.