.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Token login don't keep session with two applications

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :ASP.Net

Hi all,

I've two application ASP.NET (once is Mojo Portal). I can navigate from one to other using an URL token id.

To this way, by token, I create a new session and save the relative auth cookie.

But, sometimes, the asp web application don't keep the session and put me down. When this happen I can't login until the session cookies is not deleted.

Both the two application are behind an reverse proxy.

Somebody can help me?

Thank's all.

View Complete Post

More Related Resource Links

Best Practices: Fast, Scalable, and Secure Session State Management for Your Web Applications


ASP.NET provides a number of ways to maintain user state, the most powerful of which is session state. This article takes an in-depth look at designing and deploying high-performance, scalable, secure session solutions, and presents best practices for both existing and new ASP.NET session state features straight from the ASP.NET feature team.

Mike Volodarsky

MSDN Magazine September 2005

Session login sharepoint


Hi all,

Anybody knows how we can create a custom session when user login to sharepoint site (intranet)?

When a user login, I want to show some disclaimer where the user can choose yes or no.

If yes, it will create 1 session to make the disclaimer box only showed up once for every login.

Can I achieve this without using custom control?

Thank you all

Best regards,
-- Pingkan --

how to redirect user to login page if session is null

i have 2 page,1.login.aspx ---  2.welcome.aspxin my login.aspx im storing username into sesssion as below:Session["usernm"] = txtUsername.Text;in my welcome.aspx  pagein page_load event if (Session["usernm"]==null)        {            Response.Redirect("Login.aspx");        }----- here if i manulally paste the url ( http://localhost:4125/Loginado/welcome.aspx) it should go to  login.aspx for user credentialsbut its going directly to welcome.aspx  page.

When Session is Expired then login page is show how do it

When Session is Expired then login page is show how do it

The trusted login provider did not supply a token accepted by this farm

I followed the http://blogs.pointbridge.com/Blogs/nielsen_travis/Pages/Post.aspx?_ID=33  to authenticate user from ADFS 2.0 with SharePoint 2010 web Application . I got this problem not able to find the couse of it.  I have given read permission to serviceaccount and App pool acount. still I get this error.  Any suggestion is appreciated. Server Error in '/_trust' Application. -------------------------------------------------------------------------------- The trusted login provider did not supply a token accepted by this farm. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ServiceModel.FaultException: The trusted login provider did not supply a token accepted by this farm. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: [FaultException: The trusted login provider did not supply a token accepted by this farm.]    Microsoft.IdentityModel.Protocols.WSTrust.WSTrustClient.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr) +328    Microsoft.IdentityMode

Custom IP-STS - The trusted login provider did not supply a token accepted by this farm.

Similar to this thread , I am attempting to setup a Trusted Identity Provider for SharePoint 2010.  I have made it past all the errors in that thread to successfully get a token created with custom claims and have them placed in a token and successfully decrypted on the SharePoint side.  However, SharePoint doesn't like my unencrypted token. I have removed the bearer information from the token on the STS side but that didn't do anything.  I also remove the Microsoft.SharePoint.IdentityModel.SPSaml11SecurityTokenHandler and the SPPassiveIssuerNameRegistry, but still get the same error:   Exception information:     Exception type: FaultException     Exception message: The trusted login provider did not supply a token accepted by this farm.   Request information:     Request URL: http://sharepoint2010:777/_trust/default.aspx     Request path: /_trust/default.aspx     User host address: fe80::f1bd:4865:3597:c845/_trust     User:      Is authenticated: False     Authentication Type:      Thread account name: CONTOSO\administrator   Thread information:     Thread ID: 6     Thread account name: CONTOSO\administrator     Is impersonating: False     Stack trace:    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustClient.Issue(RequestSecurityToken rst, RequestSecurityTokenResponse& rstr)    at Microsoft.IdentityModel.Protocols.WSTrust.WSTrustClient.Issue(RequestS

An exception occurred when trying to issue security token: The trusted login provider did not supply

We are facing the issue after got authenticated by OpenID and forwarded back to Sharepoint, it crashed at the /_trust/ page the error "Operation is not valid due to the current state of the object." and event log shows this:   "An exception occurred when trying to issue security token: The trusted login provider did not supply a token accepted by this farm... "    

Forms Authentication shared between 2 Applications, but still getting directed to login page

my scenario is: Single Sign-on Within a Sub Domain (two virtual directories under the same sub domain)I've setup both sites using the same forms authentication info in my web.config. both sites have the same machine key's as well. I sign into site1. i click a link that directs to site2. site2 still redirects me to the login page, however on the login page I test HttpContext.Current.User.Identity.IsAuthenticated and it returns true. I also tested on site2's login page to pull the ticket's information and it's pulling everything. so it looks like SSO is working as far as sharing the authentication ticket, yet I cannot figure out why it still puts me on the login page? site 1: https://mysub.mydomain.com/site1/ link in site1 that directs to site2: site 1: https://mysub.mydomain.com/site2/mypage.aspx any ideas? appreciate any help someone could give.

Sharing the session variables between two .net applications using SQL Server Mode?

Hi, I have two different IIS applications within the same domain(let us say www.mydomain.com) , both of these applications use the same database instance(same connectionstring), now what I want is that both of applications can see each sessions variables , can SQL Server session state mode helps in this case? Did someone try that before? Is there any other way to share the session variables? Please help.  

Session time out alert box and redirect login page


Dear all,

Now I am using Form authentication for my website. 

It is something like that below. But if I left the website without using it for quite some time and when I used it back, it is redirected to the login page. 

The one I want to know is that it is because of session expire or cookies expire. And if it is session expired, I want to show the alert box and redirect to the login page. And one more thing is that if the user keeps on using the website, I want to extend the session expire time. If you do not mind, I want to have some references for this scenario. Thank you so much.


If myUser.IsValidUser(txtUserName.Text.Trim, txtPassword.Text.Trim) = True Then

how to set Session out open login page


i create a web site using frame and child when session i s out i require Login page open in browser not opend in frmae

how to set Session out open login page

Login failed for user: Reason:Token-based server access validation failed with an infrastructure err



I have installed a named instance of SQL Server 2008 R2 Enterprise 64 bit on Windows Server 2008 R2 Enterprise 64 bit. The os is running as a VM ware virtual machine.

I have created an AD security group for database engine sys admins on that machine. I added my user to that group.So for example;

domainname\machinename_SQL_DBE_SysADmins is a user with SysAdmin server role permissions. User domainname\MichaelEFF is a member of this group.

When I log onto the machine as this user and run the management studio with run as administrator I cannot log into the database engine. The log shows the error:

Login failed for user: Reason:Token-based server access validation failed with an infrastructure error

I've read many posts where the MVP says that the UAC is not passing the group membership. Is this the case? If so then how will role based access ever be possible with windows authentication? How can this be resolved?




Can I only create session on login and redirect to login from other apps if not using custom provide


I have created custom a MembershipProvider, SessionIDManager, and SessionStateStore since I need to use custom legacy sessions and logins.. When the Application is ran, it runs the GetSessionID in the SessionIDManager(which is correct)..

The problem then is if there is no session meaning the GetSessionID method returns null, it tries to create a new session using CreateSessionID.. I want it to redirect to the login application(another application)..

We only create and store session information for logged in users and the "session id numbers" come from a file that is pre-populated with "session id numbers"(I didnt design this and its out of my control).. So its not feasable to give everyone who visits the site one of the "session id" numbers..

I also need for users with an "invalid" session(when checked through Validate()) to be redirected to the login page..


Any help here would be great..

Login failed for user:Token-based server access validation failed with an infrastructure error


I would appreciate help with the following issue:


I have created a local group in our SQL 2008 server and added two Windows user accounts "DOMAIN\UserName"  I  then added the local group to the database and granted read only access.


The users are trying to link tables using MS Access using and ODBC connection and getting the following error.

Users are not system administrators.


Date                      6/30/2010 1:01:54 PM

Log                         SQ

Setting Session variables at the time of login authentication


Dear Rahul,

I am having a website in which I am setting nearly 20 Session variables at the time of login authentication. ( Ex : Name, EmpID, Dept, Location, Email...).

Can u please tell which is one of the following is the better way to get Login user details 

 1) Through session variables at the time of login 

 2) In each and every page by calling the Stored Procedure to get login user details


Regards >> HemaBhushan 


Retrieve data from SQL server based on login username (session data)



I'm trying to make a dropdown list with data available based on the users login name. Heres what I have as my SQL Query in the SQLDataSource:

SELECT Client_Name, Client_ID FROM Client WHERE (Client_Name LIKE '%@Client_Name%')

So say if the login username is "User1" but the database client name is "User1 Steel" I want the dropdownlist to pull "User1 Steel" as the display and Client_ID as the value from the dropdown list. 

I dont know how to use the session data!

Sharing Session between applications


I would like to share the session variables between 2 applications. basically I have a website and in there I have 2 applications and want to share the session object betwen the two. Is there a way to set something in web.config to enable this?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend