|
hi
in my application i am sending message to a client using socket(TCP IP) now if the clients network cable is unplugged ...still the messages which i am sending are going without any error .....now this is creating a problem so if any one knows how to know the clients network cable is plugged in or not please do let me know ......as i am strucked at this point
regards
sindhu tiwari
its me sid
|
|
|
|
|
Hehehe - grins TCP. Yup TCP doesn't have a mechanism to detect it automatically..and it's because any network would have frequent "negligible" disturbances that TCP would not take it as a "disconnect". The only way I knew was to keep a routine to check clients PULSEs .
Server->"Are you there?"
Client0->"Yup".
Client1->"Yup".
Client2->... .
clientList[2].remove();
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
the question which i have asked is indirectly abt the pinging
in this scenario i can do one thing
send some bytes to client and in reply to that recive some bytes from client ............
but what i really wanna do is that once a message is send from the server it must be in a state to know weather the client system is in the network or not .........
dude if u have any idea abt this then let me know
Sid
its me sid
|
|
|
|
|
Yes, that's possible. Check for IPPROTO_ICMP .
But I would only suggest a mechanism where the client *replies* to our pulse-ping. Because imagine a case, the network is out and in few seconds it's up again. Now you send your ICMP query this would say that the client is still up. But it's a reincarnated client, it doesn't hold up the old connection. So your client list would go meaningless. So make a seperate thread that keeps pinging for clients pulses and mainting the clients.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
I have a treeview in which when i point the mouse over the node , it should display the thumbnail with details about the subnodes should be available in the thumbnail. Can anybody help me.
VanithaVasu
|
|
|
|
|
I have a snippet of code that is similar of what you search. Try to fit it to your request.
See how it works at: <a href="http://yoni.minicircuits.com/MixerResult.aspx">http://yoni.minicircuits.com/MixerResult.aspx</a>[<a href="http://yoni.minicircuits.com/MixerResult.aspx" target="_blank" title="New Window">^</a>]
Mouse over the case style column.
<u>The code:</u>---------
<ItemTemplate>
<a class="thumbnail" href='<%# Eval("CaseStyleURL") %>' ><%# Eval("CaseStyle") %>
<span>
<img style="border-width: 0;padding: 2px;"src="CaseStyle/<%# GetCaseStylePicture(Eval("CaseStyle")) %>.jpg" />
</span></a>
</ItemTemplate>
<u>Style sheet:</u>
.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
text-align: center;
text-decoration: none;
}
.thumbnail span{ /*CSS for image*/
position: absolute;background-color: #F0F8FF;padding: 5px;left: -1000px; border: 1px dashed gray;visibility: hidden;color: black;
}
.thumbnail span img{ /*CSS for image*/
border-width: 0;
padding: 2px;
width:70px;
height:70px;
}
.thumbnail:hover span{ /*CSS for image on hover*/
visibility: visible;
top: -70px;
left: -90px; /*position where enlarged image should offset horizontally */
}
Shay Noy
|
|
|
|
|
hi all.
can we access session from a class inserted in App_code folder?
sepel
|
|
|
|
|
|
Use HTTPContext.Current.Session it gives handle to current session instance,
|
|
|
|
|
|
Hi,
I am developing a web application which requires the following to happen.
Go to another web site. The web site informs me of schedule no. x. After clicking on a hyperlink, I am transported to the page containing html file names in the ftp directory.
I pick up the respective file whose file name bears the schedule number X. I download the html file in my local filesystem. The data represented by the html file is in columnar format. I need to pick up data in the last column of the html file.
Now what I need is
a)Is there any method to monitor the change in schedule no from x to y (from schedule 1 to 2 and so on). In other words polling the other website for change in its specific piece of data
b)Pardon my asking but how will I fetch the columns from the html file. I have a feeling this is going to be real dirty job of extracting information from the html file
Any pointers to dazzle baffle me.
Regards
v1i9n6o7d
|
|
|
|
|
Probably best done through a webservice.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hello friends
First at all happy new year of all of you.All the best in next one.))
Cloud you help me please.I will describe the problem.It seens stupid but i did not use VS from 1 year and just now start it again.
So we have GridView inside of it are templates for example label and text box for edit mode which are connected with some db.So the problem is appear when i try to update that data exactly in updating event.After pressing update button in quick watch i see that it is give me old value not what i had change ready!!!For example in label value is 1 and when you press button edit in text box is 1 too but my goal is to be changed to 2 so in text box value is changed to 2 but after pressing of bot ton the value which is extract is 1???Pleas cloud you tell me some body why.Unfortunately the at the moment i am not in-front of my pc but let try the code.
string name;
name=((TextBox)(gvMain.Rows[e.EditIndex].Cells[1].Control[1])).Text;
And result is 1;
Please tell me why
Now the project on which i work it use net.3.5 can you explain me if there is some changes and why if i catch the text box the value is old one not the value which i already type on it.
Thanks in advance.
when i want to read something good just seat and type it
|
|
|
|
|
Is it possible to get all the Unchecked nodes of TreeView control as a TreeNodeCollection the same way TreeView.CheckedNodes does.
|
|
|
|
|
I use this function for Encypt my strings,but I want to know how I can Decrypt string.
<br />
public string Md5AddSecret(string strChange)<br />
{<br />
byte[] pass = Encoding.UTF8.GetBytes(strChange);<br />
<br />
MD5 md5 = new MD5CryptoServiceProvider();<br />
string strPassword = Encoding.UTF8.GetString(md5.ComputeHash(pass));<br />
return strPassword;<br />
}<br />
<br />
protected void bntDisp_Click(object sender, EventArgs e)<br />
{<br />
<br />
try<br />
{<br />
TxtResult.Text = Md5AddSecret(TxtPassword.Text);<br />
}<br />
finally<br />
{<br />
Response.Redirect("UrPage.aspx");<br />
}<br />
}
Thanks in Advance...
Erasers are for people who are willing to correct their mistakes.
|
|
|
|
|
This function may help you to decrypt string.
Public Function Decrypt(ByRef Data As String) As String<br />
Dim decData() As Byte = Convert.FromBase64String(Data)<br />
Dim decStr As String = ASCIIEncoding.ASCII.GetString(decData)<br />
Decrypt = decStr<br />
End Function
use SHA1 Algorithm for Encryption.
Public Function Encrypt(ByRef Data As String) As String<br />
Dim sha As New SHA1Managed<br />
Convert.ToBase64String(sha.ComputeHash(Encoding.ASCII.GetBytes(Data)))<br />
Dim encData() As Byte = ASCIIEncoding.ASCII.GetBytes(Data)<br />
Dim encStr As String = Convert.ToBase64String(encData)<br />
Encrypt = encStr<br />
End Function
Regards.
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
modified on Saturday, January 05, 2008 2:39:10 AM
|
|
|
|
|
Thanks Rahul...
Erasers are for people who are willing to correct their mistakes.
|
|
|
|
|
MD5 is not an encryption algorithm, its a hashing algorithm. Hashes don't "decrypt" - they are a summary (digest) of the information, a checksum. They are lossy. Have a look on wikipedia about the difference.
You probably want to look at the RSA CryptoServiceProvider.
|
|
|
|
|
Mark Churchill wrote: You probably want to look at the RSA CryptoServiceProvider.
Can u give me reference link about RSA CryptoServiceProvider.
Thanks in Advance...
Erasers are for people who are willing to correct their mistakes.
|
|
|
|
|
Answer as above, MD5 cant be Decrypted. because it is a Digest algorithm.
if u want to encrypt and decrypt message, DES and AES cryptography algorithm will be your selection.
regards Eric.W
modified on Sunday, January 06, 2008 7:50:18 AM
|
|
|
|
|
Eric.W wrote: if u want to encrypt and decrypt message, DES and AES cryptography algorithm will be your selection.
Can u give me reference link about DES and AES Cryptography algorithm.
Thanks in Advance...
Erasers are for people who are willing to correct their mistakes.
|
|
|
|
|
visit here,it mey be helpful for u.
regards Eric.W
|
|
|
|
|
You cannot decrypt the hash. Hashes are one-way.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Can u suggest me how to encrypt and decrypt a string...Any Reference link will be more helpful.
Thanks in Advance...
Erasers are for people who are willing to correct their mistakes.
|
|
|
|
|
Kasi Viswanathan wrote: Can u suggest me how to encrypt and decrypt a string...
Try an actual encryption algorithm like Rijndael. It is in the .NET Cryptography namespace.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|