| Home | Forums | Reviews | Guides | Newsgroups | Register | Search |
![]() |
| Thread Tools |
| den 2005 |
|
|
|
| |
|
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
|
Do you have a recursive function in the call stack?
Joe K. "den 2005" <> wrote in message news:FA9FA296-CCB9-4352-93EF-... > 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: > aspnet_wp.exe (PID: 2212) was recycled because it was suspected to be in > a > deadlocked state. > It did not send any responses for pending requests in the last 180 > seconds. > > System Log Message: > IIS start command received from user <domain\username>. The logged data is > the status code. > > -- > MCP Year 2005, Philippines |
|
|
|
|
|||
|
|||
| Joe Kaplan \(MVP - ADSI\) |
|
|
|
| |
|
den 2005
Guest
Posts: n/a
|
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").ToStrin g()))) Then Session.Abandon() Response.Redirect("default.aspx") End If If Not (Application.Get(Session("GUID").ToString()).ToStr ing() = 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").ToS tring()), 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").ToStrin g()) 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 address>\private$\<folder name>") AppVar() ldrUserGroup = UserGroupGet() If Not (IsNothing(ldrUserGroup)) Then Do While (ldrUserGroup.Read()) Application.Add(ldrUserGroup("UserGroupCode").ToSt ring(), 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" <> wrote in message > news:FA9FA296-CCB9-4352-93EF-... > > 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: > > aspnet_wp.exe (PID: 2212) was recycled because it was suspected to be in > > a > > deadlocked state. > > It did not send any responses for pending requests in the last 180 > > seconds. > > > > System Log Message: > > IIS start command received from user <domain\username>. The logged data is > > the status code. > > > > -- > > MCP Year 2005, Philippines > > > |
|
|
|
|
|||
|
|||
| den 2005 |
|
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
|
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" <> wrote in message news:C4DD2378-70C5-40B2-9BED-... > 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").ToStrin g()))) > Then > Session.Abandon() > Response.Redirect("default.aspx") > End If > > If Not (Application.Get(Session("GUID").ToString()).ToStr ing() > = > 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").ToS tring()), 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").ToStrin g()) > 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 > address>\private$\<folder name>") > AppVar() > ldrUserGroup = UserGroupGet() > If Not (IsNothing(ldrUserGroup)) Then > Do While (ldrUserGroup.Read()) > > Application.Add(ldrUserGroup("UserGroupCode").ToSt ring(), > 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" <> wrote in message >> news:FA9FA296-CCB9-4352-93EF-... >> > 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: >> > aspnet_wp.exe (PID: 2212) was recycled because it was suspected to be >> > in >> > a >> > deadlocked state. >> > It did not send any responses for pending requests in the last 180 >> > seconds. >> > >> > System Log Message: >> > IIS start command received from user <domain\username>. The logged data >> > is >> > the status code. >> > >> > -- >> > MCP Year 2005, Philippines >> >> >> |
|
|
|
|
|||
|
|||
| Joe Kaplan \(MVP - ADSI\) |
|
den 2005
Guest
Posts: n/a
|
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" <> wrote in message > news:C4DD2378-70C5-40B2-9BED-... > > 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").ToStrin g()))) > > Then > > Session.Abandon() > > Response.Redirect("default.aspx") > > End If > > > > If Not (Application.Get(Session("GUID").ToString()).ToStr ing() > > = > > 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").ToS tring()), 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").ToStrin g()) > > 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 > > address>\private$\<folder name>") > > AppVar() > > ldrUserGroup = UserGroupGet() > > If Not (IsNothing(ldrUserGroup)) Then > > Do While (ldrUserGroup.Read()) > > > > Application.Add(ldrUserGroup("UserGroupCode").ToSt ring(), > > 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" <> wrote in message > >> news:FA9FA296-CCB9-4352-93EF-... > >> > 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: |
|
|
|
|
|||
|
|||
| den 2005 |
|
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
|
That's a pretty bizarre error. I'm glad you fixed it.
Joe K. "den 2005" <> wrote in message news:AFB1D5E7-5CF6-463C-91C1-... > 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" <> wrote in message >> news:C4DD2378-70C5-40B2-9BED-... >> > 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").ToStrin g()))) >> > Then >> > Session.Abandon() >> > Response.Redirect("default.aspx") >> > End If >> > >> > If Not >> > (Application.Get(Session("GUID").ToString()).ToStr ing() >> > = >> > 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").ToS tring()), 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").ToStrin g()) >> > 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 >> > address>\private$\<folder name>") >> > AppVar() >> > ldrUserGroup = UserGroupGet() >> > If Not (IsNothing(ldrUserGroup)) Then >> > Do While (ldrUserGroup.Read()) >> > >> > Application.Add(ldrUserGroup("UserGroupCode").ToSt ring(), >> > 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" <> wrote in message >> >> news:FA9FA296-CCB9-4352-93EF-... >> >> > 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: |
|
|
|
|
|||
|
|||
| Joe Kaplan \(MVP - ADSI\) |
|
|
|
| |
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| disable JIT debugger | Jon Paal | ASP .Net | 2 | 10-27-2006 12:28 AM |
| JIT Debugger dialog appears w/ stackoverflowexception message.. | den2005 via DotNetMonster.com | ASP .Net | 0 | 03-07-2006 08:24 AM |
| JIT Debugger error upon startup of VS 2003 | Kevin Jackson | ASP .Net | 0 | 10-21-2005 09:12 PM |
| Evil access deined JIT debugger error vs.net | ASP .Net | 0 | 05-12-2004 03:25 PM | |
| StackOverflowException | Diego Bustamante | MCSD | 1 | 02-22-2004 04:36 PM |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc..
SEO by vBSEO ©2010, Crawlability, Inc. |




