|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Reading IP....Which is the efficient statement in .Net Framework 1.1 to read the IP
address of the browser? Thanks, Smith You could use the REMOTE_ADDR server variable.
Request.ServerVariables("REMOTE_ADDR") Here's more info: http://www.4guysfromrolla.com/webtech/092298-3.shtml Show quoteHide quote "John Smith" <SSmit***@hotmail.com> wrote in message news:uA4PwcBWFHA.2616@TK2MSFTNGP14.phx.gbl... > Which is the efficient statement in .Net Framework 1.1 to read the IP > address of the browser? > Thanks, > Smith > > > 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) Show quoteHide quote "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:%23JgCefBWFHA.3716@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" <SSmit***@hotmail.com> wrote in message > news:uA4PwcBWFHA.2616@TK2MSFTNGP14.phx.gbl... >> Which is the efficient statement in .Net Framework 1.1 to read the IP >> address of the browser? >> Thanks, >> Smith >> >> >> > > Thank you all
Show quoteHide quote "Bruce Barker" <brubar_nospamplease_@safeco.com> wrote in message news:eSqh7mBWFHA.2072@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:%23JgCefBWFHA.3716@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" <SSmit***@hotmail.com> wrote in message > > news:uA4PwcBWFHA.2616@TK2MSFTNGP14.phx.gbl... > >> Which is the efficient statement in .Net Framework 1.1 to read the IP > >> address of the browser? > >> Thanks, > >> Smith > >> > >> > >> > > > > > > to display the account that an ASP.net page is executing you could try this:
On Page_load Label.text = system.security.principal.windowsidentity.getcurrent().name Show quoteHide quote "John Smith" wrote: > Thank you all > > "Bruce Barker" <brubar_nospamplease_@safeco.com> wrote in message > news:eSqh7mBWFHA.2072@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:%23JgCefBWFHA.3716@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" <SSmit***@hotmail.com> wrote in message > > > news:uA4PwcBWFHA.2616@TK2MSFTNGP14.phx.gbl... > > >> Which is the efficient statement in .Net Framework 1.1 to read the IP > > >> address of the browser? > > >> Thanks, > > >> Smith > > >> > > >> > > >> > > > > > > > > > > > > > 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.GetCurrent().Name That should beSystem.Security.Principal.WindowsIdentity.GetCurrent.Name() ----------------------------------------------- Now, you come back with : > Label.text = system.security.principal.windowsidentity.getcurrent().name That should be :Label.text = system.security.principal.windowsidentity.getcurrent.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... ====================== Show quoteHide quote "Sccr18" <Scc***@discussions.microsoft.com> wrote in message news:F9820779-D7AB-4D0B-880C-04F3DFA43390@microsoft.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.getcurrent().name > > "John Smith" wrote: > >> Thank you all >> >> "Bruce Barker" <brubar_nospamplease_@safeco.com> wrote in message >> news:eSqh7mBWFHA.2072@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:%23JgCefBWFHA.3716@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" <SSmit***@hotmail.com> wrote in message >> > > news:uA4PwcBWFHA.2616@TK2MSFTNGP14.phx.gbl... >> > >> Which is the efficient statement in .Net Framework 1.1 to read the IP >> > >> address of the browser? >> > >> Thanks, >> > >> Smith >> > >> >> > >> >> > >> >> > > >> > > >> > >> > >> >> >>
Other interesting topics
Dynamically Adding Controls
Updating a DB via SQL is giving me a headache Best practice Emailing from app - Help! ASP.NET 2.0 Beta 2 Membership. Help! DropDownList Control HttpException (0x80070005): Access denied to 'c:\inetpub' viewstate error link text box to datasource Replace characters in a Dataset? |
|||||||||||||||||||||||