Multiple sessions are recording in ms clarity for single user action - iframe

I have embedded Ms clarity in my website and i integrated my website in an iframe.
When a user enters my website and performs certain actions, Microsoft Clarity is recording these actions in multiple sessions rather than a single session.
Can anyone provide a possible solution or reason for this issue?
Here is the reference code: https://codesandbox.io/s/ms-clarity-testing-gd5fs0?file=/src/App.js

Related

How to hide the continuous hit rates(Refresh) to a website

I have developed a Python (Requests) and Java code to scrap data from a Website. And it will work by continuously refresh the website for new data.
But the Website recently identified my scraper as an Automated Service and my account had been Locked out. Is there any way to hide this refreshes to get new data without account lock?
It depends on which website it is, in any case, the scraper simulates an user behavior, which would still be blocked.
If the website detects timed tasks a solution might be to randomize a refresh time of your application.
If the website will presents a captcha code, you have no easy solution
If the website just counts the visit from a particular IP address, you might set up a dynamic proxy server to simulate requests from other IPs

session vs profile to store userID in an extremely simple vb.netapp

I am building an extremely simple VB.net web application that uses Visual Studio's forms authentication. As part of this- I am trying to capture the userID upon login and use it while the user is in the app (to dynamically display information via dataset/gridview that is associated with that userID) so I don't have to give them their userID and prompt them for it constantly.
The app is very simple and uses a local DB to do all the authentication (Users, User_Activation, Roles)
This app will have 9-10 users that will be consistent over the years(logging in 10-15 times a year), and 40-50 rotating users that log in once or twice and do not return past that year.
The profiles and authentication/sessions do not need to handle tons of users and authentication requests.
I also want to avoid cookies because I want to keep everything as simple, and centralized to the application as possible.
I have explored building a GetUserID function that queries the database based on the userName every time a user takes an action (button click, page load) that requires the userID. But I am having trouble with the SQL and it seems bulky.
I have also looked into sessions- but they seem unreliable and difficult to manage.(How do i keep each session separate as users login?)
I am now looking at Profiles
https://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx
https://msdn.microsoft.com/en-us/library/system.web.profile.sqlprofileprovider.aspx
I think I can just use the default instance of the SqlProfileProvider and point it to my database I already have built?
I am very new to programming and am not sure how complex the configuration would be for the Profiles, so any guidance or advice would be greatly appreciated!
I can post any code snippets needed, or upload the app to github or something if that helps at all.
Thanks!

get number of user in online in asp.net application

I am developing a matrimonial web application in asp.net. In that I want to display number of users in online (logged in).
I am planning to maintain a "login-status table" in dB. And will maintain the table every time the user have logged in and out. But there is problem if the user have closed the browser directly without logging out.
Is there any other easy way to achieve this. Pleas provide sample code.
And I want to know how can I update the table that if the user click the browser's close button.
I recently implemented something similar. The challenge I had is what defines "online". What if the user walks away from the computer, closes the browser, network is disconnected?
In the end I went with online means visited a page in the last 15 minutes. It avoids the issues with trying to detect when they walk away from the browser, or close it.
I did consider binding to the browsers onclose event and hitting a /user/closed/browser url. I have used that before in a call center website to unlock the call. But really the 15 minute rule was "good enough".
I coded it by keeping an in memory dictionary that I persisted to db every 5 minutes. Sorry I have no code to provide.

Is it possible to limit user to use only one page on website per time

we have some application that this is vital to prevent users from opening multiple tabs/windows per session on the website ?
Edit:
The reason is that those pages communicate with flash and we cannot know on server side whether the user has two windows open or not.
Of course you can suggest to make those changes in application design so it will use Flash Media Server as "token generator" but we cannot allow ourselves to change the infrastructure without good reason because it can take months
This is a bad idea - you are restricting how the user expects their browser to behave.
Don't do it.
The only way I could think of to reliably do such would be to have a session that kept track of a token which was updated each time a page was requested - links on the served page would all include the token, and when a page was loaded using that token, a new token would be generated (in essence, only allowing any page's links to be valid for a single use). However, this would break things like the Back button and whatnot, and thus isn't a very good solution.
What is so important that you have this requirement in the first place? Is there any way you could re-think your interface so as to avoid such?
If limiting the user to 1 interface at a time is vital to the app, you should consider writing it as a desktop application instead of a web application.

How much data can/should you store in a users session object?

We have several wizard style form applications on our website where we capture information from the user on each page and then submit to a backend process using a web service.
Unfortunately we can't submit the information in chunks during each form submission so we have to store it the users session until the end of the process and submit it all at the same time.
Is the amount of server memory/sql server disk space the only constraint on how much I can store in users sessions or is there something else I need to consider?
Edit: The site is built on ASP.NET web forms.
Assuming the information is not sensitive then you could store the information in a cookie which would reduce the amount of information required to be stored server side. This would also allow you to access the information via JavaScript.
Alternatively you could use the viewstate to store the information although this can lead to large amounts of data being sent between the server and the client and not my preferred solution.
The amount of session information you should store varies wildly depending on the application, number of expected users, server specification etc. To give a more accurate answer would require more information :)
Finally, assuming that the information collected throughout the process is not required from page to page then you could store all the information in a database table and only store the records unique id in the session. As each page is submitted the db record is updated and then on the final page all the information is retrieved and submitted. This is not an idea solution if you need to retrieve previous information on each subsequent page due to the number of db reads required.
You could also have 1 asp page with the entire html form, and hide parts of it until the user fill and "submits" the visible part...
then simply hide the part that is filled out and show the next part of the form...
This would be extremely easy in the .NET framework, use panels for each "wizard step" and add loggic when to display and hide each panel.
you will then have all the data on one page.
If you use a traditional HTTP model (i.e. don't use runat="server") you can post the data to another asp page and place the posted data into hidden form elements, you can do this for however many pages you need thus avoiding placing anything in a session variable.
Since it is problematic from performance point of view to store large amounts of data in user Session object, ASP.Net provides some other workarounds on top of what is mentioned in the posts above. ASP.NET Profile Provider allows you to persist session related information in a database. You can also use Session State Server which uses a separate server to store all Session information. Both of these situations take into account if you need to use clusters or load balancers, the servers can still recognize the session information across different servers. If you store information in the Http Session object, you run into the problem that one user must always go to the same server for that session.
Session, viewstate, database. These are all slow but will get the job done.
Hidden form fields is the answer I like best.
There are other ways to persist state. Cookies, popup window, frameset or iframes.

Resources