|
Just reformulating your question, to verify that I've understood the question. You want to embed some UserID-marker in your excutable/class library, before it gets downloaded and installed?
I are troll
|
|
|
|
|
Eddy Vluggen wrote: You want to embed some UserID-marker in your excutable/class library, before it gets downloaded and installed?
Exactly Eddy . And its a windows application. Any idea
Thanks in advance !!
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
My original suggestion would be to read the MAC-address once you're on the client, and send that back, but that's private information of the customer, and in some countries you'd need the clients' consent to do so. That's one option down.
Another approach would be to compile a personalized version, build and create a setup, prior to downloading. That would mean that there's a delay in the download, and possibly a rather huge load on your webserver. That's two options down.
Perhaps you can download an addendum after the first install? That wouldn't delay the initial download, and you could easily compile a small classlibrary. The application shouldn't be able to run without this library, and it should be signed (to prevent tampering).
Perhaps you can even delay the compiling and the building; if you were to download the sourcecode for your custom key-classlibrary, you could compile once it's downloaded. That would make it harder to sign that classlib, but would remove the compilingprocess from your server and onto the client-machine.
I hope that someone can give some idea's that are more efficient/easier to implement
I are troll
|
|
|
|
|
First of all thanks for your time
Eddy Vluggen wrote: approach would be to compile a personalized version, build and create a setup, prior to downloading.
How will I do that? Suppose user click on download and I generate the userID as U123. Now how do i embed it with that exe, and I need to use the same from exe to call my web service and database based on userID.
Please help.
Thanks!
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
I've never done this, but have seen something similar in ASP.NET. You can catch the moment that someone wants to download a file. First, you'd have to encrypt the string and embed it in your sourcecode. The WebApp can only compile your application if it has access to the source-code of what it's supposed to compile. That's why I suggested that you put it in a classlibrary, besides the applications' executable.
The steps involved would be something like this;
- Generate a key, crypt it, and add the key to the DB as "taken".
- Write the source for a dll that returns this key on demand
When you start your executable;
- Check if your classlibrary is in place, if not:
- Start the download of the class-library (from code, or manual)
- The WebApp gets requested to download a file, compiles the classlib with the embedded string and push the generated file.
I'll try to build a small prototype to do this thing, might take a while
I are troll
|
|
|
|
|
Eddy Vluggen wrote:
When you start your executable;
- Check if your classlibrary is in place, if not:
- Start the download of the class-library (from code, or manual)
- The WebApp gets requested to download a file, compiles the classlib with the embedded string and push the generated file.
Eddy thats sounds good. and am starting some prototyping. Thanks again.
Eddy Vluggen wrote: I'll try to build a small prototype to do this thing, might take a while
Not a Issue. Please update me on same.
Thanks!!!
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Eddy, one question
Eddy Vluggen wrote: compiles the classlib with the embedded string and push the generated file.
How will I get that string? If in-between of that one more request come then what happen?
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Well, that's the string that's unique for the download. You can base that on the browser-information, or you might want to use a query-string variable to set it. You should be able to trackback this information to previously entered registration-details.
In other words, in that place you'd typically want the reference to the user that's currently logged in
I are troll
|
|
|
|
|
How about creating a GUID and putting it into a config file that then gets downloaded with the application? Or are you trying to implement some kind of licensing scheme?
|
|
|
|
|
Hi,
I want to develop cards game (.jpg,.jpeg) using C#. Please let me know is C# is a better way to do it. If any one have sample source code which loads one main image in a background and other card images as per the logic on that will help.
Thnks
|
|
|
|
|
There's a cards.dll on your machine that contains a deck that you only need to shuffle. C# and VB.NET are both viable choice's, pick the one that you're experienced with. The links below use the cards.dll, instead of jpg images.
There's a card-game starterkit on MSDN. You can download the C# version here[^], or the VB.NET version here[^]. There are also some good examples on CodeProject and a cool C# tutorial can be found here[^].
Good luck and Happy programming
I are troll
|
|
|
|
|
So far I can get all computers in an active directory:
DirectoryEntry entry = new DirectoryEntry("LDAP://" + thisDomain.Name);
DirectorySearcher mySearcher = new DirectorySearcher(entry);
mySearcher.Filter = ("(objectClass=computer)");
foreach (SearchResult resEnt in mySearcher.FindAll())
{
MessagBox.Show(resEnt.GetDirectoryEntry().Name.ToString() );
}
And I can get all Organizaitonal units:
DirectorySearcher mySearcher2 = new DirectorySearcher(entry);
mySearcher2.Filter = ("(objectClass=organizationalUnit )");
foreach (SearchResult resEnt2 in mySearcher2.FindAll())
{
MessageBox.Show( resEnt2.GetDirectoryEntry().Name.ToString());
}
Now how can I get a computer and its organizational unit? Any suggestions?
|
|
|
|
|
THIS IS KARAM..
WHICH WILL BE THE APT ALGORITHM TO IMPLEMENT TEETH SEGMENTATION AND EXTRACTION?
modified on Wednesday, April 1, 2009 8:19 AM
|
|
|
|
|
not sure, here is an "algorithm":
1. choose appropriate pair of pliers
2. grab the right tooth
3. yank
4. repeat if necessary
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
For sensitive patients, add step 0:
0. Booze up
I are troll
|
|
|
|
|
Please do not make your requests all in upper case. It is considered to be rude (it is classed as shouting).
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi All,
how we create and apply themes for windows application?
Please help...
Thanks and Regards,
Lalit Narayan
|
|
|
|
|
|
Please give a needful answer...
Regards,
Lalit
|
|
|
|
|
You showed no evidence that you attempted to find out the answer prior to posting on the forum. This makes it look like you want us to do your work for you. If you have looked prior to coming here then let us know. Tell us that you've looked and not found an answer.
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Hi
I have listed and then started all the exe files.As and when the exe starts a log file should be maintained which will contain the start time of the exe.So i used the following code.It gives" NullException Object reference not set to an instance of an object" for the following line
stw1.WriteLine("UdpServer at port 10000 has started at:", start1.ToString());
if (cb.Checked)
{
n1 = lb4.Text;
si1 = new ProcessStartInfo(n1);
proc = Process.Start(si1);
proclist.Add(proc);
DateTime start1 = proc.StartTime;
if (!File.Exists("startlog1.txt"))
{
stw1 = new StreamWriter("startlog1.txt");
}
else
{
File.AppendText("startlog1.txt");
}
stw1.WriteLine("UdpServer at port 10000 has started at:", start1.ToString());
stw1.WriteLine("=======================================================================");
stw1.Flush();
}
if (cb1.Checked)
{
n2 = lb5.Text;
ProcessStartInfo si2 = new ProcessStartInfo(n2);
proc = Process.Start(si2);
proclist.Add(proc);
DateTime start2 = proc.StartTime;
if (!File.Exists("startlog2.txt"))
{
stw2 = new StreamWriter("startlog2.txt");
}
else
{
File.AppendText("startlog2.txt");
}
stw2.WriteLine("UdpServer at port 10001 has started at:", start2.ToString());
stw2.WriteLine("=======================================================================");
stw2.Flush();
}
|
|
|
|
|
Hi,
how many ways are there for stw1.WriteLine("UdpServer...", start1.ToString()); to cause a NullReferenceException? has each of the relevant objects been assigned a value for all possible ways to reach this statement?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi
Im not able to get you.Can you please explain me how i can write the start time of the corresponding servers to a text file?
|
|
|
|
|
Hi,
you have the code to do that, however it contains a minor mistake.
I gave you the logic steps to pinpoint the mistake.
if this is your code, you will have no trouble fixing it.
if it is not, you probably won't understand the code, hence be unable to fix it.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|