.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

Session sharing with virtual folders

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :ASP.Net


i have two solutions, 1. user management and 2. travel management. i publish the user management solution to http://localhost/usermanagement/ and i publish the travel management to http://localhost/usermanagement/travel here i face the problem. the default home page would be http://localhost/usermanagement/default.aspx, its a windows authentication in page load, i capture the username, pass it to procedure which will fetch me his credentials on access. i store these in a session. in the home page i have link to navigate to travel page, when i try to access the sessions in travel page, its empty. i tried printing the session id in both user management and travel, both are same but the sessions created in user management are empty in travel. what would be problem here and how can i resolve this. 

View Complete Post

More Related Resource Links

asp and asp.net session sharing


What's the easiest way to share session state between asp & asp.net 2.0


Need help Session sharing


Hello frds,

I need help to share session in 6 web application.I want some sample code.

i tried several code but not able to resolve my problem.



Sharing folders under 12\logs


Hi Admins, 

I have a general question.  developer team does not have direct access to server. But they frequently need to dig logs for errors. (yes we have a test server but when switched to prod. environment, programs sometimes give errors that are need to be digged in prod)

Is it ok to "share" the folder program files\common files\microsoft shared\web server extensions\12\logs folder, so they can map the Web front End's logs folder to their computers ?

I dont really think it sounds good to make a sharing on production server like this,it is a sort of customization, I need your advices. is there a significant disadvantage that causes "don't!!" for this kind of operation?


Thanks in advance..


Sharing Session between ASP and ASP.Net


We're re-writing the majority of a Classic ASP app to ASP.Net
However, there's a 3rd party Shopping Cart that we'd like to keep, but it uses Session state to associate the logged in person with the cart, and then, the database, etc.

I've heard that SQL Server can be used to store session state and share it between ASP and ASP.Net, though I've never used it.

Can it be used in this situation ?

Where can I learn more on this type of specific situation (if possible)?

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.  

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?

Sharing Session between WebMethod and WebBrowser


 I'm building a windows form that allows the user to manipulate an object and preview their changes in a web browser. In order to avoid data access I'm serializing the object and sending it to a web method. I then deserialize it and store it in the session. This all works fine.

However, when I attempt to open a new window and access a page that uses the stored session variable I am unable to access it because my session ID is different for the web browser.

Is there a way I can share a session ID between a WebMethod and WebBrowser?

All the research I've done points to extracting the session ID from the document and assigning it to the CookieContainer of the WebMethod. Since I'm not accessing a document before navigation the document object is null. I'd like to avoid accessing a dummy page in order to obtain a session ID. Is this possible?



P.S. Since I'm calling my webmethod first, can I extract the session ID from it and assign it to the web browser?

Virtual Directory vs. Applications-4 IIS Folders-Week 15


Virtual Directories and applications are useful special folder types in IIS.  Yet it's easy to be confused between them.

Today I cover the differences between vDirs and Applications as I cover the 4 different IIS folder types.

This is week 15 of a 52 week series on various web administration related tasks. Past and future videos can be found here.

Having problems viewing on your mobile device?  Click here instead.

MS SQL Server: Disconnect Users From Database - Kill User Session

If you ever wanted to restore your database from a SQL backup file (.bak), but there are still users connected to your database, the backup operation will fail causing the error: Exclusive access could not be obtained because the database is in use.

SharePoint document migration challenges when migrating files and folders

There are several challenges when migrating documents to Microsoft SharePoint. While these challenges can be overcome, they are a real pain if the migration source, content and file systems are not SharePoint friendly.

Virtual Path Problem


 I get the following error on last line below (working on remote host): 'E:\web\sfcascom\ls_admin/uploads/images/001.JPG' is not a valid virtual path,

Note that the slashes go in different directions

I've tried a number of things but nothing seems to work. Thanks-


Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Drawing.Imaging
Imports System.Web.UI.WebControls

Imports System.Drawing.Imaging.ImageCodecInfo
Partial Class Protected_imageupload
    Inherits System.Web.UI.Page
    Private Sub btnUpload_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUpload.Click
        ' Initialize variables
        Dim sSavePath As String
        Dim sThumbExtension As String
        Dim intThumbWidth As Integer
        Dim intThumbHeight As Integer
        Dim sFilename As String = ""
        ' Set constant values
        'sSavePath = "images/"
        sSavePath = Server.MapPath("~/") + "ls_admin/uploads/images/"

        sThumbExtension = "_thumb"
        intThumbWidth = 160
        intThumbHeight = 120

        ' If file field isn?t empty
        If FilUpload.PostedFile IsNot Nothing Then
            ' Check file size (mustn?t be 0)
            Dim myFile As Http

Difference Btw Website vs Web application and Virtual directory in IIS 7


May i know what is the Differenc that they actually make in IIS7 .

Please tell me at a low level as i am still a novice in Asp.Net


Thanks in Advance.


Sharing authentication ticket between two applications


Hi all,

I have two web applications:

1. http://www.mysite.com - primary app running at the root of the web server

2. http://www.mysite.com/second_app - running in a virtual directory

At user authentication, I'm using FormsAuthenticationTicket to set up authentication cookies. Is it possible to share the same cookie for both the apps?

Any help would be much appreciated.

Many thanks!

SQL Server Session state problem.


Hi to all,

I have some things that I want to know. I am right now using a free asp.net webhosting ("somee.com"). The problem is that when I am visiting a page, there's a tendency that values stored in my session variables are lost. Therefore, it causes an error when the requested page is loaded.

1. I am thinking of using sessionState mode="SqlServer". Will it solve my problem?

Actualy Im working on it but Im having problems when connecting to the sql database.

2.  Is that a problem in the webhost?

3. Do free webhosting sites provide allow session state in the sql server?. Because ive tried it locally into my computer and error say's i should intall the ASP.NET Session State SQL Server version 2.0 or above.

Session and Application Variables


I have a web application in which i need to logout the user if he clicks the logout button or even if he closes his browser window. On Logout button click, i am doing session.Abandon(), but how to go about his browser window close.

Can anybody help with a code sample.

Is there any way to find out the reason for session expiry?


Dear All,

is there any way to find out the reason for session expiry?



Session time out earlyer with in 5 min.


In my live site session time out with in 5 min only.how can i get the default i.e 20 min time . below webconfig file give below

<?xml version="1.0"?>
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, &#xA;        System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, &#xA;        PublicKeyToken=31bf3856ad364e35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, &#xA;        System.Web.Extensions, Ver

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