Session State in VS.Net - Please Help !


I have an ASP background with very little VB. I'm trying to integrate a transactional app into DotNetNuke. The trans app uses session state to verify userid. I dont want to change all the code in the trans. app so I thought updating the following code to include Session("UID") = userId in signin.ascs.vb would do the trick but it doesnt appear to be storing the userid into state. Does anyone know what the problem might be ?
If blnLogin Then
' Attempt to Validate User Credentials
Dim userId As Integer = objSecurity.UserLogin(txtUsername.Text, txtPassword.Text, _portalSettings.PortalId)
Session("UID") = userId
If userId >= 0 Then
' Use security system to set the UserID within a client-side Cookie
FormsAuthentication.SetAuthCookie(userId.ToString(), chkCookie.Checked)
' Redirect browser back to home page
Response.Redirect(Request.RawUrl, True)
lblMessage.Text = "Login Failed"
End If
End If
12/19/2003 12:34:11 PM 8807 articles. 0 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 23
Get it on Google Play
Get it on Apple App Store


Similar Artilces:

session vs caching vs control state vs view state
difference between session and cache and view state and control state which is used at what time and for what purpose exactly Hi,this article explains it the best: ASP.NET: Nine Options for Managing Persistent User State in Your ASP.NET Application.Grz, Kris.  Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons.... vs vs
just out of curiousity which looks, acts most like java? i'm still learning trying to used to but it seems that it was easier to do some stuff with java. C# is Java++ in my opinion. If you have done C or Jave you will prefer C#.Mike Schellenberger - MCAD If you are looking for language similar to java go for J#. However most code samples you find on the net will be in VB.NET and C#....

Can I install and use my VS.NET 2002 MSDN Help in VS.NET 2003?
Hi! I would like to know if I could install MSDN help from VS.NET 2002 (Architect) for VS.NET 2003 (Architect). Thanks! :)...

VS.NET 2005 vs VS.NET 2003
I have used VS.NET 2003 extensively and exploited all features like drag and drop functions for creating components, drag and drop data access components...For example VS.NET 2003 allows creating sqldataadapter for table mapping , stored proc parameters mappings etc..We can drag pretty much any object on component designer....Not it seems like all that gone...VS.NET 2005, there is no way we can drag the typed dataset, sqldata adapter, sqlcommand on forms designer . There is no concept of component. There is no component designer any more....Biggest flaw i found is sqldatasource and...

Session State vs Profile State Which is Better?
  I have a site where everyone must log in, and each user can only see data that they are authorized to see. Currently, I'm storing several key items (UserID, DisplayName, etc.) in Session state to make them easy to access across the entire site. I have a few questions: Is there any problem with using Session state? Some people say the IIS server is restarted often for reliability. Not sure this is true, but it would cause a problem for anyone on the site when the restart happens. I believe using Profiles will hit the DB every time I use a Profile variable. Is this corr...

State Management; .Net Profiler
Here is the situation with the customized profiler. I got a profiler class called SSOProfileProvider inheriting from ProfileProvider. I've implemented the Initilization, GetPropertyValues and SetPropertyValues. The Get... and Set.. are making a call to the database to store profile into the database. This class has been stored in the separate DLL called "Security.DLL" and there is a web site that is using this dll. The web.Config for this website is as follow:<profile enabled="true" inherits="AppProfileBase" defaultProvider="SSO" automat...

session state management help
If im storing sessions as 'session.contents("mysession") = "this is the text in my session" And i want to change the length of time before it timesout, is this a custom session? how would i set the timeout in the web.config file?i dont know what providers to use, i want it to be about an hour, so timeout="60"can anyone help?thanks Hi Friend, Here is the option to set the session time out.. 1. In Web.config like..            <sessionState mode="InProc" timeout="60" cookieless=...

VS.NET 2005 vs VS.NET 2003 #2
why there is no datagrid anymore when i drag the tables in design view? it's the gridview,and where is the data adapter. How will i connect the tables now? Here are a couple videos on the new Data model in VS2005.  I think you will find it much easier to use.  I have watch the first one, but the second is by Fritz Onion.  I think there is an Advanced Data Binding Video in the same series done by him as well. ASP.NET HOW DO I Video Series: Data MSDN Webcast: Essential ASP.NET for the Web Developer (Part 5 of 15): Introduction to Data Binding (Level 200) Hope this helpsTh...

Vs.Net 2002 and Vs.Net 2003
Hello: I've one question that keeps messing with my head, I want to know if you have: 1. VS.Net 2002 with Framework 1.0 and 1.1 in the same PC, which Framework it compiles apps for? 2. VS.Net 2003 with Framework 1.0 and 1.1 in the same PC, which Framework it compiles apps for? Is it possible to have an app compiled for framework 1.0 that uses DLLs or assemblies compiled for framework 1.1???? and still work ok?? thanks a lot....

