Getting a machine name of logged in user in asp.net

Hi,

I recently encountered this scenario and thought of blogging about it. To get the machine name of the logged in user, you can use the “GetHostEntry()” method provided in System.Net.Dns class.

GetHostEntry takes a string as parameter and it is the hostname or address of the machine whose entry we need to get. So in order to get the machine name, we need to make use of the server variable remote_addr.

GetHostEntry returns an IPHostEntry object and its HostName property would give the machine name of the logged in user. So the line of code would be

System.Net.Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName;

 

Hope this helps!

Transferring files from Windows 7 host to MAC OS X Mountain Lion Virtual Machine

Hi, To transfer files from your local Windows 7 OS to a Mac Virtual Machine, you first need to enable sharing in Virtual machine settings. After that, open the virtual machine, select the “Go” menu option in the Finder menu as shown below. In that, select the “Connect to Server” option. OS-X-Finder-Connect-To-Server Next step is to enter the IP address of your local host machine. Enter the IP address in the following way: smb://xxx.xxx.xxx.xxx and then click on “Connect”. This is shown below. OS-X-2 After you click on connect, you are prompted for username and password. Give your credentials along with the domain, if any, in your username (domain\username). If the credentials are correct, then your mac VM should show a list of folders present in the “C:\” drive of your local windows host machine. Select any one of them and click on OK. This would make the selected folder as a shared folder between tour local host windows machine and your mac virtual machine.

P.S.: I have tried this with Host as Windows 7 and VM as Mac OS X Mountain Lion.

 

source: http://forums.macrumors.com/showthread.php?t=311224

Hope this helps!

Our great Indian Democracy (Sarcastically)

Patrick French talks about the pathetic state of Indian democracy and the reason behind our nation’s government’s failure in everything. Watch this video and see how our corrupt and useless politicians are literally raping our own country for their own personal greed. Too bad that because of some corrupt politicians, our entire nation is put […]