Click here to Skip to main content
16,016,562 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi Experts,

I want to create a exe for each visitor of my website.

For every visitor on my website,i will generate a unique code(6 digit code).I want to integrate my standard exe with this 6 digit code. On installation of this exe,i need to check this code is valid or not?

Is that feasible?.if then then how. Please guide.

For Eg. While using Logmein(website:http://support.me), visitor provide a pre generated 6 digit code,then a exe got downloaded and this exe has some connection with this code.exe is valid only on this pc and only with a valid code and code exist only for 20 minutes. Exe won't work if it is getting used after 20 min.

Note: this code is saved in cookies. But is it feasible to read cookies outside a browser.

Any help or guidance will be highly appreciated.Thanks in advance

Language: Asp.net,c#
Posted
Comments
Philippe Mori 31-Dec-14 11:05am    
Why not send an encoded external file to the user and modify that file and prevent the application from running without that file or if it invalid?

1 solution

A .net application is rarely a single executable. But in a case as this, you need to have a single executable.
Let's see what options you have:
1) Have a ready-compiled assambly you alter before delivering it to the client. There are really complex methods[^] you could implement to alter the allready compiled IL code to add the specific data you intend to use.
2) Alter code and compile project at run-time.. Well, your project structure has to be really simple to be effective. Have a look also here[^]. You could use also Roslyn[^] or legacy dynamic code generation[^] to construct your application on run-time. Still, this is also hard work.
3) Merge pre-built and custom assamblies. Build you assamblies as you did, but have a single assambly containing those specific information in a static class for example. You alter the code of this single assambly on request, conpile it. As it is a short, it will compile quickly, and easily. After that use ILmerge[^] to merge all assambiles into one executable.
I would try this last one first...

As for the second idea: you can't access cookies from outside the browser. Well, you could try from file system, but every browser stores cookies in a different way.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900