Click here to Skip to main content
15,885,546 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Question.Net Installation Path Pin
Member 233533214-Oct-05 6:07
Member 233533214-Oct-05 6:07 
AnswerRe: .Net Installation Path Pin
MoustafaS21-Oct-05 15:30
MoustafaS21-Oct-05 15:30 
QuestionTooltip popup multiple times? Reset hover timer (vb.net) Pin
barnabya14-Oct-05 5:27
barnabya14-Oct-05 5:27 
QuestionAccess .NET 2.0 Dll in .NET 1.1 Pin
3004201613-Oct-05 22:17
3004201613-Oct-05 22:17 
AnswerRe: Access .NET 2.0 Dll in .NET 1.1 Pin
Dave Kreskowiak14-Oct-05 6:07
mveDave Kreskowiak14-Oct-05 6:07 
QuestionHow can I find the name of the current class? Pin
daberkowitz13-Oct-05 8:15
daberkowitz13-Oct-05 8:15 
AnswerRe: How can I find the name of the current class? Pin
Rein_Petersen14-Oct-05 6:08
Rein_Petersen14-Oct-05 6:08 
QuestionNeed Help !! System.Security.Cryptography over TCP Pin
IHSSITEMAN13-Oct-05 7:44
IHSSITEMAN13-Oct-05 7:44 
I have been writing a simple client/server application which functions just fine without encryption. However, I need to add encryption to be compliannt with regulations.

I am using RijndaelManaged objects for encryption. Both sender and reciever have the same hard-coded legal Keys and IV's.

Once I have a TCP socket established, I set my Network Stream using tcpClient.GetStream().

I use one of the stream reader/writer classes (all of them fail so far). For example, I will send a sting using a BinaryWriter bWrite. Then I will look to receive some string using BinaryReader bRead.

On the Send Side:

RijndaelManaged crypt = new RijndaelManaged();
//Insert code to set Key and IV
NetworkStream netStream = tcpClient.GetStream();
CryptoStream coutStream = new CryptoStream(netStream,crypt.CreateEncryptor(Key,IV),CryptoStreamMode.Write);
BinaryWriter bWrite = new BinaryWriter(coutStream);
bWrite("Some Cool String");
bWrite.Flush();
coutStream.FlushFinalBlock();

CryptoStream cinStream = new CryptoStream(netStream,crypt.CreateDecryptor(Key,IV),CryptoStreamMode.Read);
BinaryReader bRead = new BinaryReader(cinStream);
String receivedString = bRead.ReadString();

tcpClient.Close();

On the Recieve Side:

RijndaelManaged crypt = new RijndaelManaged();
//Insert code to set Key and IV
NetworkStream netStream = tcpClient.GetStream();


CryptoStream cinStream = new CryptoStream(netStream,crypt.CreateDecryptor(Key,IV),CryptoStreamMode.Read);
BinaryReader bRead = new BinaryReader(cinStream);
String receivedString = bRead.ReadString();

CryptoStream coutStream = new CryptoStream(netStream,crypt.CreateEncryptor(Key,IV),CryptoStreamMode.Write);
BinaryWriter bWrite = new BinaryWriter(coutStream);
bWrite("Some Cool String");
bWrite.Flush();
coutStream.FlushFinalBlock();
tcpClient.Close();


PROBLEM:
If I simply send from one program and recieve on the other -- everything works fine. It is when I actually send/receive from both that the program hangs.

Any thoughts?
QuestionSystem.Appdomain.CreatedDomain(...) returns __TransparentProxy ?!? Pin
Rein_Petersen13-Oct-05 3:14
Rein_Petersen13-Oct-05 3:14 
AnswerRe: System.Appdomain.CreatedDomain(...) returns __TransparentProxy ?!? Pin
S. Senthil Kumar14-Oct-05 5:44
S. Senthil Kumar14-Oct-05 5:44 
GeneralRe: System.Appdomain.CreatedDomain(...) returns __TransparentProxy ?!? Pin
Rein_Petersen14-Oct-05 6:04
Rein_Petersen14-Oct-05 6:04 
QuestionGetting size (in bytes) of Bitmap object Pin
nzmike11-Oct-05 23:09
nzmike11-Oct-05 23:09 
Questionrequiredfield validator and rangevalidators don't work on remote server?? Pin
vicky45711-Oct-05 13:22
vicky45711-Oct-05 13:22 
QuestionGUI Framework Pin
Al Baraki11-Oct-05 6:21
Al Baraki11-Oct-05 6:21 
AnswerRe: GUI Framework Pin
Dave Kreskowiak11-Oct-05 6:54
mveDave Kreskowiak11-Oct-05 6:54 
GeneralRe: GUI Framework Pin
John M. Drescher11-Oct-05 12:22
John M. Drescher11-Oct-05 12:22 
GeneralRe: GUI Framework Pin
Dave Kreskowiak11-Oct-05 13:49
mveDave Kreskowiak11-Oct-05 13:49 
QuestionI'm no magician! Pin
CoolAmir11-Oct-05 2:14
CoolAmir11-Oct-05 2:14 
AnswerRe: ME TOO Pin
militiaware12-Oct-05 16:10
militiaware12-Oct-05 16:10 
QuestionRegex URL problem - help needed! Pin
nzmike11-Oct-05 1:25
nzmike11-Oct-05 1:25 
AnswerRe: Regex URL problem - help needed! Pin
minhpc_bk11-Oct-05 16:44
minhpc_bk11-Oct-05 16:44 
GeneralRe: Regex URL problem - help needed! Pin
nzmike11-Oct-05 16:48
nzmike11-Oct-05 16:48 
QuestionIIS Pin
Nisha8010-Oct-05 22:33
Nisha8010-Oct-05 22:33 
AnswerRe: IIS Pin
Dave Kreskowiak11-Oct-05 6:51
mveDave Kreskowiak11-Oct-05 6:51 
AnswerRe: IIS Pin
Nuray15-Oct-05 0:22
Nuray15-Oct-05 0:22 

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.