Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
QuestionDatabase Validation Pin
Smithakrishnan31-Jan-08 22:47
Smithakrishnan31-Jan-08 22:47 
GeneralRe: Database Validation Pin
Elayaraja Sambasivam1-Feb-08 3:10
Elayaraja Sambasivam1-Feb-08 3:10 
QuestionIs it possible to make the subitems in Listview editable? Pin
Seraph_summer31-Jan-08 21:54
Seraph_summer31-Jan-08 21:54 
AnswerRe: Is it possible to make the subitems in Listview editable? Pin
Skippums1-Feb-08 1:10
Skippums1-Feb-08 1:10 
GeneralForm closing issue Pin
Neo Andreson31-Jan-08 19:51
Neo Andreson31-Jan-08 19:51 
GeneralRe: Form closing issue Pin
stancrm31-Jan-08 20:06
stancrm31-Jan-08 20:06 
AnswerRe: Form closing issue Pin
Vikram A Punathambekar31-Jan-08 20:08
Vikram A Punathambekar31-Jan-08 20:08 
GeneralProblem in Getting MAC Address of a Remote machine... Pin
Balagurunathan S31-Jan-08 19:49
Balagurunathan S31-Jan-08 19:49 
Hi Friends..

I nee to get Mac address of a Remote machine for which i am using VC++ dll method("iphlpapi.dll") to do so..I am using the followin C# code to get the MAC Address..


public class clsMacAdd
{
[DllImport("iphlpapi.dll", ExactSpelling=true)]
public static extern int SendARP( int DestIP, int SrcIP, [Out] byte[] pMacAddr, ref int PhyAddrLen );


public static string GetMacaddress(string strHostName)
{
System.Net.IPHostEntry Tempaddr = null;
string[] Ipaddr = new string[3];

//strHostName = Request.UserHostName;

if ( strHostName == "127.0.0.1" )
{
strHostName = "system102";
}

Tempaddr = (System.Net.IPHostEntry)Dns.GetHostByName( strHostName );

System.Net.IPAddress[] TempAd = Tempaddr.AddressList;

foreach(IPAddress TempA in TempAd)
{
Ipaddr[1] = TempA.ToString();

byte[] ab = new byte[6];
int len = ab.Length;

// This Function Used to Get The Physical Address
//int r = SendARP(int(TempA.Address), 0, ab, ref len );
int r = SendARP( (int) TempA.Address, 0, ab, ref len );
string mac = BitConverter.ToString( ab, 0, 6 );
return mac;
}
return null;
}
}


}


I am getting the MAC address when i run in enterprise network(local),but when i host it a web server(live) i couldn't get the MAC Address..Wat could be the problem..? Someone help in this regard as early as possible..


Regards,

Balaguru

GeneralWPF: Object position does not change. Pin
AghaKhan31-Jan-08 11:58
AghaKhan31-Jan-08 11:58 
GeneralRe: WPF: Object position does not change. Pin
CKnig31-Jan-08 18:52
CKnig31-Jan-08 18:52 
GeneralRe: WPF: Object position does not change. Pin
AghaKhan1-Feb-08 7:24
AghaKhan1-Feb-08 7:24 
GeneralRe: WPF: Object position does not change. Pin
CKnig1-Feb-08 21:34
CKnig1-Feb-08 21:34 
GeneralVb to C# Pin
NewToAspDotNet31-Jan-08 11:39
NewToAspDotNet31-Jan-08 11:39 
GeneralRe: Vb to C# [modified] Pin
MarkB77731-Jan-08 12:33
MarkB77731-Jan-08 12:33 
GeneralRe: Vb to C# Pin
Guffa31-Jan-08 12:41
Guffa31-Jan-08 12:41 
GeneralRe: Vb to C# Pin
DaveyM6931-Jan-08 13:30
professionalDaveyM6931-Jan-08 13:30 
GeneralRe: Vb to C# Pin
Vikram A Punathambekar31-Jan-08 17:59
Vikram A Punathambekar31-Jan-08 17:59 
GeneralRe: Vb to C# Pin
DaveyM6931-Jan-08 20:55
professionalDaveyM6931-Jan-08 20:55 
GeneralRe: Vb to C# Pin
Guffa31-Jan-08 21:41
Guffa31-Jan-08 21:41 
GeneralRe: Vb to C# Pin
Guffa31-Jan-08 21:56
Guffa31-Jan-08 21:56 
GeneralRe: Vb to C# Pin
Vikram A Punathambekar1-Feb-08 1:47
Vikram A Punathambekar1-Feb-08 1:47 
GeneralRe: Vb to C# Pin
Pete O'Hanlon1-Feb-08 3:39
mvePete O'Hanlon1-Feb-08 3:39 
GeneralRe: Vb to C# Pin
Guffa1-Feb-08 5:11
Guffa1-Feb-08 5:11 
JokeRe: Vb to C# Pin
DavidNohejl1-Feb-08 6:17
DavidNohejl1-Feb-08 6:17 
GeneralRe: Vb to C# Pin
Guffa1-Feb-08 5:16
Guffa1-Feb-08 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.