Session & State Type in .net
hi.. friends 1) how many session type are define in .net. 2) how many state type are define in .net. as soon as possible with e.g. thx, Regards, Tushar Poshiya Hello Tushar, I'm not sure if I understand your question.  The Session object acts as a collection of objects so you can put as many objects of whatever type you want into the Session object. IIS handles all of the backend for the Session for you.  you can however, set the sessionState if you want to tell IIS how to persist the data that it is given.  This can be particularly useful on a web farm...

VS.NET 2003 to VS.Net 2005
Hi   I just converetd my VS.Net 2003 project to VS.NET 2005 using the convert wizard in Visual Studio 2005 Web Application Project. It compiled with no build errors and a few warnings. When Iam trying to view the project, then it gives me 404 error. Can someone help ? Thanks Could you confirm you are using WAP (Web Application Projects) versus the built-in WSP (Web Site model)? If you have a project file after converting, then you are using WAP. Could you post the actual 404 error you got? Also, did you set your start page in the converted project?  -Mike-...

Session vs Cookie State management
 I have always been confused by this, even when I use PHP. Session & Cookies are two most common State management techniques.Sessions last until browser is closed, and Cookies persist beyond that. All that's fine.But I have also heard of permanent vs temporary cookies. And I have also read that a browser not set to accept cookies at all, cannot be tracked using sessions. All this has led me to conclude that temporary cookies are managed in memory & are the way sessions are managed. When the browser is closed, in memory-cookies are lost, and thus the sessions is over.And cook...

Sharing session state in .net 2.0
What is the best way to share Session between web apps in a .net 2.0 environment?...

VS.NET 2003 and VS.NET 2005 on same machine
I've seen some postings indicating that you can have VS.NET 2003 and VS.NET 2005 side by side on the same machine.  I've also seen some comments that if doing this there is something that gets messed up, but I can't locate what it is and what the solution might be. Can someone shed some light on this for me regarding what might get messed up and where I can find the fixes to it? Thanks, Ira  Ira Richard Smith I have this set up. no prob at ROCKS! Same here along with VS.Net 2002 & VS 6.0 I'm running 2003 and 2005 on wi...

VS.NET 2008 next to VS.NET 2005
I have VS.NET 2005 on my PC and want to test VS.NET 2008 Beta 2. Can I install it next to VS.NET 2005?Johan TheunissenMCPD, MCSE, MCTS BizTalk 2006==============================Please mark the most helpful reply/replies as "Answer".  Yes you can have both VS 2008 and VS 2005 on your same machine.  Please note installing the dot net framework 3.5 will install service pack 1 for .net framework 2.0 and 3.0. TipsSpace Coast .Net User Group Does the installation give ...

Web resources about - Session State in VS.Net - Please Help ! -

Joint session of the United States Congress - Wikipedia, the free encyclopedia
Joint sessions of the United States Congress are the gatherings together of both houses of the United States Congress (the House of Representatives ...

Houston schools in session in spite of threatening email -
Houston ISD is sending parents across the school district automated phone calls, notifying them of a threat it received.

Q&A Session with ASUS at CES 2016: 10 Years of the Republic of Gamers
As part of our coverage of CES 2016 a few short weeks away, we have teamed up with ASUS for a round-table into their Republic of Gamers (ROG) ...

"LOYALTY HAS BEEN REPAID WITH BETRAYAL" Jeff Sessions Slams Paul Ryan for Mocking American Workers
By Julia Hahn While members of House Freedom Caucus are giving Rep. Paul Ryan (R-WI) a public pass on the omnibus, populist thought leader Sen. ...

Sen. Jeff Sessions: Omnibus a ‘Betrayal’, Increases Foreign Workers, Fully Funds Obama Immigration Agenda ...
Sen. Jeff Sessions (R-AL) slammed the immigration implications of the year-end spending bill Wednesday.

Mass shootings a major topic of Obama’s question and answer session - Videos - CBS News
President Obama wrapped up business at the White House with a wide ranging question and answer session in the briefing room yesterday before ...

Now THAT'S a successful training session!
It's a couple decades back, and this pilot fish is the lucky winner of a half-day training class at a local computer education center. "I decided ...

Sessions Teams Up With Florida’s Democratic Senator To Fix H-1Bs
Sessions Teams Up With Florida’s Democratic Senator To Fix H-1Bs

Dallas Mavericks: Rick Carlisle on team's extended film session following Atlanta loss: 'Our untimely ...
The Mavericks had an extended film session on Thursday to go over what went wrong in the 98-95 loss to Atlanta on Wednesday.It was a laundry ...

Droid Life Q&A Sessions: Volume 35
It may be dead right now, but come January, there will be a whole lot happening in the Android world. With CES kicking off in early January, ...

Resources last updated: 12/23/2015 9:53:58 PM