Re: JiT Debugger w/ StackOverflowException kept appearing
- From: den 2005 <den2005@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 7 Mar 2006 22:37:05 -0800
Hi Joe,
Thanks for the reply.
I have solved this problem. There is no recursive or inifinite loop. It
has to do with using domain account to access local web application. A
co-worker of mine found a post on dotnet247.com about this same problem as
suggested in that post change the UserName attribute of processModel tag of
Machine.config file will solved the problem and it did works.
den2005
--
MCP Year 2005, Philippines
"Joe Kaplan (MVP - ADSI)" wrote:
A recursive function is a function that calls itself. Something like:.
Sub Foo()
Foo()
End Sub
Recursive functions have a tendency to cause you to run out of stack space
if they allocate too much memory on the call stack.
Glancing through the code, I don't see any obvious recursion. However, I
didn't look that closely. You might also consider adding some logging to
see what's going on and where you are running out of stack space or just try
running the code in the debugger and see what you are doing when it blows
up.
It might also be helpful to post the full stack trace of the exception.
Joe K.
"den 2005" <den2005@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C4DD2378-70C5-40B2-9BED-1A6EE8471451@xxxxxxxxxxxxxxxx
Hi Joe,
What do you recursive function in the call stack? Not familiar with the
terms.
The default page contains 2 user controls.
Second User Control. Security.ascx
[code]
Public Sub PageValidate(ByVal sender As Object, ByVal e As
System.EventArgs)
SessionApp_Validation()
Page_Access()
End Sub
Private Sub SessionApp_Validation()
Try
If (Session("GUID") = "") Or (Session("UserName") = "") Or
(Session("UserGroupCode") = "") Then
Session.Abandon()
Response.Redirect("default.aspx")
End If
If (Session("UserGroupCode").ToString() <> "I1") And
(Session("UserGroupCode").ToString() <> "IA") And (Session("COGUID") = "")
Then
Session.Abandon()
Response.Redirect("default.aspx")
End If
If (IsNothing(Application.Get(Session("GUID").ToString())))
Then
Session.Abandon()
Response.Redirect("default.aspx")
End If
If Not (Application.Get(Session("GUID").ToString()).ToString()
=
Session.SessionID.ToString()) Then
Session.Abandon()
Response.Redirect("default.aspx")
End If
Catch exp As Exception
objHelper.LogEvent(exp, "IndustryWeb.Security")
Session.Abandon()
Response.Redirect("default.aspx")
End Try
End Sub
Private Sub Page_Access()
Dim cMotherPage As String
Dim ldsPage As New DataSet()
Dim ldrwPage As DataRow()
Try
cMotherPage = Request.ServerVariables("URL")
cMotherPage = Right(cMotherPage, Len(cMotherPage) -
Len(Application.Get("Root")))
If cMotherPage <> "default.asp" Then
ldsPage =
CType(Application.Get(Session("UserGroupCode").ToString()), DataSet)
ldrwPage = ldsPage.Tables(0).Select("FileName='" &
cMotherPage & "'") ' and Access = 'Y'")
If (Not (ldrwPage.Length > 0)) Then
Session.Abandon()
Response.Redirect("default.aspx")
End If
If Session("Suspend").ToString() And
ldrwPage(0).Item("ViewInSuspended").ToString() <> "Y" Then
Session.Abandon()
Response.Redirect("default.aspx")
End If
End If
If cMotherPage <> "ChangePromptPass.aspx" And
Session("Prompt").ToString() <> "N" Then
Response.Redirect("ChangePromptPass.aspx")
End If
If UCase(Session("UserGroupCode").ToString()) = "AU" Then
If cMotherPage <> "ChangePromptPass.aspx" And cMotherPage
<>
"User_Preference.aspx" And Session("IsAIF") And Not
(Session("HasPreference")) Then
Response.Redirect("User_Preference.aspx")
End If
End If
Catch exp As Exception
objHelper.LogEvent(exp, "IndustryWeb.Security")
End Try
End Sub
[\code]
First User Control. login.ascx
[code]
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click
End Sub
[\code]
Inside global.asax.cs
[code]
Public Class Global
Inherits System.Web.HttpApplication
Dim mobjHelper As New Helpers()
Private Const modName As String = "Application"
Public Function PageAccess(ByVal astrUserGroupCode As String) As
DataSet
Dim lobjDBHelper As New DBHelper()
Dim lobjMenuTools As New
WebMenuTools(Application.Get("Connection").ToString())
Dim ldsPage As New WebMenuDS()
Try
ldsPage = lobjMenuTools.GetMenuDS(astrUserGroupCode.ToString())
Return ldsPage
Catch exp As Exception
mobjHelper.LogEvent(exp, "IndustryWeb." & modName, True)
Finally
lobjDBHelper.Close()
ldsPage.Dispose()
End Try
End Function
Public Function UserGroupGet() As SqlDataReader
Dim lobjDBHelper As New DBHelper()
Dim ldrUserGroup As SqlDataReader
Try
With lobjDBHelper
.ConnectionString =
Application.Get("Connection").ToString()
.Open()
ldrUserGroup = .ExecuteReturnDR("sp_RFUserGroups_Get",
CommandType.StoredProcedure)
End With
Return ldrUserGroup
Catch exp As Exception
mobjHelper.LogEvent(exp, "IndustryWeb." & modName, True)
Finally
lobjDBHelper.Close()
End Try
End Function
Public Sub AppVar()
Dim lobjDBHelper As New DBHelper()
Dim ldrEntity As SqlDataReader
Try
With lobjDBHelper
.ConnectionString =
Application.Get("Connection").ToString()
.Open()
ldrEntity = .ExecuteReturnDR("sp_entity_get",
CommandType.StoredProcedure, _
.mp("@IndustryName", DbType.String, 50, ""))
End With
Do While (ldrEntity.Read())
Application.Add(ldrEntity("IndustryName").ToString(),
ldrEntity("IndustryID").ToString())
Loop
Catch exp As Exception
. . .
Finally
lobjDBHelper.Close()
End Try
End Sub
. . ..
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
Dim ldrUserGroup As SqlDataReader
Dim lobjIndustryDB As New ConnectionStrings()
Try
Application.Add("Connection",
lobjIndustryDB.Industry.ToString())
Application.Add("DocConnection",
lobjIndustryDB.Document.ToString())
Application.Add("AIFConnection", lobjIndustryDB.AIF.ToString())
Application.Add("Root", "/InsuranceWeb/")
Application.Add("BatchQueue", "FormatName:Direct=TCP:<ip
address>\private$\<folder name>")
AppVar()
ldrUserGroup = UserGroupGet()
If Not (IsNothing(ldrUserGroup)) Then
Do While (ldrUserGroup.Read())
Application.Add(ldrUserGroup("UserGroupCode").ToString(),
PageAccess(ldrUserGroup("UserGroupCode").ToString()))
Loop
ldrUserGroup.Close()
Else
End If
Catch exp As Exception
mobjHelper.LogEvent(exp, "IndustryWeb." & modName, True)
Finally
End Try
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
Dim lobjDBHelper As New DBHelper()
Try
With lobjDBHelper
.ConnectionString =
Application.Get("Connection").ToString()
.Open()
.ExecuteNonQuery("sp_Last_Login_Update",
CommandType.StoredProcedure, .mp("@GUID", DbType.Guid, 16, New
Guid(Session("GUID").ToString())))
End With
Application.Remove(Session("GUID").ToString())
Catch exp As Exception
End Try
End Sub
End Class
[\code]
Hope this makes it clearer. Thanks for the reply.
Den2005
--
MCP Year 2005, Philippines
"Joe Kaplan (MVP - ADSI)" wrote:
Do you have a recursive function in the call stack?
Joe K.
"den 2005" <den2005@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FA9FA296-CCB9-4352-93EF-94713D080344@xxxxxxxxxxxxxxxx
Hi everybody,
Do not where to put this post? So, here is my case...
Opening and login on the web page created by another person causes
the
JIT Debugger Dialog to appear with a message: An exception
'System.StackOverflowException' has occurred in ... and when you click
No,
the web page displays Server Application Unavailable. We are using
domain
accounts here. What user account to use, how to set which accounts to
use?
what rights do this account needs? I need help. Thanks in advanced.
Web Page Message:
Server Application Unavailable
Application Log Message:
- Follow-Ups:
- Re: JiT Debugger w/ StackOverflowException kept appearing
- From: Joe Kaplan \(MVP - ADSI\)
- Re: JiT Debugger w/ StackOverflowException kept appearing
- References:
- Re: JiT Debugger w/ StackOverflowException kept appearing
- From: Joe Kaplan \(MVP - ADSI\)
- Re: JiT Debugger w/ StackOverflowException kept appearing
- From: den 2005
- Re: JiT Debugger w/ StackOverflowException kept appearing
- From: Joe Kaplan \(MVP - ADSI\)
- Re: JiT Debugger w/ StackOverflowException kept appearing
- Prev by Date: Re: Relationship between IIS security and .NET AuthenticationManager
- Next by Date: Re: Relationship between IIS security and .NET AuthenticationManager
- Previous by thread: Re: JiT Debugger w/ StackOverflowException kept appearing
- Next by thread: Re: JiT Debugger w/ StackOverflowException kept appearing
- Index(es):
Relevant Pages
|