Mobiles :: How To Obtain The IP Address Or MAC Address
Nov 9, 2010
How do I obtain the IP address or MAC address or some Unique ID of a device within a mobile app, either client or server side?
We are developing a web application targeting iPhone, BlackBerry and Android, generally device independent, and we are looking for ways to uniquely identify a device for added authentication purpose. Is there a way to uniquely identify a mobile device, regardless of the make and model?
Is there any way to get the address book contacts from a blackberry device in a .net web application?We have a .net web application that can be accessible from a Blackberry device.What we need is a way of getting the Blackberry contacts list from a blacberry device the same way when you send an email:When you send an email you can type some characters on the "To" field then hit "enter" and the blackberry device is doing a lookup function returning a list of contacts based on the keywork you typed. Maybe there is a way of calling a blackberry API from a javascript function that would perform the same way described.
I have managed to expose the MEX endpoint of my WCF service and I can access it with the address like [URL] (example) and get the WDSL. So no problem there.
However, my WCF test page shows the address wrongly by using the server's name instead of the DNS name. And if I click on the link on the test page it won't work (can't get WSDL).
The WCF test page looks like this:
MyService Service
You have created a service.
To test this service, you will need to create a client and use it to call the service.
[URL]
The WCF service is hosted in IIS6. I would like to have a test page with the correct WSDL address so users can see the WSDL quickly in the browser just by clicking on the WSDL address.
In short: How can I change the MyServerName to inter.mycompany.com on the WCF test page? Can this be specified somewhere in the Web.config?
I am trying to pull entries from a database based on the current users IP Address. Here is what I have so far:
[Code]....
I am receiving the following error: Cannot find either column "Request" or the user-defined function or aggregate "Request.UserHostAddress.ToString", or the name is ambiguous.
Is it possible to do this? Should I try to access this information another way?
I want to capture user ip address but some reason i am getting different values:
method 1: Dim strHostName As String = System.Net.Dns.GetHostName() Dim clientIPAddress As String = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString() method 2: Dim k As String = Request.ServerVariables("remote_addr")
I have some web page which display the data by values from the url quertString (like: productId) I want to create link on the homepage to the last product that upload to the site (without using select top 1 ... . order by productId DESC) i want to display the productId in the url address, is there any way to do that?
i'm totally new to the asp.net mvc stack and i was wondering what happened to the simple Page object and the Request ServerVariables object? basically what i wanted to do is to pull out the client's pc ip address. but i fail to understand how the current MVC structure has changed all of this. as far as i can understand, most of the variable object has been replaced by the HttpRequest variants? really a sea of stuff to learn in the asp.net mvc world :) For example i have a static class with this current function. how do i get the same result using asp.net mvc?
public static int getCountry(Page page) { return getCountryFromIP(getIPAddress(page)); } public static string getIPAddress(Page page) { string szRemoteAddr = page.Request.ServerVariables["REMOTE_ADDR"]; string szXForwardedFor = page.Request.ServerVariables["X_FORWARDED_FOR"]; string szIP = ""; if (szXForwardedFor == null) { szIP = szRemoteAddr; } else { szIP = szXForwardedFor; if (szIP.IndexOf(",") > 0) { string [] arIPs = szIP.Split(','); foreach (string item in arIPs) { if (!isPrivateIP(item)) { return item; } } } } return szIP; }
And how do i call this function from the controller page?
i want to get the External IPAddress of the client system in the LAN, My server is their in LAN so nd i make a requst to the server through my local systems at the time i need that local system External IP Address through ASP.NET but it is giving the local IPAddress
just like the title is. When users land on the second page, after clicking submit on first page, i want the second page to read the url, then modify the aspx page in the end and send the user to a specific page. e.g - www.abc.com/page1.aspx --> click submit --> redirect to www.abc.com/page2.aspx the code should read "/page2.aspx" and then rewrite it as "/page5.aspx" and automatically redirect to page5.aspx
I am getting destination ip address from packets, now i want to get domain name from ip addess. i have use whois, to get domain name, but it works only for few sites i.e google,microsoft. its not working for rediff or yahoo, Is there another way to get domain name from ip address?
I can get the clients IP Address using: Context.Request.UserHostAddress; Context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"]; Context.Request.ServerVariables["REMOTE_ADDR"]; What is difference between these and when should i Use these different to get clients (accessing the webservice) IP address
I have an asp app we use to collect data. I did not write this and I know nothing about asp, however I am tasked with modifying the app. I am trying to collect the ip address of the client and put it in a text box. First piece of code is where I added the new text box.
Code: function processgetip(event) { // Within this function, make an AJAX call to get the IP Address $.ajax('@Url.Action("GetIPAddress","getipaddress")', function (ip) { // When this call is done, your IP should be stored in 'ip', so // You can use it how you would like // Example: Setting a TextBox with ID "YourElement" to your returned IP Address $("#facility").val(ip); }); }
I then created a controller named getipaddress:
Code: using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http;
[code]...
Now with all of that it will compile and run using the localhost but it's not working. Not getting any errors it just doesn't return anything.
I can manually add an I.P. address to the IP Address and Domain Restrictions form in IIS, but how do I do that in codebehind dynamically. In my web App, after a user has provided their login information, I want to be able to add their I.P. address to the list so that they can access the site automaticaly through codebehind.
I used following methods HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] Request.ServerVariables["REMOTE_HOST"] Request.UserHostAddress Request.UserHostName
All the above are returning "127.0.0.1", not the actual IP.