Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2008, 07:04 AM
Authorized User
 
Join Date: Apr 2008
Posts: 85
Thanks: 10
Thanked 0 Times in 0 Posts
Default Multiple user's cannot access the application

Hi All,

 I have created web application using vb.net and deployed on the windows 2003 server. what is happening that multiple user cannot

 access the application means when one user access the page and he is doing some processing on the application

 like want to retrieve the user details and at the same time when another user try to access the application for some other

 processing then first user's processing gets stop.

 and it is giving error message :

 'Thread Abort Exception: Thread was being aborted'


 can u tell me what is the problem its a application state problem or session state problem or some other problem.

 i am not able to find the problem.

 any help will be very much greatefull.

 Thanks

 -joseph
 
Old July 10th, 2008, 07:18 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

It is impossible to say without seeing at least some of your code. Depending on the size of your code and how you are doing things this might be impossible to track down via a forum such as this unless you at least have some idea of which particular bit of code is causing the problem.

/- Sam Judson : Wrox Technical Editor -/
 
Old July 10th, 2008, 07:51 AM
Authorized User
 
Join Date: Apr 2008
Posts: 85
Thanks: 10
Thanked 0 Times in 0 Posts
Default

Thanks For your reply .

Below is the code :

Code of which First user accessing the Page :

Imports System.IO
Imports System.Threading
Imports System.Data
Imports System.Data.SqlClient
Imports System.Data.OleDb


Namespace data

Partial Class Proces****traction
    Inherits System.Web.UI.Page

Shared objThread As System.Threading.Thread

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            If Not IsPostBack Then

                Dim sUserID As String = Request.ServerVariables("LOGON_USER").Substring(Re quest.ServerVariables("LOGON_USER").IndexOf("\") + 1)

          objThread = New System.Threading.Thread(AddressOf _startThread)

                    setRefresh("30", 2)
                    startMetaThread()

            End If
    End Sub

Public Sub startMetaThread()

        objThread.Start()
End Sub

Private Sub _startThread()

// Here i m doing all the processing of Retreiving data from database

End sub

// In this method i m refreshing the page.
Private Sub setRefresh(ByVal sSeconds As String, ByVal nIndex As Integer)

            Response.AppendHeader("Refresh", sSeconds & "; URL=dmProces****traction.aspx?sessionid=" & Me.lblSession.Text)
End Sub

End Class

End Namespace


Code of which Second user accessing the Page :

Imports System.IO
Imports System.Data.OleDb
Imports System.Xml
Imports System.Xml.XPath


Namespace dataXS


Partial Class DATAXSMain
    Inherits System.Web.UI.Page

 Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
            InitializeComponent()

            Session("LICENCE") = "1"
        Me.lblFrameControl.Text = "<iframe scrolling=""" & "yes" & """ frameborder=""" & "0" & """ src=""" & "dmDataExtraction.aspx" & """ id=""" & "myIframe" & """ runat=""" & "server" & """></iframe>"

 End Sub

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim sUserID As String = Request.ServerVariables("LOGON_USER").Substring(Re quest.ServerVariables("LOGON_USER").IndexOf("\") + 1)

    // Here I am doing the processing of Data Retrieving from database

End Sub




 
Old July 10th, 2008, 08:13 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Avoid starting threads in web pages at all costs.

Once you reload that first page you will be in a whole lot of hurt. The objThread variable will NEVER be set and will always be null.

When you say you are 'retrieving' the data what are you then doing with it? If you are trying to display it to the user its never going to happen.

/- Sam Judson : Wrox Technical Editor -/
 
Old July 21st, 2008, 02:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 217
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to mega
Default

I fail to see what you're doing with the threads. Looks to me like everyone is using the same thread and in which assigning user ids doesn't make sense. Or maybe I'm just seeing it wrong...

 - mega
Moving to C# .NET





Similar Threads
Thread Thread Starter Forum Replies Last Post
.Net Application with Multiple Database vgsgowrisankar C# 2005 4 April 8th, 2008 11:20 AM
Programmatically Access user's ASPNETDB E-Mail? SeanKilleen ASP.NET 2.0 Basics 5 July 19th, 2007 02:00 PM
Multiple forms in one application lily611 General .NET 12 December 27th, 2006 08:21 AM
Single or Multiple application. Gibs_poovath General .NET 7 May 25th, 2004 07:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.