.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to get IP address

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :ASP.Net
Hi I need to get the IP address and ther browser information in the request so that I can create a log of access.   Desmond.

View Complete Post

More Related Resource Links

IP Address Blocking or Restriction in SQL Server

"is it possible to block connections to SQL Server based on IP address". As far as now there is no official way in SQL Server to block the connections in SQL Server based on IP address. However this can be done from the OS end, we have the following three options available, refer HERE for more.

.RRAS IP Filter

my ip address

IP Tejji answers question like what is my ip address? find my ip addresss? detect my ip address? Best part is it also determines your local ip address as well as mac address. Further if you keen on browser specification and details regarding browser capabilities can also be found. It also help you see your geographic location. Other details that are available are Latitude, Longitude, timezone, country, region & city. In short it is one-stop-shop for very rich details about your IP and related information.

SOA Tips: Address Scalability Bottlenecks with Distributed Caching


SOA makes application scalability easier, but getting the best performance out of your SOA means paying close attention to the details. We'll give you some tips for coding your app more effectively and using distributed caching to remove data access bottlenecks.

Iqbal Khan

MSDN Magazine June 2010

Advanced Basics: What's My IP Address?


If you're like me, you regularly do tech-support for family, friends, and neighbors. You can't go to a party without hearing the familiar refrain: "I've just got a quick question. " It's always something-their Internet connections get dropped, they've got a virus, they can't install some piece of hardware, or some file has gone missing.

Ken Getz

MSDN Magazine December 2005

Find Country using IP Address c# ASP.Net


Hi experts,

how to find the names of countries  using the IP address.

This is my ip address

we are using in C# code please help me this one

Thanks an advance

I.P Address to Location ? by Programming (L I N Q) ? ?

Hello Experts .. Kindly Help me in this .... I have to fetch Location (country , state)  of IP by which orders are purchased .... I managed to get the IP Address of the coustmer by My main concern is location .... can i do this by Programming Via LINQ ....Is this necessary to use another database ... As i get the code which is in VB .... kindly Help me by converting this code in C# or LINQ ... or give me new suggestions ...______________________________________________________________________________________________________________________Protected Sub Button1_Click(ByVal sender As Object,_ ByVal e As System.EventArgs) Handles Button1.Click On Error GoTo HandleError Dim strGetIP As String Dim dblGetLongIP As Double Dim dblPrevPosition As Double Dim dblPosition As Double Dim dblNumber As Double strGetIP = orders.CoustomerIP For i = 1 To 4 dblPosition = InStr(dblPrevPosition + 1, strGetIP, ".", 1) --------- As i used online VB to C# converting this for loop is creating problem ... kindly .. If i = 4 Then dblPosition = Len(strGetIP) + 1 End If dblNumber = Int(Mid(strGetIP, dblPrevPosition + 1, dblPosition - dblPrevPosition - 1)) dblPrevPosition = dblPosition dblGetLongIP = ((dblNumber Mod 256) * (256 ^ (4 - i))) + dblGetLongIP Next

WebMethods, sends to wrong address (activities.aspx.aspx)?

I'm verifying e-mail address using WebMethods, however, I'm getting a 404 not found (error console) saying that it can't find activities.aspx.aspx. I am using URL-Rewriting, but I tried adding a detect for 'activities.aspx.aspx' and redirect back to .activities.aspx' but it didn't do anything.Here is the error:[HttpException]: The file '/activities.aspx.aspx' does not exist. at System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) at System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandl

a question about getting url address

Hi!. i have a problem about getting url address. if a user call login page on browser's address part and the user has been authenticated, i want to redirect user the page that he requests. i try to use Request.Url/Request.UrlReferrer. But i couldn't. Thanks..

Bad email address exception handling

 I have a form that used to send an email to someone who had posted  a listing on my site, with a copy to the sending user. The code below is intended to catch the exception that occurs when email address of the person posting the listing (TxtBxTo.Text) is not valid, and also intended to catch the (unlikely) event that the user has entered and confirmed an invalid email (TxtBxEmail.Text) for himself on the form. I have tested this code for all combinations of valid and invalid email addresses for the listing poster and the user filling out the form and sending the email Everything works fine except for the situation where the email address for the listing poster is valid but that of the user  is invalid. In this situation I am getting the message on the ConfirmResaleEmail.aspx page that says: "Your message has been sent to the contact person, with a copy to you. " when I should be getting "Woops, it looks like your own email failed when we tried to send you your copy. " I am hoping some sharp-eyed person can spot the problem.  Here is the code:         ' this sends email from a user with email TxtBxEmail to the contact perons listed in TxtBxTo        msg = New MailMessage(TxtBxEmail.Text, TxtBxTo.Text, TxtBxSubject.Text, sb.ToString())    &n

Custom WCF Service (svc) gives address scheme error

