Catch IP Address of Local Machine Insted of Server IP Address where the application is deployed at

Hai ,

 I have a survey that will be sent to all the users across a group, This survey application is deployed on webserver and that link will be sent to all the group members.Right now it was capturing the IP  Address of server for all members in group , insted i need each members Local machine IP Address to be sent the database via server.

 I tried using the following two requests but all they are doing is capturing the server ip address:

 String clientName = Request.ServerVariables["LOGON_USER"];

String clientName = Request.ServerVariables["REMOTE_ADDR"];

 Can any one suggest me  a good idea to accomplish this.

 Thanks Big Smile

0
Ginjupalli
12/8/2008 4:17:14 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

1 Replies
1115 Views

Similar Articles

[PageSpeed] 32

 Put this in some utility class, or use the code as you wish -

 public static string ClientIPAddress
        {
            get
            {
                if (string.IsNullOrEmpty(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]))
                    return HttpContext.Current.Request.UserHostAddress;
                else
                    return HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
            }
        }


Hope it helps.

-Manas

=======================================
If this post is useful to you, please mark it as answer.
0
yeotumitsu
12/8/2008 4:24:54 PM
Reply:

Similar Artilces:

POA shows old ip address for client/server ip address
i just upgraded groupwise from 5.5 to 6.5 Clients cannot access via tcp/ip even though its setup with the correct ip address in console one. when looking at the poa log file at the server, it gives the old server ip address instead of the current ip address. I cannot find that old ip address in any settings, or is there another problem that is keeping me from accessing via the client using tcp/ip. Hi, Have you checked the POA startup file? Settings in there for the ipaddress and port override anything put into consoleone. Cheers, Steve <bfish@emily.ne...

Web control for catching IP address and MAC address
Hi guys. I would like to know if any of you know a link or maybe have a library which allows me to use a textbox for enter an IP Address or a MAC address??. I've been searching on the web but all of the examples are for windows applications or they are masks for the normal textbox but they don't include the Control type for an IP address or a MAC address. Please help with this.  You would need to make a composite control of 4 textboxes.Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks you...

IP Addressing question
It seems to me that this is an elementary TCP-IP networking question. I must have skipped class for a baseball game that day <g>. I have two networks connected via VPN (watchguard) at two offices: Pittsburgh: 192.168.1.0/24 Cleveland: 192.168.2.0/24 We can communicate over the tunnel between the two networks without problem. However, what I want to do now is to set up a new computer for the branch (2.x) network, but I want to do it *here* in the Pittsburgh network (1.x). Unfortunately, it doesn't work. If I give the server an IP addres...

Problem the IP address showing is NOT my IP address I am at.
host217-35-99-250.in-addr.btopenworld.com or 217.35.99.250 is someone else's IP address, not my IP address (12.98.80.XXX a Dynamic IP address range) when I test my ports with the NanoProbe system. In message <b6i8f8$tp1$1@news.grc.com>, abcministoragellc <abcministoragellc@netzero.net> kicked in with > >host217-35-99-250.in-addr.btopenworld.com >or 217.35.99.250 >is someone else's IP address, not my IP address (12.98.80.XXX a Dynamic >IP address range) >when I test my ports with the NanoProbe system. Had the same here, a couple of minute...

IP Address conflict
I've no idea where to post this, there seems to be no plain vanilla networking forum, so bear with me. Someone, presumably with a laptop, plugged it into our network today. It appears it had a manually set IP address that was the same as our Groupwise server. Everyone's GW client or WebAccess Connection immediately exited, presumably because they were suddenly talking to the wrong computer. I found the TCPIP error messages on the server console when I went to see what the hell happened. NW65SP7 I've got the MAC address and I'll try and track it down. An...

web address changing to ip address
hi all i have a dedicated server.i hosted all files in to dedicated server ...all my web files is working properly.... when i access my web through dedicated server ip address,the web is working fine... when i access my web through web address ,the browser web address is changing to dedicated ip address for eg:my dedicated server ip address is 1.2.3.4 my web address in the dedicated server is www.test.com when i access my web through http://1.2.3.4  web is coming and the web address is  http://1.2.3.4 when i access my web through  http://www.test.com ,web is com...

What is Ip address if network card has more than one ip address assigned
Okay, I have a machine running sqlanywhere server, I have several ip addresses bound to the network card. if I am going to use a client on another computer, what ip address is sqlanywhere server bound to? Regards, Andy Pick one! Then when you configure the db server us it: -x TCPIP{MYIP=xxx.xxx.xxx.xxx} -- Jim Egan [TeamPS] Dynamic Data Solutions, Inc. http://www.dyn-data.com Houston, TX *********************************************************** Enterprise Applications in Your Future? JumpStart '99 Ent...

