Click here to Skip to main content
15,895,656 members
Home / Discussions / C#
   

C#

 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
carbon_golem21-Apr-08 9:57
carbon_golem21-Apr-08 9:57 
GeneralRe: SortedList - KeyValuePair - InvalidCastException Pin
dennycrane21-Apr-08 10:05
dennycrane21-Apr-08 10:05 
GeneralXml Serialization Pin
manustone21-Apr-08 7:28
manustone21-Apr-08 7:28 
GeneralRe: Xml Serialization Pin
Judah Gabriel Himango21-Apr-08 10:12
sponsorJudah Gabriel Himango21-Apr-08 10:12 
GeneralRe: Xml Serialization Pin
manustone21-Apr-08 10:56
manustone21-Apr-08 10:56 
GeneralCubic Bezier Question Pin
Richard Blythe21-Apr-08 6:10
Richard Blythe21-Apr-08 6:10 
GeneralRe: Cubic Bezier Question Pin
carbon_golem21-Apr-08 6:42
carbon_golem21-Apr-08 6:42 
QuestionSocket.Send for sending HTML website to Client socket Pin
indogerman21-Apr-08 4:58
indogerman21-Apr-08 4:58 
Hi All,

I am developing an application where a client has to host a website.

In the sample / examples, this has been made so:


<br />
<br />
Create a socket, bind it to the server's port and listen for client connections<br />
Socket server = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);<br />
<br />
// Wait for a client to connect<br />
Socket clientSocket = server.Accept();<br />
 <br />
<br />
// Return a static HTML page back to the client<br />
String s = "<html><head><title>Sample Website!</title></head></html>"; <br />
<br />
m_clientSocket.Send (Encoding.UTF8.GetBytes(s));



As you can see, a very simple website has been sent here.


I however, would like to design my own (much complexer with buttons, links etc.), but donot know how can I send it to the socket then, as it will certainly not fit in a simple string. Plus, it would be very difficult to get the HTML code for a website in a simple string (I dont even know whats a static and dynamic HTML page).


Hence, I request all, if you know of any method to somehow bind a VS2005 site (.aspx) to a socket, please help me.


Thank u all soo much. Smile | :)
GeneralRe: Socket.Send for sending HTML website to Client socket Pin
Anthony Mushrow21-Apr-08 5:48
professionalAnthony Mushrow21-Apr-08 5:48 
GeneralRe: Socket.Send for sending HTML website to Client socket Pin
indogerman21-Apr-08 23:19
indogerman21-Apr-08 23:19 
Questionhow to reconnect a usb port Pin
Joshua8221-Apr-08 4:45
Joshua8221-Apr-08 4:45 
AnswerRe: how to reconnect a usb port Pin
Dave Kreskowiak21-Apr-08 8:47
mveDave Kreskowiak21-Apr-08 8:47 
GeneralRe: how to reconnect a usb port Pin
Spacix One21-Apr-08 8:57
Spacix One21-Apr-08 8:57 
GeneralRe: how to reconnect a usb port Pin
Joshua8221-Apr-08 9:15
Joshua8221-Apr-08 9:15 
Generalconverting c#.net code to portable format (standalone exe) Pin
Ashish Sehajpal21-Apr-08 4:42
Ashish Sehajpal21-Apr-08 4:42 
GeneralRe: converting c#.net code to portable format (standalone exe) Pin
Pete O'Hanlon21-Apr-08 5:03
mvePete O'Hanlon21-Apr-08 5:03 
GeneralRe: converting c#.net code to portable format (standalone exe) Pin
Ashish Sehajpal21-Apr-08 5:09
Ashish Sehajpal21-Apr-08 5:09 
GeneralRe: converting c#.net code to portable format (standalone exe) Pin
Simon P Stevens21-Apr-08 5:54
Simon P Stevens21-Apr-08 5:54 
GeneralRe: converting c#.net code to portable format (standalone exe) Pin
Ashish Sehajpal22-Apr-08 1:43
Ashish Sehajpal22-Apr-08 1:43 
GeneralRe: converting c#.net code to portable format (standalone exe) Pin
J4amieC21-Apr-08 5:52
J4amieC21-Apr-08 5:52 
GeneralRe: converting c#.net code to portable format (standalone exe) Pin
Ashish Sehajpal22-Apr-08 1:42
Ashish Sehajpal22-Apr-08 1:42 
GeneralReading Firefox BookMarks Pin
renjith p krishnan21-Apr-08 4:07
renjith p krishnan21-Apr-08 4:07 
GeneralRe: Reading Firefox BookMarks Pin
Vasudevan Deepak Kumar21-Apr-08 5:46
Vasudevan Deepak Kumar21-Apr-08 5:46 
GeneralRe: Reading Firefox BookMarks Pin
Gareth H21-Apr-08 6:20
Gareth H21-Apr-08 6:20 
AnswerRe: Reading Firefox BookMarks Pin
Spacix One21-Apr-08 8:51
Spacix One21-Apr-08 8:51 

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.