Click here to Skip to main content
15,905,558 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to fetch mac address of system in to a text file.then after encryting saving it in database thn using the same for autentication on login page?
Posted
Comments
Sergey Alexandrovich Kryukov 2-Jan-12 4:00am    
How "text file" is related to authentication? :-)
--SA

You Web application has no access to a client computer. Would you like it do to so? How about security?

—SA
 
Share this answer
 
v2
Comments
Wendelius 2-Jan-12 4:09am    
Exactly, 5
Sergey Alexandrovich Kryukov 2-Jan-12 4:10am    
Thank you, Mika.
--SA
Sanjeev236 2-Jan-12 4:10am    
thanka lot for your concern abt security of web.but in order to maintain the security only..i want to encrypt the mac address.
Sanjeev236 2-Jan-12 4:14am    
yup man...!!! you are right..!!! but my project is work only on localhost at client site.so i dnt know how to stop client to replicate my project. the best solution,i got is to authenicate on mac address.. suggest me somethng if you have somethng better in your mind? :(
As SA stated, good security would be needed, also not to mention that MAC address can be easily faked.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Jan-12 4:11am    
Oh yes, it can be faked. There is nothing between client and server but request and response, that's why. A 5 for this note.
--SA
Wendelius 2-Jan-12 4:22am    
Thanks :)
Sanjeev236 2-Jan-12 4:14am    
yup man...!!! you are right..!!! but my project is work only on localhost at client site.so i dnt know how to stop client to replicate my project. the best solution,i got is to authenicate on mac address.. suggest me somethng if you have somethng better in your mind? :(
Wendelius 2-Jan-12 5:05am    
If you want to protect the software, consider using license key. For example: License Key Generation[^]
Sanjeev236 2-Jan-12 4:51am    
Reply dear..!!!
This is very critical..

But i have solve this problem.

for that i have create an interface to fetch MAC address of Machine and used
.msi installer to install this application on client machine.

And using .cab file , .inf file , CABARC.exe file you can install this application on client machine but this is only possible in Internet Explorer.

This is reference URL to how to create Activex Control in Asp.Net and how to install it on Client Side.

http://haseebakhtar.wordpress.com/2011/05/31/creating-an-activex-control-in-net-using-c/[^]

And to retrieve CLient Machines MAC Address use this following code.

ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration");
ManagementObjectCollection moc = mc.GetInstances();
string MACAddress = String.Empty;
foreach (ManagementObject mo in moc)
{
if (MACAddress == String.Empty) // only return MAC Address from first card
{
if ((bool)mo["IPEnabled"] == true) MACAddress = mo["MacAddress"].ToString();
}
mo.Dispose();
}
return MACAddress.Replace(":", "");

This will work properly.

In case any queries then you can contact me.

Sachin.
 
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