Changing to NAT using Private IP address What to do with OLd IP addresses
I have a client that is setting up NAT and using private addresses for the internal network. If we add new IP addresses to DCHP, do we delete the old addresses or is there a way to specify which set of Ip addresses for DHCP to hand out? Also, is there a way to just edit the present addresses? We looked and we are not able to see a way to edit the addreses. Thanks in advance for your help and advice. PLW In article <KVn8c.8445$jb5.1118@prv-forum2.provo.novell.com>, wrote: > If we add new IP addresses to DCHP, do we delete the > old addresses or is there a wa...

ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10
Hi, I am randomly getting the following error message in my application. ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP Address of the server'(10048) ERROR [HY000] [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'IP of the server' (10048) I am using .Net 2.0 with VS2005 having ODBC 3.51.14 Driver.  Can any body point out the core reasons of the above error message? Thanks. Nouman Khawaja. I do have the same problem, help me out. Thanks  If the going seems easy, You are going DownHill... When I was writing ...

Changing Server NW6 IP Address / Printer Addresses
We are about to change the IP address of our Netware 6 server and NDPS Printers to allow for a new subnet configuration. Are there any problems that we may run into, I have seen the KB article on changing NW6 server IP, and would assume that after this has been completed i could use NDPS Manager to change the Printer Agent IP's Thanks, Michael Hutchesson Yes, you can use NDPS Manager to change the addresses. You can also use iPrint Manager in iManager. -- -Barry. [Novell Support Forums SysOp] ...

Web Server and Client IP Address
If I am wrting a web service in SQL Anyhwere V9.X, can I get the client IP address? In your web service procedure, you can use "select connection_property( 'NodeAddress' )". Graeme Perrow Senior Software Developer gperrow@ianywhere.com iAnywhere Solutions Inc. A Sybase company Whitepapers, TechDocs, bug fixes are all available through the iAnywhere Developer Community at http://www.ianywhere.com/developer/ Bob Piskac wrote: > If I am wrting a web service in SQL Anyhwere V9.X, can I get the client IP > address? > > I don&#...

How to force MTA to use cluster ip address rather than physical ip address
Hi, Is there a way to force the MTA to use the virtual ip address for outbound connection. We run GW 6.5 SP2 in cluster with 6 nodes. We want to add an external Domain who have to go through a firewall. We added a rule to let the virtual ip address of the MTA to pass but we see that the MTA are using the physical ip address of the server so if the resource migrate, MTA will use an other address and my rule will not work anymore until I add the 6 physical ip address of each node, thing I don't want to do. Regards, Eric Bellavance Ministere des Finances It should...

How could we get gateway's address of the machine from its IP address?
I am developing an application in asp.net using vb.net 2003? I have IP address and MAC address of a machine in my LAN. From this I want to find its default gateway address, DNS Server address if any. How could we do this in asp.net? Atleast I want to find its gateway's address. The System.Net.NetworkInformation namespace provides access to network traffic data, network address information, and notification of address changes for the local computer. The namespace also contains classes that implement the Ping utility. You can use Ping and related classes to check whether a computer ...

Bind EAServer to a given IP address on server with multiple IPs
Hello, The systems guy at my client has set up a new W2K3 server. He has assigned multiple IP addresses to this machine. He wants Jaguar to listen on port 80 on a single specific IP address, but not the others. Can/How do I accomplish this with EAS 5.3 ? Is it as simple as setting the listener.hostname to be the IP rather than ${JAGUAR_HOST_NAME} ? Thanks, D yep. -- Dean Jones CEO PowerObjects http://www.powerobjects.com (612) 339-3355 Ext. 112 TeamSybase * * Think Sybase * * "Daniel Coppersmith" <coppersmith2002_A_T_hotmail_D_O_T_N0SPA...

Web resources about - Catch IP Address of Local Machine Insted of Server IP Address where the application is deployed at - asp.net.web-forms

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Pre-Christmas job application rush hits Australian public service
Speed required for pre-Christmas job window opening for public servants. Check out who is hiring.

Second visa application 'likely' to be approved
The family of a terminally ill Pakistani student can 'hopefully come to Australia sooner rather than later' says Immigration Minister Peter Dutton. ...

Cloud application adoption increases 71 percent in 2015
The adoption of cloud applications is soaring, up by 71 percent in the last year according to the results of a new survey. The latest Cloud ...

Tashfeen Malik's visa application under scrutiny - Business Insider Deutschland
The US government has released the visa application for Tashfeen Malik, who along with her husband killed 14 people in an attack in San Bernardino, ...

MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey, Purchase Applications up 34% YoY
From the MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey Mortgage applications decreased 1.1 percent from one week earlier, ...

Cal State Schools Get Record Number Of Applications For 2016 Term
Schools in the California State University system received a record number of applications for the upcoming 2016 fall term, with more than 830,000 ...

German-Based Spirea Promotes Decentralized PV Applications In Uruguay
... Its technical operations specialist, Laurie Lawrence, pointed out that Uruguay [&hellip German-Based Spirea Promotes Decentralized PV Applications ...

Visa application of San Bernardino shooter released
CNN Visa application of San Bernardino shooter released CNN (CNN) The visa application of one of the San Bernardino shooters was released ...

NTU research team discovers optoelectronic application for molybdenum disulfide
A research team under the National Taiwan University (NTU) has discovered an optoelectronic application for molybdenum disulfide (MoS2), a 2-dimensional ...

Resources last updated: 12/29/2015 1:55:26 PM