In Proc fails with ASP.Net 2.0 + VB.Net fine with C#.Net ( MS HELP ME)


I have created a web application in ASP.Net 2.0 using VB as preferred language. I am using

Session Mode as "InProc"

The default.aspx source code is below

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<html xmlns="" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
    <asp:Button ID="Button1" runat="server" Text="Button" />
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
        <asp:Button ID="Button2" runat="server" Text="Button" />
        <asp:Button ID="Button3" runat="server" Text="Button" />
        <asp:Button ID="Button4" runat="server" Text="Button" /></div>

The 4 buttons on the page have following functionality :-

Button1 - stores the value from textbox1 into session variable

 Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Session("AAA") = Me.TextBox1.Text
    End Sub

Button 2- retrieves the values from the session into TextBox2

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.TextBox2.Text = Session("AAA")
    End Sub

Button 3- Create a TMP folder under the webapplication configured as a virtual directory.

    Protected Sub Button3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim Dir As New System.IO.DirectoryInfo("C:\Inetpub\wwwroot\SessionTest1\TMP")

   End Sub

Button 4 - Delete folder.

    Protected Sub Button4_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim Dir As New System.IO.DirectoryInfo("C:\Inetpub\wwwroot\SessionTest1\TMP")
    End Sub

Once the application is configured as virtual directory, make the application run with ASP.Net 2.0.50727 runtime.

Once the basic setup is done....follow the below to reproduce.

1. Browse to the default.aspx. Enter value in textbox1. Press button1. This stores the session.

2. Press Button2. This will retrieve the value in textbox2. Then, delete the value in textbox2 using backspace key.

3. Press button3 . This will create a TMP folder under SessionTest1 directory.

4. Press button 4- this will delete the folder just created in step3

5. Press button 2 - Value is not retrieved from session variable.

I don't know as to why aspnet_wp is getting recycled. And strangely this works in C#.Net with ASP.Net 2.0

Any help!!!!!!!!!!!!!!!!!! Product team ppl help.!!!!!!!!!!!



2/14/2006 5:57:58 AM 8807 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 42

Great way to post a question!

The appdomain recycle is what is causing the session loss when you delete a subdirectory. The recycle is done to avoid serving stale content. Creating and deleting subfolders in a web app will cause it to recycle… so loss of session would be expected in that case.  To workaround this issue you could use out of process session. I am still not sure why it works in case of C# unless the folder is not getting deleted.

Review this blog which talks about this issue in detail. 

2/15/2006 4:17:40 AM


Thanks for the posting. I does help in way. But I have cross-checked and the behaviour is not same in C#.Net.

And moreover, when I tried with the same application today, the value is retrieved. Because, I had already repro'd earlier that value is I re-created another application once again configured as a virtual directory and it reproduces.

Atleast, my point is that...the behaviour should be same across different languages and at different time....any thoughts

thanks I Advance

2/15/2006 4:49:30 AM

Similar Artilces:

.Net 2.0 Web application using is unable to create object of another dll writen in C# .net 2.0
Hi, I habe created one web application using which is adding reference of dlls written in C# and .net 2.0. But whenever trying to create object of referencing dll, it is throwing error :Object reference does not set to an object. But, locally it is working fine,. In the server i have deployed the .aspx files and dll files in the bin. There were already an web.config in the server which is of .net 1.1. But checked it is retrieving value for that web.config correctly. Should i have to deply any other files and if not what can be the solution for this? Please help. Thanks, So...

Sending SMS using or using or
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

Type.GetType does not work in VB.NET but works in C#. VB.NET gurus Please help
Friends,   I am an experienced C# programmer who is working on a VB.NET project now. I am writing different methods covering the following functionalities 1) Take a datareader as input and return an arraylist of class object2) Take an xmlnode (received from a webservice) as input and return an arraylist of class object. The methods are generic methods which take datareader/xmlnode as first parameter and classname (string) as the second parameter. This way it will work trivially. The schema of class object matches with the input (datareader or xmlnode)In C# I used to do th...