Hi, I'm reading a book by Sahil Malik on building solutions for SharePoint 2010 (from Apress). One of the items explained is how to create a custom WCF service that can then be consumed in different scenarios (.NET app, silverlight, javascript). I followed the steps as given in the book, but when I try to open the URL to the service, I get this error: This collection already contains an address with scheme http.  There can be at most one address per scheme in this collection. Parameter name: item I have to mention that when I added the mapped ISAPI folder to my VS project, it didn't create the project subfolder automatically and I accidently created my files (svc and web.config) on the root level of the ISAPI folder. I created the subfolder manually and moved these two files in the subfolder, but it doesn't seem to work. Maybe I overwrote something on the root of ISAPI ? My web.config contains this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <bindings> <basicHttpBinding> <binding name="customBasicHttpBinding"> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Ntlm" /> </security&g

Is it possible to connect to a machine within a Lan if given mac address?

If a machine is within a Lan, with a Lan IP address such as, and its mac address is fixed and known, such as A4:B5:......, the machine is connected to internet through a router with a public IP address. Is it possible to directly connect to the machine from internet using its router IP address and its mac address?   thanksRegards! directfriends.net

Send email to address in a list

infopath form.  end users submits.  Manager gets and assigns to someone on team.  (no Task list involved) In the form there is a drop down pulled from a list of team member names (2 fields: Name and Email) Trying to create a workflow that will email the "assigned to" person.  I think its a workflow look up, but i am not connecting the final dots.  Can anyone direct me to a resource for: If assigned to is equal to "name on a list" use the email associated to the name in the same list thank you in advance..

Is it possible to display the friendly name or email address of LiveID User Using Claims Authenticat

We have finally gotten LiveID authentication to work.  However when we specify a user to add to a sharepoint group, we need to do it via the unique id that live uses.   The user does login using their usual email address and password, but on the sharepoint side they see the PUID@live.com as the logged in user, and when we want to specify the user to have access to the a particular site or library, we have to do it by the same PUID@live.com.  This display makes it difficult to manager users on the sharepoint side.   Is there something I missed on setting up of the authentication provider, or is there something I can do to get sharepoint to retrieve the other information so that we can view the user through the email or full name that live provides?   Steve Paplanus

Code Behind (C#) - Postback - "If (this button was clicked) postback to this address, otherwise, do

Hello!!I have three buttons at the bottom of my form. Two of the buttons make the form invisible and make a Success message Visible.I need all three buttons to call SubmitForm Function to send us an email with the completed form.The third button is a PayPal button which I would like to postback to a different url after submitting the form via email.How can I change its Postback url in C# in the code behind.P.S. I tried Server.Transfer... got an errorThanks

Can connect by IP address but not by name

I have setup WSS 3.0 on a Server 2008 (32-bit) machine using the directions from this site: http://grounding.co.za/blogs/brett/archive/2007/08/23/a-developer-s-101-to-installing-windows-sharepoint-services-3-0.aspx I have created a site collection which I can connect to on the server.  When I try to access the site from either my laptop or other desktop, I can only get to the site by entering the IP address of the server.  The site name returns "Internet Explorer cannot display the webpage" I have disabled every firewall including the router. I checked SQL and the account has the recommended administration rights. I tried flushdns. What am I missing?

.NET Runtime 2.0 Error Reporting, faulting module ntdll.dll,fault address 0x0001bd02

hi, experts, Hi, these errors happen and happen these days.   in the eventvwr log,   Faulting application XXXXXXXX.exe, version, stamp 48482f53, faulting module ntdll.dll, version 5.2.3790.4455, stamp 49900d60, debug? 0, fault address 0x0001bd02. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.   the OS is windows server 2003 sp2. ntdll.dll in C:\WINDOWS\system32 is 5.2.3790.4455 ntdll.dll in C:\WINDOWS\ServicePackFiles\i386 is 5.2.3790.3959   I would not like to reinstall the program because a lot of things to do for reinstallation.   please kindly help !!!!!!!!!!

Email - From Address Problem

Hello All,I have a sample Email code - MailMessage Message = new MailMessage(); Message.IsBodyHtml = true; Message.To.Add(new MailAddress("TO@gmail.com","ToName")); Message.From = new MailAddress("FROM@abc.com","FromName"); Message.Subject = "Test Sub"; Message.Body = "This is Test!!!"; SmtpClient sc = new SmtpClient(); sc.UseDefaultCredentials = false; sc.Host = "smtp.gmail.com"; sc.Port = 587; sc.Credentials = new NetworkCredential("CREDENTIALS@gmail.com", "CredentialsPassword"); sc.EnableSsl = true; sc.Send(Message); When i Use this code - Email is going 100% successfully but, Insted of displaying from address as "FROM@abc.com" - it is displaying it as "CREDENTIALS@gmail.com".** From Name is displaying correctly.So the email in email Client is pretty confusing with this problem. Kindly suggest me some work arounds.FROM@abc.com
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend