Click here to Skip to main content
15,889,808 members
Home / Discussions / C#
   

C#

 
GeneralRe: Form.Show() moves Location Pin
sailracerj6-Jul-06 2:50
sailracerj6-Jul-06 2:50 
AnswerRe: Form.Show() moves Location Pin
BoneSoft5-Jul-06 9:28
BoneSoft5-Jul-06 9:28 
GeneralRe: Form.Show() moves Location Pin
sailracerj6-Jul-06 2:52
sailracerj6-Jul-06 2:52 
QuestionTransfer of datagrid to another webform Pin
blurMember5-Jul-06 7:43
blurMember5-Jul-06 7:43 
AnswerRe: Transfer of datagrid to another webform Pin
led mike5-Jul-06 8:14
led mike5-Jul-06 8:14 
GeneralRe: Transfer of datagrid to another webform Pin
blurMember5-Jul-06 15:21
blurMember5-Jul-06 15:21 
QuestionDisable certain item in the collection of dropdownlist [modified] Pin
blurMember5-Jul-06 7:30
blurMember5-Jul-06 7:30 
QuestionHow to display image at client site?? Pin
Bluebamboo5-Jul-06 7:01
Bluebamboo5-Jul-06 7:01 
Hi all,

i made a simple proxyserver which can display basic HTML page at client site, but i have no idea why the image part of webpage always gone!!

following is my simple code which accept the request from client site, then reponse.

<br />
int port = 8080;<br />
			// Create server socket <br />
			Socket proxyServer = new Socket(AddressFamily.InterNetwork,<br />
				SocketType.Stream,ProtocolType.Tcp); 				<br />
			proxyServer.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendTimeout, 5000);		    <br />
			<br />
			// call the Listen method to listen for and queue incoming connection requests.			<br />
			proxyServer.Bind( new IPEndPoint(GetHostIP(), port) );<br />
			proxyServer.Listen( port );<br />
<br />
			// Display start message <br />
			Console.WriteLine("ProxyServer started at port " + port);<br />
			Console.WriteLine("ProxyServer ready for accepting incoming connections...");	<br />
<br />
			//endless loop<br />
			while(true)<br />
			{<br />
				// waiting for client <br />
				Socket clientConnect = proxyServer.Accept();		<br />
				// Create the NetworkStream for communicating with the remote host.<br />
				NetworkStream clientStream = new NetworkStream( clientConnect, true );	<br />
<br />
				HttpWebRequest loHttp =	(HttpWebRequest) WebRequest.Create("http://www.google.co.uk/intl/en_uk/images/logo.gif");<br />
				// Set properties - 10 secs<br />
				loHttp.Timeout = 10000;  <br />
				// Retrieve request info headers<br />
				HttpWebResponse loWebResponse = (HttpWebResponse) loHttp.GetResponse();	<br />
<br />
				System.IO.StreamReader loResponseStream =<br />
					new System.IO.StreamReader(loWebResponse.GetResponseStream()<br />
					, System.Text.Encoding.UTF8);<br />
			<br />
<br />
				Byte[] buf = System.Text.Encoding.UTF8.GetBytes( loResponseStream.ReadToEnd() );<br />
				//Console.WriteLine(lcHtml);<br />
<br />
				loWebResponse.Close();<br />
				loResponseStream.Close();<br />
<br />
<br />
				clientStream.Write(buf, 0, buf.Length);<br />
				clientStream.Flush();<br />
				clientStream.Close();<br />
			}<br />



plz help me out~~

many thanks!
AnswerRe: How to display image at client site?? Pin
led mike5-Jul-06 8:12
led mike5-Jul-06 8:12 
GeneralRe: How to display image at client site?? Pin
Bluebamboo5-Jul-06 11:20
Bluebamboo5-Jul-06 11:20 
GeneralRe: How to display image at client site?? Pin
led mike6-Jul-06 4:45
led mike6-Jul-06 4:45 
QuestionHow to count total properties in a class. Pin
sun255-Jul-06 6:58
sun255-Jul-06 6:58 
AnswerRe: How to count total properties in a class. Pin
Josh Smith5-Jul-06 7:14
Josh Smith5-Jul-06 7:14 
GeneralRe: How to count total properties in a class. Pin
sun255-Jul-06 21:22
sun255-Jul-06 21:22 
QuestionVBA and .NET Pin
rattack5-Jul-06 5:59
rattack5-Jul-06 5:59 
AnswerRe: VBA and .NET Pin
ToddHileHoffer5-Jul-06 6:01
ToddHileHoffer5-Jul-06 6:01 
GeneralRe: VBA and .NET Pin
rattack5-Jul-06 23:12
rattack5-Jul-06 23:12 
QuestionI wanna to format any date like SQL Date without changing Regional setting? Pin
3DoorsDown5-Jul-06 4:35
3DoorsDown5-Jul-06 4:35 
AnswerRe: I wanna to format any date like SQL Date without changing Regional setting? Pin
ToddHileHoffer5-Jul-06 5:17
ToddHileHoffer5-Jul-06 5:17 
AnswerRe: I wanna to format any date like SQL Date without changing Regional setting? Pin
Colin Angus Mackay5-Jul-06 5:17
Colin Angus Mackay5-Jul-06 5:17 
AnswerRe: I wanna to format any date like SQL Date without changing Regional setting? Pin
Martin#5-Jul-06 5:17
Martin#5-Jul-06 5:17 
QuestionShadowcopy Pin
kokilambal.p5-Jul-06 4:00
kokilambal.p5-Jul-06 4:00 
AnswerRe: Shadowcopy Pin
Josh Smith5-Jul-06 7:15
Josh Smith5-Jul-06 7:15 
GeneralRe: Shadowcopy Pin
Not Active5-Jul-06 7:49
mentorNot Active5-Jul-06 7:49 
GeneralRe: Shadowcopy Pin
Josh Smith5-Jul-06 10:21
Josh Smith5-Jul-06 10:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.