Want A Certain Number Of Queries To Run Only Once Per Session, After The User Logged In?
Jan 30, 2011
I'm building a web application: some pages will be accessible by non logged-in users (demo and sign-up pages) and others will only be accessible by logged-in users (actual application). In the global.asax file, I'm currently handling the session start event by loading some variable from a query that's based on the UserID. What will happen when a non-logged in user looks at a page? I guess my question is really about how to handle the session start event when it's a logged-in user, when it's not and when a user logs in. I want a certain number of queries to run only once per session, after the user logged in.
View 2 Replies
Similar Messages:
Jul 2, 2010
My 3.5 app uses Forms Authentication. I create an authentication cookie (ticket) with an expiration date of one day. The cookie's IsPersistent is set to True. I do not use any session variables. Session timeout is the default 20 minutes.
Here's the problem:
When the session times out in 20 minutes, the user is redirected to the logon page even though the authentication cookie has not expired.
Why does this happen? I thought the session and the cookie were independent of each other.
View 3 Replies
May 12, 2010
My web application uses forms authentication. One of my users who uses IE8 says that she always stays logged into the website on her computer. This is even after she closes the browser window and restarts the computer. This only happens on her computer, if she switches computers the same thing won't happen.
I'm baffled by this. Is there a setting in IE that could save her login information and automatically sign her in every time she accesses the website? Is there anything else to look into?
View 5 Replies
Oct 27, 2010
it is possible to change dynamically the session time for currently logged user. I'm communicating with a WebService which does a long-running task, and while the it sends the final response, I don't want the user to be logged out.
View 2 Replies
Dec 26, 2010
i want to generate the new sessionid in the same httpcontext once the user is successfully authenticated.so, how can i do that ? ( please dont ask why do you want it, i got such kind of requirement).
View 3 Replies
Feb 15, 2011
've made a quiz/score system where a user will go through categories (page by page using querystring) and after submitting his/her score i redirect them to the next page where i show them their score and i also want to show "out of x number of questions".
I've made a query in my dataset:
[Code]....
I get an error about "Cannot implicitly convert type "void" to "object". This is the first time i am trying to use the SQL COUNT so i am almost certain it has something with the way i write it in my BLL, but i cannot figure out why or how to write it as it should. Hopefully you can direct me in the right path?
View 5 Replies
Dec 29, 2010
I've got the following LINQ query to my IQueryable service
Dim eventcount = EventService.QueryEvents().Count
Dim eventlist = EventService.QueryEvents().Skip((page - 1) * 5).Take(5).ToList
But I'm wondering if there's a way to do this without making two calls to the database?
View 2 Replies
Jan 7, 2010
I have a linq to sql query where I have to perform union two set of records.
And I do not have equal number of fields, so added the null
eg my psuedo code is
[code]....
after googling some hours I came to understand that it is bug in 3.5 framework.
Now I want to retrieve the result.
How do I do thatI tried framing into two seperate iqueryable
var a= first query
var b =second query
ilist result =a.union b
This too results in the same error.
View 3 Replies
Feb 22, 2010
I am accepting query/queries from user (our support team) in a text box where user can enter only one query or multiple queries. I need to display result of all queries entered in the textbox. If it is SELECT statement then result of that statement in grid which is done. If UPDATE/INSERT/DELETE then total number of rows affected which is also done but if only one UPDATE/INSERT/DELETE statement is entered in the textbox.
If user enters 2 UPDATE statements and then a SELECT statement then how can I get number of rows affected for individual UPDATE statements just like SQL Server Qury Analyzer displays messages in its result pane.
e.g.
(6 row(s) affected) -- first UPDATE statement
(4 row(s) affected) -- second UPDATE statement
(16 row(s) affected) -- for SELECT statement (grid will also be displayed along with these messages).
I tried almost everything, SqlDataSource (returns count of first statement only), SqlCommand.ExecuteNonQuery and DataAdapter.Fill (returns count of last statement only).
View 3 Replies
Mar 1, 2011
I developed a website in asp.net,c# and SQL server2000. In each and every page I want to show the logged in users name with green color text.
I used Forms authentication.
View 4 Replies
Apr 30, 2010
I've noticed a number of events being logged on our Windows server, coming from an Asp.net application. I wouldn't know where to begin troubleshooting this problem, but the basics are this:
- Windows Server 2003 Standard Edition (NLB)
- Asp.net 3.5 App
- Oracle 10g DB
Event ID: 1309
Event code: 3005
Event message: An unhandled exception has occurred.
Exception information:
Exception type: CryptographicException
Exception message: Padding is invalid and cannot be removed.
The second last line here is why I posted in the security forum. The page that it's coming from is webresource.axd
Stack trace: at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) [code]....
View 2 Replies
May 7, 2015
I want to know what the members who are online at my site and I can identify them.Do you have an article that identifies registered online users like your site.
View 1 Replies
Jan 24, 2016
I want to know hom many users that uses may website (they logged in in current time)
or how many active seesions are in my site in asp.net using C# ?
View 1 Replies
Mar 12, 2011
My environment is ASP.Net + IIS 7.0 + Windows Server 2008 + .Net 3.5. I am wondering whether the number of users online and number of active session are the same thing? The other question is, no matter whether they are the same, how to calculate them (i.e. for a given time, what is the number of users online, and related active number of sessions)?
View 1 Replies
May 7, 2015
I would like users to upload a profile picture when they register, and to then show that picture in a picture box control when they are logged in based on that specific user.
View 1 Replies
Dec 9, 2010
Hi, I want to show the sequence number for the exception (from sequence number column in ELMAH_Error table) , not the GUID to the user whenever an error occurs. is this possible? I found this post Problem passing ELMAH log id to Custom Error page in ASP.NET, but it gives the GUID, I would like to know how I can access the sequence number in Logged event of ELMAH component?
View 2 Replies
Sep 17, 2010
i have a website which has 3 modules admin part,employee part and customer part . so when the admin login he has to see the number of customers logged in and the duration etc excluding employee and admin
View 4 Replies
Nov 12, 2010
In our application, we store the most number of users online. We do this by tracking what page each user is on currently and upon login, delete users who have been inactive for X minutes and then take a count of the users online, overwriting the most number online if this is higher.
How can we change this to track the number of users online over a time period, so we can look at a line graph of the number of users online. I guess we'll need a cron to run every 1/2/5/10/20/30/60 minutes to track the number online? Then how would be store this data, the table would get very large. I would think the likes of Statcounter/Analytics would have a better way of storing this data.
View 3 Replies
Jan 7, 2011
I deployed a website where a logged user or an anonymous user can select data and download a XML file. The website generate the XML file in the server and then deliver it.
It works fine in my development environment, but after deployment, the anonymous user can download the file, but the logged user receive this error:
System.UnauthorizedAccessException: Access to the path 'd:HostsLocalUserheringerwebsiteUpload20110107094051.xml' is denied.
It is weird that as anonymous i can do it.
The website server help states this:
"Grant write, modify, delete access rights on website's folder
Your website executes under unique user account that by default has full control over the website's folder.
So your application can create, open, read, write and delete files and folders inside of your root folder.
There is no need and no way to change this permissions.
If, when running ASP.Net application, you still unable to create file or update it, you have to check your Web.Config file for "<Identity impersonate..." tag and remove it.
The only exception is when the application tries to modify a file or folder in "Application_Start" event of Global.asax file. This is by design that user authenticated only after the Application_Start even. Before the user is authenticated your website runs under an identity of Application Pool which is "Network services". That account doesn't have access to the folder of your website.
To make it work you eather have to move the code that tries to modify files or folders out of the "Application_Start" event of the Global.asax file or inside the event you'll need to impersonate your user by code."
But i am not using impersonate and the tag is not in my web.config.
View 2 Replies
Sep 22, 2010
After login, i have create a session to display the Username of the logged user, however instead of display the Username, i want to display the Full_Name of the logged user
However i have no idea how it dones...
PersonUser Table
P_ID (PK) =1
Username =lucy88
Password =88ycul
Full_Name = Lucy
User_Type =Admin
Login.aspx - as i do session, it will display lucy88 however i would like to display Full_Name which is Lucy.
View 4 Replies
Mar 4, 2010
I have the membership provider and the create user with tow steps, one of the steps contains a custom registration form, for each created user data will be in the database, and there is an account page shows the data that the new created user did insert during the registration process on the custom registration page,
the problem, when the user is created and logged into his account page, this account page shows only the information for the first created user, not the info on the logged in user , but the logged in user data still saved in database and not showing on his account page?
This is web.confg code:
<?xml version="1.0"?>
View 22 Replies
Jun 6, 2013
I have table called ROLE with fields (id,name,permission) example values (1001,madhu,hr)
I have another table called LOGIN with fields(id,DOB,password) example values(1001,24101989,madhukumar)
What i want is , if i login using the LOGIN table ,it check the id and permission in the ROLE table , if the permission is 'hr' it enable to access the menu , or if the permission is any other it just print the error message ("no permission")
Note: menu is placed in master page , but login is not in the master page ...
View 1 Replies
Jul 29, 2010
I new to .aspx and now the thing is since i am doing a web enabled project, I have this login from an user. I drag dropped the login template and then used the
Session["Authentication"] = username.Tostring();
to store the current logged user's info and so. Now i even used a hyperlink "Logout" at the top right corner and then made it transfer to Login page.
Now if on running the web , i can easily login , but when i logout through hyper link "logout" it will take me to the Login page again, but if i press the back button of the browser it again transfers the control to the data page and i can again perform the data operation's.
I used this
Session["Authenticate"] = null
at the page load of the login page so that only at the login button click the user can enter again by
Session["Authenticate"] = username.Tostring();
Then i used a check at each page load of the data pages
if(Session[Authentiacte"] == null)
Server.Tranfer("LoginPage.aspx");
View 1 Replies
May 7, 2015
I've made a membership by create user wizard. everything is good but after click on finish register button, when page redirect to index .aspx, this page thinks tht user logged in. whereas user didnt login just added to DB.here is the code:
protected void CreateUserWizard1_NextButtonClick(object sender, WizardNavigationEventArgs args)
{
try
{
Membership.CreateUser(CreateUserWizard1.UserName, CreateUserWizard1.Password, CreateUserWizard1.Email);
Response.Redirect("index.aspx");
[code]...
in index.aspx just have a login name and login status control. tht's it.
View 1 Replies
Mar 26, 2011
I created asp.net application on alumni information database.After logged in it redirects to page i wish but the problem is the page i am redirected is not holding the user logged information. it just simply showing as annonymus user.
View 5 Replies