Click here to Skip to main content
15,907,492 members
Home / Discussions / C#
   

C#

 
QuestionHow can I get the URL address for a TCP Packet? Pin
Khoramdin26-Nov-07 13:46
Khoramdin26-Nov-07 13:46 
AnswerRe: How can I get the URL address for a TCP Packet? Pin
macerenn26-Nov-07 15:19
macerenn26-Nov-07 15:19 
GeneralRe: typedef enum c header to C# Pin
schoetbi26-Nov-07 11:04
schoetbi26-Nov-07 11:04 
GeneralRe: typedef enum c header to C# Pin
Luc Pattyn26-Nov-07 11:29
sitebuilderLuc Pattyn26-Nov-07 11:29 
QuestionPossible to get the location of the launching Shortcut? Pin
Sautin.net26-Nov-07 10:56
Sautin.net26-Nov-07 10:56 
AnswerRe: Possible to get the location of the launching Shortcut? Pin
Anthony Mushrow26-Nov-07 11:02
professionalAnthony Mushrow26-Nov-07 11:02 
QuestionProblem with setting Wallpaper Pin
Y@rpen26-Nov-07 10:43
Y@rpen26-Nov-07 10:43 
QuestionAuthentication and Authorization Pin
kingletas26-Nov-07 10:41
kingletas26-Nov-07 10:41 
hey my[Hope not to bother anyone] people,


I would like to Authenticate a user in the main form application[client] and then in the server. And also i would like to authorize the users. I don't have webforms... i have desktop applications which connects to the Internet and communicate one to each other.

Say i would like to:

1 - Send the SID of each computer where the client is running
2 - Send the login information of the current user
3 - Verify the current user of the Client has Administrator rights from the server
4 - Verify the publisher of the application. I am thinking that if i verify the publisher i can use the certificate, is that right?
5 - Digitally sign and verify all data that is being sent over the network.

I know how to sign all data but i am not so sure how to verify it.

would this be possible:
.
.
.
byte[] toSend = Encoding.ASCII.GetBytes(Convert.ToString(WindowsIdentity.GetCurrent()));
NetworkStream net = ClientTCP.GetStream();

try{
net.Write(toSend,0,toSend.Length);
}

catch{}
finally
{
net.Close();
ClientTcp.Close();

}
...


in the other side i would have a receiving part but i would like to do this:
try{
int bytes = net.Read(toRead,0,toRead.Length);

string iden = Encoding.ASCII.GetString(toRead,0,bytes);

//assuming that i have all the bytes of the windows identity
WindowsIdentity W_iden = (WindowsIdentity) iden;

}

would that code help me send a windows identity over the network????


thanks all...
regards

The way of the code warrior is... SO beginning of the legacy starts now!

AnswerRe: Authentication and Authorization Pin
Skippums26-Nov-07 11:11
Skippums26-Nov-07 11:11 
Questiontypedef enum c header to C# Pin
schoetbi26-Nov-07 10:11
schoetbi26-Nov-07 10:11 
AnswerRe: typedef enum c header to C# Pin
Luc Pattyn26-Nov-07 10:57
sitebuilderLuc Pattyn26-Nov-07 10:57 
GeneralRe: typedef enum c header to C# Pin
schoetbi26-Nov-07 10:59
schoetbi26-Nov-07 10:59 
GeneralRe: typedef enum c header to C# Pin
Pete O'Hanlon26-Nov-07 11:01
mvePete O'Hanlon26-Nov-07 11:01 
AnswerRe: typedef enum c header to C# Pin
PIEBALDconsult26-Nov-07 11:27
mvePIEBALDconsult26-Nov-07 11:27 
AnswerRe: typedef enum c header to C# Pin
m026-Nov-07 13:05
m026-Nov-07 13:05 
Questionasp.net subdomain Pin
Eli Nurman26-Nov-07 10:07
Eli Nurman26-Nov-07 10:07 
AnswerRe: asp.net subdomain Pin
Paul Conrad26-Nov-07 16:01
professionalPaul Conrad26-Nov-07 16:01 
Questioncopy and paste Pin
netJP12L26-Nov-07 9:46
netJP12L26-Nov-07 9:46 
AnswerRe: copy and paste Pin
Skippums26-Nov-07 10:03
Skippums26-Nov-07 10:03 
GeneralRe: copy and paste Pin
netJP12L26-Nov-07 10:10
netJP12L26-Nov-07 10:10 
GeneralRe: copy and paste Pin
Skippums26-Nov-07 10:48
Skippums26-Nov-07 10:48 
QuestionCollecting code-snippets Pin
Johan Martensson26-Nov-07 9:41
Johan Martensson26-Nov-07 9:41 
AnswerRe: Collecting code-snippets Pin
Pete O'Hanlon26-Nov-07 9:56
mvePete O'Hanlon26-Nov-07 9:56 
AnswerRe: Collecting code-snippets Pin
schoetbi26-Nov-07 10:19
schoetbi26-Nov-07 10:19 
AnswerRe: Collecting code-snippets Pin
Paul Conrad26-Nov-07 16:02
professionalPaul Conrad26-Nov-07 16:02 

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.