in PHP, I can know these info for the visitor: IP Address. IP HostName. Natted IP Address. Natted IP HostName. User-Agent (Web Browser, OS version, framework, infopath, etc...) Web REQUEST. Web Referrer. Language. DateTime. How can I know that in asp.net? And what additional info can I know using asp.net? And how can I know if the visitor have special software installed?
This is fetching the IP address alright, but now I want to know the country of the visitor and USE that country name to redirect the visitor to some webpage accordingly.
I came across this library but have no clue how to use it in the project. Actually I do, but I am not sure so I am asking.
http://ipaddressextensions.codeplex.com/
When I download from the above the ZIP folder has a DLL file and an XML file. Now, what do I do with these two? Like include in the project. Then what do I type in the code file?
Something like the following.
if (countryName=="France") { response.redirect("www.mysite.fr") [code]....
How do I go about it? Also do I really need to type SO many if blocks for ALL the countries. How do I shorten this code?
I'm building an ASP.NET MVC 2 site where I'm currently implementing an OpenID sign-up form. Unfortunately, I'm foreseeing a possible security bug/vulnerability inside my architecture.
Here's how I want OpenID login to work:
User requests /Account/Login, Controller sends back OpenIDLogin View. User enters their OpenID into the View, then OpenID authorization takes place, and finally the OpenID is returned to the Controller.The Controller checks whether the OpenID is currently in use by a user in the system or not. If it is, the user is logged in to that account. If not, the registration process begins.
And now, the OpenID registration process:
The OpenID identifier, as well as any other information provided by the OpenID provider (such as email address or name), is put into my custom ViewModel and sent to my OpenIDRegistrationForm View.The RegistrationForm View stores the OpenID in a hidden field to make sure that it gets sent back to the Controller.The user fills in the RegistrationForm View and sends it back to the Controller.The Controller creates the user account and puts the OpenID into the database.
The bug that I see within my architecture is that a user could modify the hidden value in the RegistrationForm View. Thus, they could spoof their OpenID! I will make sure to add another round of checking to the final Registration Controller Action to make sure that the OpenID that is provided doesn't exist yet, but there is still a possibility for spoofing. Can my architecture be improved somehow? I don't want this to end badly...
One solution I'm considering is encrypting the OpenID before I send it to the View and then decrypting it when it reaches the Controller. Should I try this?
I'm trying to write an application that allows a visitor to use our service for 7 days. After 7 days, they will no longer be able to use it unless they sign up. What's the best way and the most accurate way to track it without collecting their credit card information? I'm trying to use the following code to track visiotr's ip. But I'm not sure if people are able to change their ip address or using a proxy server that will go through.
I created my own register system with my own register form together with the asp.net login control
the user register and the data is sent to my custom table and I used a method that check if the user exists in my table and the asp.net login control display the correct result "if exists or not"
everything appears to work correctly but I cannot access pages that deny anonymous users with the configuration file.
We are having two load balancing server. In that we have hosted a asp.net 3.5 application right now we are using request userhostaddress to get visitor ip but it is giving load balancer ip instead of real ip.
I'm facing with an old problem that it made me confuse very much. So I need your advice to make sure that I've been using the right way. My demand is to count the number of visitor in my website, so I've coded in Global.asax file:
[Code]....
Then, I used variable Application["SiteHitCounter"] and Application[CurrentUsers"] in another C# behind code file to show them on web page.The problem I'm facing is that the website can't show right total visitor number as in my database when I publish it to shared host.
I am creating a site that will host my virtual resume and would like to set it up so the visitor would enter a simple code to advance past the default page. I am not looking to create a unique login for each visitor, I just want to control who sees the information online. I have used the web controls in visual studio express for for creating logins on other sites, which included additional support code like "User.Identity.IsAuthenticated == false" to redirect visitors on other sites but I am looking to see if there is a more simple way of handling this.
whenever any internet user visit any site on the world wide web, a session is created by the site for that useram i right? or is the session created by the iis on webserver?and this sessionwhat is it, yes i know session variables and how used them, but never understood what is this sessionwhat information does it have
I know google analytics can do it,but i need to store each user data on my own database - for various advanced reasons and want to manipulate it. Here are my series of questions
1)How do i calculate time (when the visitor visits the website the timer should start....and when the visitor closes the page on my ASP.NEt Website timer should stop...so collecting his timespan to visit the website(when the visitor closes the page how should i make timer stop....and make an entry of his visit into the database....tricky...but i know there is a way out but how???).
2) I neede to know from which country the user came from...I know to collect the IP address but how could we find out which country the user came from..???
3)the next thing i need to know is..I want to display reports on my ASP.NEt Website of all visitor information,country,date time he visited and which technology i can use...crystal reports will be fine for me...or should any other.
4) i need to make it look like google analytics and make it super fast ...so my website visitors shouldnt wait too long..
I've written a .NET/jQuery rating script that allows users to rate a particular product.
Everyone that visits the website can rate, but I'd like to only allow 1 rating per visitor.
So far I've considered the following options.
1: Store the users IP address and only allow 1 submission per IP.
this would mean that people on corporate LAN's, Internet cafe's, public Wi-Fi's and such won't be able to vote after someone else has from the same location.
2: After voting, create a cookie in their browser that indicates they've voted.
This isn't a good solution either, since people using Private Browsing will be able to vote as many times as they like, OR a more advanced user will clear their cookies and keep submitting a vote over and over again.
Am using a LoginView control which when clicked on I wish to go to the login page but in https not http, login under https then back to an http page. Would like to do the same when the visitor creates a new user with the CreateUserControl.
How generate the unique no. 1,2,3 and so on .... on button click of each new user ..
the code mentioned below is a readwrite coding in vb.net ...
but the problem is it generate the same id for different users on button click event... but i want the no. of times button clicked the new ids will be generated