|
Creamboy wrote: has anyone ever done anything like interact between two programs?
Yes.
Creamboy wrote: How do i know when the biometric authenticating program has finished authenticating, and its result, i.e: true or false.
What external interfaces does it provide?
Creamboy wrote: I need to run the first program, then based on its results, run the second. Any help please. I'm stuck!
Do you mean that the authentication program does the authentication, exits with some sort of return code which your second program can then use to determine if it can continue or not? If so then that really sucks! There is no real security in that scenario, the first program could potentially be swapped out easily by something malicious.
|
|
|
|
|
Colin,
the program exits with no exit code. After identifying, it exits normally. All i'm saying is, before its exit, how do i know if it identified the person as already registered, or not.
i was thinking i could write a value, like 0 or 1, to a file then use a timer from the second program to check the value written. Is that logical and safe?
Colin Angus Mackay wrote: Creamboy wrote:
has anyone ever done anything like interact between two programs?
Yes.
please can u give a scenario on how u did this.
Big thanx.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Creamboy wrote: i was thinking i could write a value, like 0 or 1, to a file then use a timer from the second program to check the value written. Is that logical and safe?
File systems are too easily compromised. Also this method is increadibly inefficient.
Creamboy wrote: please can u give a scenario on how u did this.
There are tons of scenarios. WCF (Windows Communication Foundation) is the way to go these days as it encompasses so many ways of communication in a consistent way.
The first thing you really need to do, based on your replies, is to buy a book on security and read it. This is one area where writing code based on a little information can get you in to real trouble. You need to really understand how your system hangs together. Without that knowledge you'll end up blowing great big security holes in your system.
|
|
|
|
|
i've used remoting to do this before.
You have to watch out for "man in the middle" type attacks as Colin said.
I would guess you want some kind of 2 way authentication to ensure that the authorisation component isn't compromised
|
|
|
|
|
Russell, please could you explain how you achieved this with remoting. Although, i have an idea of remoting i've never used it. What about the writing to files method? Is that okay?
He who goes for revenge must first dig two graves.
|
|
|
|
|
Hello everyone,
I can not find answer from MSDN. My question is, when Console.ReadKey is called on a thread,
1. the thread will be still in running status (like we call Sleep), which will consume CPU time?
2. or the thread will be in wait status like we call WaitOne, and keyboard press will signal the event?
thanks in advance,
George
|
|
|
|
|
ReadKey will block till it gets a key press. IT should not use any CPU while in this state. I am not sure what you mean by the rest of the question.
|
|
|
|
|
Thanks leppie,
Question answered. Cool!!
regards,
George
|
|
|
|
|
Hi everybody,
in my project i receive via sockets an array of bytes.
I send the data from a C++ application to my C# instance.
The Byte-Array is decoded via ASCIIEncoding.ASCII.GetString()
For all standard-chars it work fine, but special characters like ä,ö,ü
aren't translated correctly.
I did a test with a loop, which creates me a byte-array from 0 to 500
then i decode it with ASCIIEncoding.ASCII.GetString() into a string.
I can't find the ä,ü,ö characters into the created string.
if i write string s = "äöü"; the characters are also recognized and are
working correctly.
How i can translate my byte-array that i get the correct characters?
Big thanks for any help
|
|
|
|
|
Use Encoding.Default or a UTF8 or Unicode one.
|
|
|
|
|
I've tested different encodings, UTF8, Unicode, ... nothing worked for me
then a simple Encoding.Default, like you told me works perfect
Big thanks to you !
|
|
|
|
|
hii,
i have been asked to move our company solution over Source safe, im searching for source safe titurials i will be more than happy if some one till me how to use source safe
Thanks 4 all..
|
|
|
|
|
mrcooll wrote: i have been asked to move our company solution over Source safe
Run away!!!
Seriously, what source control are you on now? Why do you think that VSS is a better solution?
You might want to look at other solutions such as SourceGear's Vault. Eric Sink has some excellent tutorials on using that.
|
|
|
|
|
hi,
m asking about vss couse i have never heared about athour solution,
i have noticed that vss is bad!!!
where i can find this sourceGear's valut .
|
|
|
|
|
mrcooll wrote: where i can find this sourceGear's valut .
You could have Googled it[^] by now.
|
|
|
|
|
hey
i use subversion(the server) and tortoise SVN(the client).
i have no complaints so have a look at that
good luck!
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
Hello,
I think this is the first time i post a question on the codeproject, so hope it goes well
So, the question is:
How can i lock a file while it is being written so that other processes cannot move/delete or access it.
I have a file that is being written into by an application on a remote machine and a windows service on the local machine that connects to the remote machine and downloads that file.
The problem is that i want to download the file only after the write process has stopped completely.
How can this be done?
And a related question: How can this be done if i try to download the file from a ftp server.
Both remote and local machine are under XP and the applications are written in c#.
Thank you
|
|
|
|
|
Pass FileShare.None to constructor of FileStream class.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
hi , i need to generate an array of random numbers which are all different. How can i do so? I am using a while loop and .contains of an arraylist. Can someone tell me please?
Thanks
|
|
|
|
|
Use the random class
int num = random.Next();
Bob
Ashfield Consultants Ltd
|
|
|
|
|
create empty list of ints called used.
N = number of random integers you want.
i = 1
R: generate random number r
if r is in used
goto R
add r to used
i++
if r < N
goto R
loop ends here
I'll leave it to you to translate that to code. Make sure you don't use goto !
Cheers,
Vikram.
The hands that help are holier than the lips that pray.
|
|
|
|
|
i'd create an arraylist with all the numbers in order and an empty arraylist.
then get a random number minimum 0 and less than the length of the arraylist. move that item from the first list to the second and repeat until the first arraylist is empty.
As a separate thought, what would happen if you implemented Icomparable and randomly returned -1 or +1 and then used it for a sort?
|
|
|
|
|
hell it even works
al.Sort(r);
class Randomizer : IComparer
{
#region IComparer Members
Random r = new Random();
public int Compare(object x, object y)
{
if (x == r) return 0;
return r.Next(2) - 1;
}
#endregion
}
}
I'll leave it to anyone who wants to try it to build an arraylist of stuff and work out the type of r
|
|
|
|
|
Russell Jones wrote: implemented Icomparable and randomly returned -1 or +1 and then used it for a sort?
Interesting idea. but the distribution of your list would not be random.
It would depend on the sorting algorithm used.
Simon
|
|
|
|
|
that's true.
I seem to remember about one of the early poker sites that screwed up with their random shuffling routines allowing players to effectively read other people's cards. It's alot harder to get properly random output than it first appears.
Russell
|
|
|
|