Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Image server

I have a small application that creates a graphic image of a text file that is made from a report. This works great. I dont have a viewer as it was intended to use ie to view the file and this works wonderfully to as its a file share. Now as always i want to extend this to non ms machines and the easiest way i can think of is some sort of webserver. But its not ideal as if i create the jpeg just as a user is requesting it i get a share error. What i would ideally like to do is listen for a http request on a set port, then create thereport then send it. this way the report will be as upto date as possible and i will never get a sharing issue. Obviously the next stage would be threading but i dont want to go that far at the moment. Does anyone have any bright ideas. I have looked at the various code samples of webservers out there but they never seem to be vb.net 2005 or dont work. I dont need a whole webserver just a means of serving this one image file after its created. Im assuming the file has to be saved to disk but if it didnt need to be so much the better. Security is not an issue as its never external (or shouldnt be!)

Many thanks for any input any of you can give
Happy easter

Regards
James
[1241 byte] By [jameswilson] at [2007-11-11 8:29:38]
# 1 Re: Image server
http://www.code-magazine.com/article.aspx?quickid=03050801
http://www.code-magazine.com/article.aspx?quickid=0307031
Phil Weber at 2007-11-11 21:47:17 >
# 2 Re: Image server
Thankyou Phil for that, but im looking/hoping to do it without an asp server, eg can be used on old hardware if required. Am i right in thinking that asp is something to do with IIS6?
regards James
jameswilson at 2007-11-11 21:48:22 >
# 3 Re: Image server
Sorry, I guess I don't understand what you're trying to do. You posted a question to a .NET forum about running code on a Web server. ASP.NET is the most common method to write .NET code that runs on a Web server. If you want your code to run on Linux-based Web servers, you might investigate the Mono project: http://www.dev-archive.com/dotnet/Article/21872
Phil Weber at 2007-11-11 21:49:26 >
# 4 Re: Image server
Sorry for not explaining it very well lol sorry

It looks like i might need asp after all now i have been reading up on it a bit. What ideally id like to do
Remote client (local lan) requests a webpage from my app but the webpage consists purly of an image no text, buttons etc
When request recieved jpeg is created
jpeg sent to client.
I suppose a web server is the easist way to do this, but im going to need a web server on the machine that generates the jpeg. This i assume means a lot more overhead for this task. I was hoping to be able to do it all from normal vb.net

Does that help?

Regards James
jameswilson at 2007-11-11 21:50:21 >
# 5 Re: Image server
You can do it in "normal" VB.NET without a Web server, but you will need some way for the VB.NET app to listen for requests across the network. A Web server is the simplest way to do this, in my opinion. Another option is to make your image server app a TCP listener. See if this helps: http://www.eggheadcafe.com/articles/20020323.asp
Phil Weber at 2007-11-11 21:51:20 >
# 6 Re: Image server
Thankyou Phil but you were right on the money with the asp first reaponse. I have made it in asp.net and used iis5 on win 2k and its absolutly perfect. Fantastic!
Thank you very much i would never have thought about asp without your suggestion and so easy too. Im gonna port everything to asp lol!
Seems quite powerful too

Many thanks again Phil and my regards

James
jameswilson at 2007-11-11 21:52:22 >