473,465 Members | 1,964 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reading IP....

Which is the efficient statement in .Net Framework 1.1 to read the IP
address of the browser?
Thanks,
Smith

Nov 19 '05 #1
5 1057
You could use the REMOTE_ADDR server variable.

Request.ServerVariables("REMOTE_ADDR")

Here's more info:
http://www.4guysfromrolla.com/webtech/092298-3.shtml

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"John Smith" <SS******@hotmail.com> wrote in message
news:uA**************@TK2MSFTNGP14.phx.gbl...
Which is the efficient statement in .Net Framework 1.1 to read the IP
address of the browser?
Thanks,
Smith

Nov 19 '05 #2
note: if a proxy/firewall server is used, this is the not the really the
machines ipaddress, and several users behind the same firewall may have the
same ipaddress. and no, you cannot get the real address.

-- bruce (sqlwork.com)
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
You could use the REMOTE_ADDR server variable.

Request.ServerVariables("REMOTE_ADDR")

Here's more info:
http://www.4guysfromrolla.com/webtech/092298-3.shtml

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"John Smith" <SS******@hotmail.com> wrote in message
news:uA**************@TK2MSFTNGP14.phx.gbl...
Which is the efficient statement in .Net Framework 1.1 to read the IP
address of the browser?
Thanks,
Smith


Nov 19 '05 #3
Thank you all

"Bruce Barker" <br******************@safeco.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
note: if a proxy/firewall server is used, this is the not the really the
machines ipaddress, and several users behind the same firewall may have the same ipaddress. and no, you cannot get the real address.

-- bruce (sqlwork.com)
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
You could use the REMOTE_ADDR server variable.

Request.ServerVariables("REMOTE_ADDR")

Here's more info:
http://www.4guysfromrolla.com/webtech/092298-3.shtml

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"John Smith" <SS******@hotmail.com> wrote in message
news:uA**************@TK2MSFTNGP14.phx.gbl...
Which is the efficient statement in .Net Framework 1.1 to read the IP
address of the browser?
Thanks,
Smith



Nov 19 '05 #4
to display the account that an ASP.net page is executing you could try this:
On Page_load
Label.text = system.security.principal.windowsidentity.getcurre nt().name

"John Smith" wrote:
Thank you all

"Bruce Barker" <br******************@safeco.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
note: if a proxy/firewall server is used, this is the not the really the
machines ipaddress, and several users behind the same firewall may have

the
same ipaddress. and no, you cannot get the real address.

-- bruce (sqlwork.com)
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
You could use the REMOTE_ADDR server variable.

Request.ServerVariables("REMOTE_ADDR")

Here's more info:
http://www.4guysfromrolla.com/webtech/092298-3.shtml

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"John Smith" <SS******@hotmail.com> wrote in message
news:uA**************@TK2MSFTNGP14.phx.gbl...
> Which is the efficient statement in .Net Framework 1.1 to read the IP
> address of the browser?
> Thanks,
> Smith
>
>
>



Nov 19 '05 #5
Aargh!

Do you read replies to questions you've answered, so that you don't
propagate the *same* mistaken code which you have previously
proposed and which has been corrected by others ?

From my previous reply to you :
-------------------------------------------

That's not what he was looking for.

He was looking for "the IP Address of the
server where the code behind is running".

re:
lblAccount.text = System.Security.Principal.WindowsIdentity.GetCurre nt().Name
That should be
System.Security.Principal.WindowsIdentity.GetCurre nt.Name()
-----------------------------------------------

Now, you come back with : Label.text = system.security.principal.windowsidentity.getcurre nt().name
That should be :
Label.text = system.security.principal.windowsidentity.getcurre nt.name()

Please, if you must recommend code, make sure it's correct
....and pay attention to the corrections sent to your posts.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Sccr18" <Sc****@discussions.microsoft.com> wrote in message
news:F9**********************************@microsof t.com... to display the account that an ASP.net page is executing you could try this:
On Page_load
Label.text = system.security.principal.windowsidentity.getcurre nt().name

"John Smith" wrote:
Thank you all

"Bruce Barker" <br******************@safeco.com> wrote in message
news:eS**************@TK2MSFTNGP10.phx.gbl...
> note: if a proxy/firewall server is used, this is the not the really the
> machines ipaddress, and several users behind the same firewall may have

the
> same ipaddress. and no, you cannot get the real address.
>
> -- bruce (sqlwork.com)
>
>
> "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
> news:%2****************@TK2MSFTNGP12.phx.gbl...
> > You could use the REMOTE_ADDR server variable.
> >
> > Request.ServerVariables("REMOTE_ADDR")
> >
> > Here's more info:
> > http://www.4guysfromrolla.com/webtech/092298-3.shtml
> >
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://SteveOrr.net
> >
> >
> > "John Smith" <SS******@hotmail.com> wrote in message
> > news:uA**************@TK2MSFTNGP14.phx.gbl...
> >> Which is the efficient statement in .Net Framework 1.1 to read the IP
> >> address of the browser?
> >> Thanks,
> >> Smith
> >>
> >>
> >>
> >
> >
>
>


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Andy | last post by:
Hi, In the code below (not pretty I know but it's an early version :-P) I'm having problems reading the data object back in. If I move the reading code to immediately after the section where it...
6
by: Raymond Hettinger | last post by:
Found in a pamphlet at a pre-school: --------------------------------------- Reading improves vocabulary Reading raises cultural literacy through shared knowledge Reading develops writing skills...
4
by: Xah Lee | last post by:
# -*- coding: utf-8 -*- # Python # to open a file and write to file # do f=open('xfile.txt','w') # this creates a file "object" and name it f. # the second argument of open can be
24
by: Hendrik Schober | last post by:
Hi, I have a 'std::istream' and need to read its whole contents into a string. How can I do this? TIA; Schobi
19
by: Lionel B | last post by:
Greetings, I need to read (unformatted text) from stdin up to EOF into a char buffer; of course I cannot allocate my buffer until I know how much text is available, and I do not know how much...
4
by: Oliver Knoll | last post by:
According to my ANSI book, tmpfile() creates a file with wb+ mode (that is just writing, right?). How would one reopen it for reading? I got the following (which works): FILE *tmpFile =...
6
by: KevinD | last post by:
assumption: I am new to C and old to COBOL I have been reading a lot (self teaching) but something is not sinking in with respect to reading a simple file - one record at a time. Using C, I am...
3
by: Nick | last post by:
I have found a class that compresses and uncompresses data but need some help with how to use part of it below is the deflate method which compresses the string that I pass in, this works OK. At...
9
by: Mike Reed | last post by:
I must be having a "senile" day! I cannot recall, nor get to work, code to read a cookie's expiration date/time in an ASP page/VBScript. What am I missing? *** Sent via Developersdex...
4
by: Gaijinco | last post by:
I had a file named nap.in which looks like this: 4 10:00 12:00 Lectures 12:00 13:00 Lunch, like always. 13:00 15:00 Boring lectures... 15:30 17:45 Reading 4 10:00 12:00 Lectures 12:00 13:00...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.