converting to from offered me some sample code when I signed up with them the only problem is the sample code is in but my page that they type all of their credit card into is <code><%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <script language="C#" runat="server"> void Page_Load(Object Src, EventArgs E) { myPage.Text = readHtmlPage(""); } private String readHtmlPage(string url) { ...

use VB.NET and C#.NET code in the same C#.NET project
All-- Here is a sample that is "off the beaten path", (at least for me). Is it possible, in an ASP.NET application, using the code-behind page building technique, to have both pages written in VB.NET and pages written C#.NET?At there is a sample that shows that, (contrary to popular belief), it IS possible to mix ASP.NET pages built with C#.NET with ASP.NET pages built with VB.NET in the same VS.NET 2003 project. Note that this is just a "fun" sample to see if it can be done and I do not recommend this practice as a "standard" way of develo... 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#....

what lang does everyone prefer? Thanks, Peter Iuvara, MCP It's a very famous debatable question in forums! I would say if you are from Java/C/C++, then C# would be easy to use for you. If you are from ASP/VB, then VB.NET would be easy for you! As long as if you follow CLS, then what ever the language you use, it's going to be the same for CLR!Sreedharhttp://www.w3coder.orgweblog I would agree with that ... just curious as to what user's on this forum predominantly code in?Thanks, Peter Iuvara, MCP I came from no real programming background, started i...

vb .net or c# .net
I currently develop websites using php but have been requested to develop a site using The question I have is for someone who knows php would it be better to transition to or Thanks, Fr. Robert C# -> There is a converter that will transition about 60% or more of your PHP code to C#. Plus C# is closer to PHP than VB.NET.Jason N. GaylordASPInsider and Microsoft MVP

VB.Net To C#.Net
Hello... Since Last from 1 year i had develope web application in using now i want to transfer from to so what should i do to transform to c# language any link or book related to me through i can easily understand and coding using c# in a short time... Thanks~ Mark As Answer If UseFull ~Kaushal. Hi, you can read the specifications of the language. You're already familiar with .NET and how to program in an OO manner thanks to your experience with The only thing you need to learn is the new syntax of C#. You can also convert parts of your v...

what is new in vb net for Net 2.0 ?
where can I find an article with all what is new in vb net for Net 2.0 ? thank youangiras ????,Teemu KeiskiFinland, EU...

Can a page written in VB.Net 1.1 work with .Net 2.0 dlls?
Hi, Previously the Vb .Net page was working fine with GAC dll written .Net 1.1 . But the GAC dlls have been upgraded to 2.0 version and the page is thorowing error :"BC30002: Type 'CompanyUser' is not defined", where 'CompanyUser'is the class of the GAC dll. Can u help on this so that this page can be run without converting it to .Net 2.0? Thanks, SonaliThanks,Sonali  I think that you can set in IIS your page to run under 2.0. You do not have to upgrade site.__Please mark post as answer if it helps, if not come back and ask again! Hi, The only thin...

Where is the ADO.NET Sybase driver for .NET 1.1 and .Net 2.0?
Hi All Does anyone know where I can get the Sybase drivers for ADO.NET for both versions, 1.1 and 2.0/3.0? Cheers Chris Burrell Hi Chris, There is no release of ASE ADO.NET Provider 2.0 (I assume you refer to ASE provider, not ASA - if ASA please port to sybase.public.sqlanywhere.general). For the 1.1 Provider: It is available in the ASE SDK for windows or the PC Client CDRom included with ASE product. On the SDK its available as 12.5.1 and 15.0 On ASE PC Client I think 12.5.1 is part of ASE 12.5.X and 15.0 is part of ASE 15.X 2.0 provider should release som...

------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Web resources about - In Proc fails with ASP.Net 2.0 + VB.Net fine with C#.Net ( MS HELP ME) -

Fianna Fáil - Wikipedia, the free encyclopedia
Irish republican political party in Ireland , founded on 23 March 1926. Fianna Fáil's name is traditionally translated into English as Soldiers ...

Study: Brands On Facebook Fail To Take Advantage Of Consumers’ Attraction To Promotions
Retailers ’ Facebook page administrators may want to mix in more promotions and prepare to work some off-hours during the upcoming holiday season, ...

4th XMRV Study Fails to Confirm Association with CFS - Facebook
The CFIDS Association of America hat eine Notiz mit dem Titel 4th XMRV Study Fails to Confirm Association with CFS geschrieben. Du kannst den ...

8 Ways Restaurants Can Use Facebook Pages (and Not Fail Like Burger King)
Burger King’s marketers have been brilliant, and that includes what they’ve done on Facebook — who can forget the Whopper Sacrifice application, ...

Fail Text! (@Failtext) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

Most Wearable Devices Will Fail and the Name of the Category Will Change From Wearables to Sense-ables ...
Wearables are anything but sensible, from first hand observation they are somewhat silly, as they are trying to solve a problem that can be solved ...

Really Bad Parking Fail In Malaysia! - Flickr - Photo Sharing!
... the driver. Plus he's parking over a big X and next to a fire hydrant (which is not in this photo). Yeah, this is one of the best parking fails ...

Bangkok half-marathon’s epic fail
YOU know that feeling when it’s like you’ve been running far longer than your timer suggests?

Top 5 activewear fails
Hands up who's into this activewear thing? That would be 99.9 per cent of us then.

Qantas 737 “tailstrike” was caused by iPad data entry fail
On August 1 last year, a Boeing 737-838 (VH-VZR) operated by Qantas performed a "tailstrike" while taking off from Sydney airport. Today, the ...

Resources last updated: 11/25/2015 9:18:31 AM