Javascript - Finding Users IP Address And MAC Address From Web Browser
Sep 2, 2010Is it possible to find out the clients IP and possibly MAC address from non IE browsers (i.e. without using ActiveX)? If so, how?
View 1 RepliesIs it possible to find out the clients IP and possibly MAC address from non IE browsers (i.e. without using ActiveX)? If so, how?
View 1 Repliesi have created a website (its my academical activity).
1. So my mentor asked me to store the site in one system and open it from other under LAN Connection. Is that possible deploying with trial version of VS
2. Other is how to find out my PCs IP Address so that i can call my site from other system using Number Addressing (IP Address)
I need my system IP address. I've used Request.ServerVariables["remote_addr"] but it is being provided IP address of my network(intranet) not my local system ip.
Actually I've set session state off and want to identify the user request. So i want to fetch the system IP not router/network IP.
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 ip address of the person who is viewing my pages. I am using following code. But i am getting :::1
currently using code :-
string strHostName = System.Net.Dns.GetHostName();
string ip = System.Net.Dns.GetHostAddresses(strHostName).GetValue(0).ToString();
what is wrong or what i need to change?
I need a way to block users from their IP if necessary. What's the best way to approach this? Can I use Request.ServerVariables["REMOTE_ADDR"] and store the ip address as a string in the DB?
View 3 RepliesI want to send email to others. how can i find out my smtp address and port no. I am developing small application. I want to send mail to users.
View 2 RepliesI 'm implementing my version of "ShareThis" in my webpage.How can i get the client's browser displayed address with Asp.NET?I am little confused with this one since the url to share...1) is created with URL rewriting2) contains Greek characters.
View 2 RepliesIn one online application, like online exam, If two users are on same IP address series then I need to generate questions that are completely different.
I am having no idea what approach should I follow.
I want local/Client machine ip address, for that i have written below code. but this code gives me Application server address where my web site is hosted. where as i wanted client machine IP from where my web site is getting accessed. so if my website accessed from 10 different machine in that case i want 10 different IP address of those machines.
Code:
using System.Net;
private string GetIP()
{
string strHostName = "";
strHostName = System.Net.Dns.GetHostName();
IPHostEntry ipEntry = System.Net.Dns.GetHostEntry(strHostName);
IPAddress[] addr = ipEntry.AddressList;
return addr[addr.Length - 1].ToString();
}
Also the below server variable return global ip address.
Code:
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
What is the correct code.
In my website, i am giving "title" in one of my page as:
<title>Announcement Dashboard</title>but this title is not displaying in browser address bar in place of "locallost".I want this "localhost" to be replaced with "Announcement Dashboard" or whatever title i give to my page.Also, im using Master Page concept.
I have some webforms and the main page grabs the users email address when they login and a UserID. It's not uncommon for the user to keep the web page open all day. Is it good practice to store the email address and ID as a session variable and up the timeout to say 10 hours? Or is there a better way? My concern is A) Session variables timing out before the user login timesout B) Doing this incorrectly.
View 12 Replieshow to store users Ip address while registration using asp.net 2.0 Registration control.
View 1 RepliesI have been playing a bit with ASP.NET MVC 2 using VWD 2010.After a bit of struggling with profiles(thank you MS for putting 2 web.config files in the solution...) I decided that after all I like this technology. I always thought that dotNET would be great for server side stuff and I've been proven right.Anyhow, I'm gonna start a real project now and I want to do something weird(yes, I know, I shouldn't be wanting to do weird things, but it's just beyond me :-) ): say I have a company website with roles and a forum.When I click on the nickname of a user, I want to bring his/her profile up - just like you would be doing with any decent forum out there. Well, my final idea is a tad more interesting in this regard, but let's stick it at that: click and see profile page.Problem is, I want this profile to be different for company employees and users.
I want some general informations such as first and last name, date of birth, photo, etc and then for instance I do not want to show the address property for company users. Yes I know I might want to put the company address there or leave it at all blank and I would rather not display it at all.From what I gather about profiles, this is possible only using views and checking for the roles, doing something like:
if User.Role == Company
{
// Stuff here
[code]...
I program in vb
I was wondering if someone can direct me to a good quality tutorial on the process of registering and sending an activation link to the user's email address. I can't seem to find any useful tutorials online!
I am creating web page using asp.net. Is it possible to remove/hide the browsers address bar or toolbar using Javascript for IE.
View 2 RepliesI just need to set a focus on the texbox in the Page_Load event.
There are many ways to do this - from the simple textbox.focus() to HTML and Javascript. But none of these methods really works, because when the page loads the focus is always set to the browser address bar.
I use querystring in my page when i click on button it go to Store.aspx. This is my query string code
protected void ImageButton3_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Store.aspx?behcode=" + Server.UrlEncode(txtNumeric.Text));
}
In addressbar show this
behtob.com/Store.aspx?Behcode=1111
I want in address bar show something like this
behtob.com/Store?Behcode=1111
page name without .aspx
Is it possible?
in my asp.net+vb web page which is use din INTRANET web . In a page i want to restrict the browsing for four peoples only, so that i used a code like below.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim ipaddress As String
ipaddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If ipaddress = "" OrElse ipaddress Is Nothing Then
ipaddress = Request.ServerVariables("REMOTE_ADDR")
End If
iptxt.Text = (ipaddress)
If iptxt.Text = ("192.168.0.3") Then
Response.Redirect("err.aspx")
End If
end sub
in my asp.net+vb web page which is use din INTRANET web . In a page i want to restrict the browsing for four peoples only, so that i used a code like below.
ProtectedSubPage_Load(ByVal sender AsObject,ByVal e AsSystem.EventArgs)HandlesMe.LoadDim ipaddress AsString ipaddress =Request.ServerVariables("HTTP_X_FORWARDED_FOR")If ipaddress =""OrElse ipaddress IsNothingThen ipaddress =Request.ServerVariables("REMOTE_ADDR")EndIf iptxt.Text=(ipaddress) If iptxt.Text=("192.168.0.3")ThenResponse.Redirect("err.aspx")EndIf
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?
Does anyone know how I can authenticate users based on their Email Address and Password as oppose to Domain, Username and then Password?
View 1 RepliesI have a lable that I want to show the logged in users e-mail address. Can someone show me the code-behind in C# for this?
lblEmail.Text = ....
i have a asp.net web with vb code and sql database. i am willing to store the details of the users as ip,computer name and time of using the web is it possible.
View 1 RepliesI have used querystrings in many webpages. When user click hyperlink then it moves to next page but there is a very long string is being displayed in the Address bar of the browser.
I just want to show like this:
[URL]
Not like this:
[URL]