|
Well, you need to create an aspx webpage which takes a url parameter which identifies the user who is verifying.
So, on registration generate your random password, and a second random large password. Add the link to the email pointing to your webpage with the second password eg.
http://www.mywebsite.com/Authorise.aspx?Verification=9DFG45NN4NG80003GVN3N5
When the user clicks the link, you can collect the second password you generated from the aspx webpage and presumably look it up in your database to determine which user is being authorised.
Make any sense?
Regards,
Rob Philpott.
|
|
|
|
|
Thanks for the reply.
Most of what you said I had figured out already, but I didn't know the correct syntax for retrieving the value from the url. A friend pointed me in the right direction, but thanks again for replying anyway.
Daniel
|
|
|
|
|
Hi
I devloped a application.Every time clicking on .exe a instance is opened of that application.How this is possible that single instance run of this application
|
|
|
|
|
Hy,
Use the Process.GetProcessesByName(processname) class to see if another process with the same name is running.
Hope it helps.
Do your best to be the best
|
|
|
|
|
This is not the best way to do it, it's quite error prone.
The correct way is to use a Mutex and check if it exists.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
There are some articles here on CP covering this topic. Simply search the artciles for "single instance application".
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
This is the code your looking for.
[STAThread]
static void Main()
{
Process instance = RunningInstance();
if (instance == null)
{
Application.Run(new AteGui(splashScrn));
}
else
{
HandleRunningInstance(instance);
}
}
<big>Helper Functions and DLL imports</big>
public static Process RunningInstance()
{
Process current = Process.GetCurrentProcess();
Process[] processes = Process.GetProcessesByName(current.ProcessName);
foreach (Process process in processes)
{
if (process.Id != current.Id)
{
if (Assembly.GetExecutingAssembly().Location.Replace("/", "\\") ==
current.MainModule.FileName)
{
return process;
}
}
}
return null;
}
public static void HandleRunningInstance(Process instance)
{
ShowWindowAsync(instance.MainWindowHandle, WS_SHOWNORMAL);
SetForegroundWindow(instance.MainWindowHandle);
}
[DllImport("User32.dll")]
private static extern bool ShowWindowAsync(
IntPtr hWnd, int cmdShow);
[DllImport("User32.dll")] private static extern bool
SetForegroundWindow(IntPtr hWnd);
private const int WS_SHOWNORMAL = 1;
|
|
|
|
|
As has been stated before, iterating through a process list is not a good idea because of several reasons (with being slow the least one).
Mutexes are the way to go!
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hi
how can i get the field names ( and not the data) of a table in sql server 2000?
regards
sAqIb
|
|
|
|
|
Hi again,
you can get the cloumns names by the following query:
Select name
From syscolumns
Where id = object_id('Table_Name')
Jamil abou khalil
|
|
|
|
|
I had used System.Drawing.PrinterSettings Class. Using that I used to fetch the printers that are added on my PC.
Now the problem is that I want to identify just the printers that are physically attached. I want the list of Virtual printers that are dummy and are not physically present. Can anyone help me as soon as possible.
|
|
|
|
|
hi,
I have created a setup & deployed a project using windows installer. how can i incorporate the self launching of the application after teh completion of installation. like we have for winamp, after installing winamp it used to launch on its own. this is the feature i want to incorporate.
Thanks in advance.
Praveen Raghuvanshi
|
|
|
|
|
Hi,
I'd suggest you to write a class like ;
[RunInstaller(true)]
public class RunAfterInstall: Installer
{
...
}
You should add it, as a custom action in your deploy project.
Also you can handle the after installation event, in the class above.
Hope this will help.
Cheers.
|
|
|
|
|
Hi
how can i query the name of all the tables existing (except system tables) in a database using sql server 2000.
regards
sAqIb
|
|
|
|
|
select * from sys.sysObjects
where type = 'U'
|
|
|
|
|
select name from master..sysobjects
where type = 'U'
|
|
|
|
|
hi
you can use this to get only the names of the table with no other coloumns.
Select name
From sisobjects
where type = 'U'
if you need anything else fell free to contact me on MSN: jamilaboukhalil@hotmail.com
Jamil abou khalil
|
|
|
|
|
i want to create webboard use c#
wherever have example or book
tell me please
Preaw
|
|
|
|
|
help guys... how can i enter next character in the text box using vb6? it so happen that i'm using hardware - buttons - in this program... using the inpout32.dll and the sort of thing... when i click the button to an specific number then click it again for other number, its just keep on changing the number in the text box - not adding the number that i have click... example: when i click number 1, 1 will appear in the text box, and then i will again click number 2 - the text box should display 12, since i click 1 before, ryt? but in this case, when i click the 2nd number which is 2, it simply replaces the 1st number - which is 1. guyd, can you help me with this? needed it badly thanks!!!
|
|
|
|
|
Could you please enlighten us on why you're asking a VB6 question in a C# forum?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
hi guys i am trying to disable my lan adapter card and again enable it ,,
i am using WMI and the following code ,, but i am getting an exception
"The method is not implemented by any class" why is that ? and how to resolve this issue ,,, can any help me please,,,
=========================
ObjectQuery oQuery = new System.Management.ObjectQuery("Select * from Win32_networkadapter")
string[] o = new string[1];
ManagementObjectSearcher oSearcher = new ManagementObjectSearcher(oQuery);
ManagementObjectCollection oReturnCollection = oSearcher.Get();
foreach (ManagementObject oReturn in oReturnCollection)
{
Console.WriteLine(oReturn["macaddress"].ToString().ToLower());
oReturn.InvokeMethod("disable",(object[])o);
i also use the same code with the statement
oReturn.InvokeMethod("enable",(object[])o);
====================
}
please help me out
thanks in advance
hello
|
|
|
|
|
Hello,
Can anyone recomend my on a good book that explains how to program user controls ?
I found some book that explains how to use the microsoft controls, but i need to program my own.
Thanks
|
|
|
|
|
o,I'm looking for it also,if you find it,can you tell me also?much thanx
|
|
|
|
|
I've found Professional Windows GUI Programming with c#, from the wrox publication.
|
|
|
|
|
Hi all,
I'm using the Tao libraries and the simpleOpenGLControl therein to make a graphing widget. This requires text for the labels of various things, yet getting text in ogl seems to be a nightmare for me. The most suited functions seems to be the glutBitmapCharacter and/or glutBitmapString. I've seen a few example tutorials of these adn they look simple enough. However, when either of these functions are executed, I just get an exit with code 1. Whatever that means. I take it that means 'bad' as the darn thing doesnt work.
I have absolutely no idea what to do next and I've got no information from the compiler about what exactly this error is. It simply refuses to work.
Can someone please help or point me in the right direction or let me find alternatives?
NB: In the NeHe lesson 13 there is some sort of example that does something with text that I cant quite get my head around. This code suffers from the same problem, yet the compiled exe (that comes with the Tao libraries) works fine. Not sure if thats relevant.
EDIT: The problem appears to be with the simpleOpenglControl itself. The gluBitmap functions work correctly on an a standard openGl window.
-- modified at 5:58 Thursday 12th October, 2006
|
|
|
|