Asp.Net Session Expires Immediately?
Nov 16, 2011
My Asp.net Session Expires immediately even though i did the settings in web.config file,
<system.web>
<sessionState timeout="2880" mode="InProc" cookieless="UseCookies"></sessionState>
<customErrors mode="RemoteOnly"/>
[Code].....
i did above settings in web.config even then it expires after approx 3 minutes..
View 2 Replies
ADVERTISEMENT
Oct 28, 2009
I have user log in logic in my web app. after successful log in, i set the user id in Session, so i can keep track of the user. and in my master file page load event, i do
Session.timeout = 60
so session should timeout after an hour. but my session times out at around 10 - 20 minutes. What am i doing wrong? i bet it's obvious.
View 3 Replies
Feb 22, 2012
I'm developing web site using asp.net. In my web site after login i set session for the logged user for my web site need. and on each page i checked whether that session is null or having value and depending on the value i redirected to the login page.My issue is that after login i want to redirect to the previously browsed web page and i done it by using following way-code on the particular page for checking session value-
if (Session["EmployeeID"] != null)
{
}
else
[code]....
View 4 Replies
Feb 12, 2010
c# - redirecting to the previously browsed web page after session expires
View 2 Replies
Dec 8, 2011
I am storing a session variable that a user types into a textbox. With their valid input, their session gets created and they get a little more functionality than the regular end users of the site.I was wondering if it is possible to find a way to add someone's session variable to the end of a URL. This way we can email a link to one of our clients, they click it, and their session has automatically begun. They already have the textbox to enter their code into, but I was told that it would be much easier for the users to just click a link that will start their session.
View 1 Replies
May 28, 2009
On startup of my software which i developed in vb.net, it connects to mssql server. I want to have session id or session number of the connection with mssql. I'm sure it is unique number and i want to use this session in my software for different purposes. My question is
1. is there anything like session id or session unique number when you connection mssql server
2. if yes to 1 then how i can get it in vb
View 1 Replies
Jun 19, 2009
We plan on selling an application that I've made and we want to be able to force the user to buy a 1-year license for it. And of course after that 1-year we want the program to stop working and force the user to purchase another license.
I've seen many things in VB.NET with certificates/licensing but I'm just not familiar with them to be able to take it any further. And right now I don't have the labor to spend hours messing around with it.
View 6 Replies
Apr 27, 2009
I have a login with "Remember Me" checkbox forkeeping people logged in but I 'm not understanding the Expiration with IsPersistent values.How would I set the expiration if IsPersistent is True andif the user doesn't check the box then they should be loggedout as soon as they leave the site, How do I set the experationfor that, I'm confused as to what to do.
Code:Private Sub btnLog_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnLog.Click Dim accountSystem As Manager.CustomerDB = New Manager.CustomerDB Dim customerID As String =
[code].....
View 1 Replies
Sep 21, 2009
I have been reading up and trying to understand the difference viewstate and session and as i am only storing a database id i believe i have settled on Viewstate.
Am i right in saying that a viewstate never expires until the browser is closed? One of the issues i have with Sessions is that sometimes the people completling my websites forms can take and age to do so and the session can expire.
View 3 Replies
Aug 30, 2011
Is there a way in Visual Basic to check if the user's password is set to never expire in Active Directory? 've found a way to find the last date it was changed, but I can't find the other available options.
[Code]....
Where can I find a list of all available objUser properties?
View 4 Replies
Jan 15, 2009
I have a script that reads a form and puts some info into a cookie:
[Code]...
The time is properly set right before it redirects, but when I try to print out that value this way (I have also tried Dim oCol as HttpCookieCollection = Request.Cookies, but I get the same result):
[Code]...
View 4 Replies
Jun 21, 2010
I want to create a program that will close itself when the user was idle(not touching/moving the mouse and keyboard) for about 5 minutes...but I have a problem in how to track a user's idle time so that I could set the closing action. Could anyone give me a simple example?
View 2 Replies
Nov 13, 2010
As the the Title suggest's i want to make an alert noise, such as a simple beep, play after a timer has expired. I have the timer working, just dont know the function for making a noise?
View 3 Replies
Jan 19, 2011
I have just completed a custom banking & accounting software application for a stingy client who doesnt wants to pay-up! How do i make the application a trail version that will expire in say 30 days, and also ensure that whenever it is installed, it checks for first installation and indicate remaining trial days.
View 2 Replies
Aug 24, 2009
I have had absolutely no prior experience in any programming whatsoever. Yesterday I downloaded the visual basic 2008 express edition from Visual Basic 2008 Express Edition.
I have a small question which I am sure is very easy for somebody else to answer and I apologise in advance if this question is in the wrong section.
I wanted to make a small exe to autorun from a cd. I want to be able to hand the cd out to friends and family. So far I have achieved what I wanted with the little app. On the cd I have an exe file in a particular folder that when clicking a command button on a windows form - I would like to run this exe. At the moment I have:
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Shell("explorer.exe ..appfolderapplication.exe")
End Sub
This finds and selects the application as required, however It does not run it. Another box comes asking me "Do you want to run or save this file?" If I click run, another box comes up "The Publisher could not be verified, are you sure you want to run this application?"
what code to I need to enter or change to make this exe run immediately as if I were the same as browsing for it and double clicking on it?
View 2 Replies
Oct 4, 2010
see below program. I start a new thread x with function abc, then I do some longer task.
Why does x only start after end sub? Shouldn't it start right-away, before sleep ?
[Code]....
View 4 Replies
Sep 11, 2010
i have a datagridview with a column with comboboxes. My problem is that the changes that i am doing from comboboxes didn't occur to datagridview immediately but after the user click to another cell.
View 1 Replies
Jan 13, 2011
I have an issue with VS 2008 datagridview combobox control.
The combo box in question closes immediately after the CellValidation method that I wrote invalidates the input in the combo box cell. What I mean by closes immediately is that when the drop down arrow is left-clicked, once I remove my finger from the left clicking of the mouse instead of staying down so that the user can see the selection options the combo box just closes.
I'm currently using EditOnEnter as my EditMode style. (I've tried switching between the different option the same behavior exists). The datagridview is bound to a dataset which was created from my database in MS Sql Server 2005.
This problem exists on two different forms and occurs exactly the same way. I don't know what other settings to mention to help in the troubleshooting of this error, but please feel free to ask me any questions so that I may resolve this issue. By the way both forms use datagridviews tied to the same dataset, just different tables and table adapters.
View 4 Replies
Nov 12, 2010
Can anyone tell me how to kill a thread immediately.
I have tried MyThread.Abort, but it seems to do nothing. Someone told me it's because 'Abort' waits for the current operation to complete, but my thread will run for over 30 minutes before that happens.
View 4 Replies
Jan 25, 2012
I don't like the verbose way of adding DataRows one by one via Tbl.Rows.Add, so i've created this pseudo LINQ query that does nothing but adding rows implicitely:
Private Function GetData() As DataTable
Dim years = {"2010/2009", "2009/2008", "2008/2007", "2007/2006", "2006/2005", "2005/2004", "2004/2003"}
Dim tbl = New DataTable
tbl.Columns.Add(New DataColumn("Year"))
[code]....
As you can see i don't need the result of the query at all, it's only purpose is to iterate and call DataTable.Rows.Add. So the result is already available in the DataTable itself and not needed from the query.Admittedly this question is somewhat hyphotetical because there would not be a big difference in using f.e. ToList and normally a query's purpose is to return something.But anyway, what's the cheapest way(in terms of memory consumption, execution time) to execute a LINQ query when only the execution and not the result matters?Edit: Ok, thisquestion was a quick-shot and a chicken-and-egg problem. I wanted to reduce 20 lines of code to a single line but noticed that i need some kind of DataSource for the LINQ-Query. Therefor i've created the Array. But at this point i could have simply used a for-each loop as well to add the DataRows.
Conclusion: Use a LINQ-Query for what it's for: a query. Then this question is pointless since there is no cheapest way but only that which returns the correct result.
View 2 Replies
May 25, 2011
I have the following code running in a thread to enumerate the local machines in the active directory. This takes some time to complete (about 5-10 seconds) so if the user quits the application before the enum is complete the application takes 5-10 seconds to quit. I tried thread.abort but because it is waiting for For Each SubChildEntry In SubParentEntry.Children to complete it doesn't abort until this returns.
Dim childEntry As DirectoryEntry = Nothing
Dim ParentEntry As New DirectoryEntry
ParentEntry.Path = "WinNT:"
[code].....
View 2 Replies
Jul 15, 2010
I have an application where I provide e-mail notification that a task has been completed. The e-mail works okay except that it is not sent until the user quits the program or sends a new message. Is there a way to force the e-mail to send immediately?I'm using Visual Studio 2008 / Visual Basic
Dim ToEMail As String = email_address
Dim FromEMail As String = email_address
Dim EMailAddr As New MailAddressCollection
[code]....
View 3 Replies
May 17, 2012
I have my form checked if it's dirty when a user goes to close it. If its dirty is true, the user is asked if they would like to save the data. When they click yes, the 'save event' is called. The problem I'm having is trying to get the form to completly close after saving. At the end of the save I put in me.close(), but another form closing event is triggered. Is this the correct way to dictate having the form close immediately after saving the data or is there a better way? If it is, I must have it placed in the wrong part of my code. Immediately after the "success" dialog box is displayed, I am asked if I want to save the data again.
[Code]...
View 3 Replies
Jan 27, 2011
I have to Repositon many TextBox in a form, but when I use Refresh() to invalidate its client area, that TextBox's Text will be disappeared until I focus to that TextBox. Are there any way to make the Text appear immediately after Refresh?
View 1 Replies
Jul 27, 2009
I'm having a strange problem with the following code, I'm writing a game launcher in VB.NET:
Dim gameProcess As Process = New Process()
gameProcess.StartInfo.UseShellExecute = False
gameProcess.StartInfo.FileName = TextBox2.Text
[Code]....
I see the game running for a split second in the task manager, but it immediately closes! Does anyone know why? When I run the game from Windows, it works fine.
I've also tried with Shell, same problem.
And I've tried with cmd.exe and the /C argument, same problem (note that when I type cmd.exe /C path_to_game_exe in the Windows Run Dialog, the game also starts fine), it's only when I launch it from the VB.NET app that it gives problems.
View 3 Replies
Jan 19, 2010
I am trying to end a program immediately when a critical exception is caught. But I am finding that code after my Try/Catch block is executing even though the code withing the Catch block is executing, and that Catch code is calling Me.Close.
I suspect it has something to do with background .net threads or something, but I have no clue how to deal with those kinds of issues. How can I stop the program as quickly as possible? If code after my Catch executes, it will (and does) throw lots of uncaught exceptions later. Currently, it is not feasible for me to try to catch all the other exceptions. I just want to report an error and end the program.In my form load routine, I create and set up a number of objects and arrays by calling various subroutines.The success of most of the subroutines depends on the sucess of three subs in particular, which are called early on. If one of those three fails, there will undoubtedly be a number of hard to trap exceptions later on in the load routine.
[Code]...
View 2 Replies
Sep 20, 2011
I have an OleDBDataAdapter which I am using to communicating with an Access database. I have generated a SELECT command with parameters, and used this to generate a DataSet.I have then used the OleDbCommandBuilder to generate the UPDATE and INSERT commands. I can use this successfully to fetch data and then update it.
Next I have created a I have a DataRow using DataSet.Tables.NewRow which I have populated.I have then used my DataAdapter to insert this record.This works just find. I would like to now update this DataRow.Can I refresh this DataRow so that it populates the fields such as the autonumber field and the automatically populated timestamp? I could select it again but I don't know the autonumber. Is there not some way that I can get the existing DataRow to synchronise with the new row?
View 5 Replies
Sep 9, 2011
I have the most puzzling problem with VS2008 in regards to debugging my programs. Until recently I have been coding in VS2010 but due to some other system requirements with my work issued PC I have moved back to VS2008.All apps I developed in VS2010 always have and continue to debug as expected. However, any app I write in VS 2008 and try to debug, the application immediately ends before the first form is loaded. Again, if I run the same code in VS2010 I have no problems. I did notice the other day that if I debug without being connected to my corporate network, I can debug in VS2008 just fine.
View 7 Replies
Jul 25, 2011
I've deployed an application inside a corporate network and I want the update process to require less attention from users. Giving them a choice to update is not a porogative.I've written code to detect when new updates are available automatically rather than letting ClickOnce check on application start. I'm wondering if its necessary to restart the app after the update has completed. Currently I invoke at the end of my update script:Application.Restart()
But what if (to make the update process more transparent for the user), I performed a 'silent' update in the background on a separate thread, and then displayed an icon prompting the user to restart the app to apply the changes? Would it work this way?
Furthermore, if I ran my custom InstallUpdate() process on a timer, say every 2 hours, would ClickOnce be happy to continue to update for every new version that was released even thought the user has not restarted (and I'm expecting the updates only to apply once the user restarts the app)?
View 2 Replies
Nov 20, 2009
As part of a user interface I'm designing, I'd like the user to encounter the following: when the user wants to edit a value in a cell, the cell in the DataGridView is replaced by a DataGridViewComboBoxCell. This is working now, however, when the user enters the cell (edit cell) the edit cursor stays there, and the combobox won't show. When the user leaves the cell, the Combobox shows, and after again entering the cell and clicking on the combobox, the dropdown finally shows. So 6 clicks are necessary, and I'd like to reduce this to a maximum of two clicks.
Using VB.Net on Visual Studio 2008, with .net 3.5
This is my code:
Public Class Functions:
Public Sub ComboBox(ByVal source As System.Windows.Forms.BindingSource, ByVal MainView As System.Windows.Forms.DataGridView, ByVal valuemember As String, ByVal displaymember As String, ByVal row As Integer, ByVal column As Integer)
[Code]....
View 1 Replies