We have an application in Silverlight / wfc service and dot net 2008. While running this application from any windows7 pc showing stack overlow exception where as from windows xp pc it is working fine. Exception is coming not a particular section , it is
varing different section of this application time to time.. Please anyone suggest us the solution. we have checked there was enough memory in pc.
it is varing different section of this application time to time
Is it occuring every time or only in specific circumstances? If so then you'll need to search for the trigger which makes it occur. Without seeing code or some working and debugging this is going to be very hard to pinpoint and optimize it.
My advice: narrow down the phenomenon to its basics and see which code always pops up where the exception occurs. Come back with that particular part of the code and which conditions makes it go berserk. Perhaps we might be able to help out then.
Grz, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
Error is not coming from a specific function. It has been coming from different part of dirrerent function.
This application have more than 10 dlls. If the dlls are in release mode then sometimes error is not occuring.(out of 10 cases 2 cases are succeded). But those dll are in debug mode then creating problem every time.
as I told you, try to narrow down to which part of the code or dll it goes back to. If it's a third party dll then replace it with an updated version if possible. Without clear information it's rather impossible to help you on a public forum.
Grz, Kris.
Read my blog | Twitter Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
I am giving one function , error may comming from any line of this function but not all time..
Public Function GetCalculatedPremium_Remote(ByVal strLVUserID As String, ByVal objLVUserData As UserData_ZeroLogicFire_ABC,ByVal StrLVUserDataNeeded As String,ByVal objLVGeneralServiceAppData As GeneralServiceAppData ) As ServiceResult
Dim objLVServiceResult As ServiceResult
Dim strMethodExep As String = ""
Try
objLVServiceResult = AssignDataForPremCalc(strLVUserID, objLVUserData,StrLVUserDataNeeded,objLVGeneralServiceAppData)
If objLVServiceResult.ErrorText <> "" Then
TrackMethodCallParams("GetCalculatedPremium_Remote", objLVGeneralServiceAppData, "User Data: " & "[Object]", "User Data Needed: " & strLVUserDataNeeded, "General Service Application Data: " & "[Object]" )
TrackMethodCallError("GetCalculatedPremium_Remote", "WCF", objLVServiceResult.ErrorText, "")
strMethodExep = objLVServiceResult.ErrorText
End If
Catch ex As Exception
TrackMethodCallParams("GetCalculatedPremium_Remote", objLVGeneralServiceAppData, "User Data: " & "[Object]", "User Data Needed: " & strLVUserDataNeeded, "General Service Application Data: " & "[Object]" )
TrackMethodException("GetCalculatedPremium_Remote", ex, strMethodExep)
Finally
Dim bHasErrors As Boolean = (strMethodExep <> "")
LogServiceTransaction("WCF", "GetCalculatedPremium_Remote", strLVUserID, ServiceAuthToken, Not bHasErrors, "", strMethodExep)
If bHasErrors Then
objLVServiceResult = New ServiceResult
objLVServiceResult.ErrorText = strMethodExep
End If
End Try
Return objLVServiceResult
End Function
*********************************************
Private Function AssignDataForPremCalc(ByVal strLVUserID As String, ByVal objLVUserData As UserData_ZeroLogicFire_ABC,ByVal strLVUserDataNeeded As String,ByVal objLVGeneralServiceAppData As GeneralServiceAppData) As ServiceResult
strCVModeOfOperation = "NEWPOLICY"
Dim IntLVProdRisk As Integer
IntLVProdRisk = 0
Dim IntLVUserRisk As Integer
If IsNothing(objLVUserData.PropRisks_Col) Then
IntLVUserRisk = 0
Else
IntLVUserRisk = objLVUserData.PropRisks_Col.Length
End If
If IntLVUserRisk > 3 Then
IntLVProdRisk = IntLVUserRisk - 3
Else
IntLVProdRisk = 0
End If
Dim LDRetValue As String
Dim strLVLDQry As String
Dim objLVLD1Tbl As DataTable = Nothing
Dim objLVLD2Tbl As DataTable = Nothing
Dim objLVLD3Tbl As DataTable = Nothing
Dim objLVLD4Tbl As DataTable = Nothing
Dim boolLVLD1Loaded As Boolean = False
Dim boolLVLD2Loaded As Boolean = False
Dim boolLVLD3Loaded As Boolean = False
Dim boolLVLD4Loaded As Boolean = False
ObjLVGeneralServiceAppData.SaveAsQuote = ObjLVGeneralServiceAppData.RenewalNotice
Dim boolLVValidationReq As Boolean = True
Dim objLVHTExtraParams As New Hashtable
Dim boolLVDefaultCover As Boolean = False
objLVHTExtraParams.Add("SaveAsQuote", objLVGeneralServiceAppData.SaveAsQuote)
objLVHTExtraParams.Add("EndorsementSubType", objLVGeneralServiceAppData.EndorsementSubType)
objLVHTExtraParams.Add("ContextSourceType", "WCF")
objLVHTExtraParams.Add("IsProcessFlowTransaction", objLVGeneralServiceAppData.IsProcessFlowTransaction)
Dim objLVResult As New ServiceResult
Dim objLVProductNode As New Object
Dim objLVUnitDefinition As New UnitDefinition.UdTypes(Format(Now, "dd/MM/yyyy"))
Dim objLVGbl As New LOGON.Globalvariables
Dim strLVPseudoProductIndex As String = ""
objLVGbl.AppUserID = strLVUserID
objLVGbl.AppUserType = objLVLogin.chkUType(strLVUserID)
objLVGbl.userGroup = objLVLogin.GetUserTemplateRole(strLVUserID)
objLVGbl.UserCode = GetUserCode(strLVUserID)
objLVGbl.Product_Code = 5561
If Not IsNothing(objLVGeneralServiceAppData.UserRole) Then
If objLVGeneralServiceAppData.UserRole.Trim.Length <> 0 Then
objLVGbl.UserRole = objLVGeneralServiceAppData.UserRole.Trim
Else
objLVGbl.UserRole = objLVLogin.GetUserRole(strLVUserID)
End If
Else
objLVGbl.UserRole = objLVLogin.GetUserRole(strLVUserID)
End If
Dim FP As System.IFormatProvider
Dim assbly As System.Reflection.Assembly
assbly = System.Reflection.Assembly.Load("ZeroLogicFire.ABC")
Dim mytype As Type
mytype = assbly.GetType("ZeroLogicFire.ABC.ZeroLogicFire.ABC.C_N084231")
If IsNothing(mytype) Then
mytype = assbly.GetType("ZeroLogicFire.ABC.C_N084231")
End If
Dim objWFlowRuntime As System.Workflow.Runtime.WorkflowRuntime
Dim manualService As System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService
Dim objdataobject As New DataObjectClass
Dim constructor As System.Reflection.ConstructorInfo
Dim ObjLVDataTable As DataTable
Dim objLVLDDoc As New DataObjectClass
Dim qrystr1 As String
Dim objLVArrListReference As New ArrayList
Try
objLVUnitDefinition.GetAllUnits()
If objLVGeneralServiceAppData.ProductCode <> "" Then
qrystr1 = "Select PRODINDEX from INS.UW_INDEX_CODE_MAP A WHERE A.PRODCODE='" & objLVGeneralServiceAppData.ProductCode & "'"
ObjLVDataTable = objdataobject.getSQLDataTable(qrystr1)
If Not IsNothing(ObjLVDataTable) Then
If ObjLVDataTable.Rows.Count > 0 Then
objLVGbl.Product_Code = objLVGeneralServiceAppData.ProductCode
strLVPseudoProductIndex = ObjLVDataTable.Rows(0).Item(0)
End If
End If
End If
Dim args(21) As Object
args(0) = DateTime.Today.ToString("dd/MM/yyyy")
args(1) = Nothing
args(2) = objLVUnitDefinition
args(3) = Nothing
args(4) = strLVUserID
args(5) = "N084231"
sujitd
0 Points
4 Posts
Stack overflow exception in windows 7 pc
Jan 01, 2013 04:12 AM|LINK
We have an application in Silverlight / wfc service and dot net 2008. While running this application from any windows7 pc showing stack overlow exception where as from windows xp pc it is working fine. Exception is coming not a particular section , it is varing different section of this application time to time.. Please anyone suggest us the solution. we have checked there was enough memory in pc.
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: Stack overflow exception in windows 7 pc
Jan 01, 2013 08:26 AM|LINK
Hi,
is the exception occuring in the WCF part?
Is it occuring every time or only in specific circumstances? If so then you'll need to search for the trigger which makes it occur. Without seeing code or some working and debugging this is going to be very hard to pinpoint and optimize it.
My advice: narrow down the phenomenon to its basics and see which code always pops up where the exception occurs. Come back with that particular part of the code and which conditions makes it go berserk. Perhaps we might be able to help out then.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
sujitd
0 Points
4 Posts
Re: Stack overflow exception in windows 7 pc
Jan 01, 2013 09:06 AM|LINK
Yes , error is coming from WCF part.
Error is not coming from a specific function. It has been coming from different part of dirrerent function.
This application have more than 10 dlls. If the dlls are in release mode then sometimes error is not occuring.(out of 10 cases 2 cases are succeded). But those dll are in debug mode then creating problem every time.
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: Stack overflow exception in windows 7 pc
Jan 01, 2013 09:09 AM|LINK
Hi,
as I told you, try to narrow down to which part of the code or dll it goes back to. If it's a third party dll then replace it with an updated version if possible. Without clear information it's rather impossible to help you on a public forum.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
sujitd
0 Points
4 Posts
Re: Stack overflow exception in windows 7 pc
Jan 01, 2013 09:24 AM|LINK
I am giving one function , error may comming from any line of this function but not all time..
Public Function GetCalculatedPremium_Remote(ByVal strLVUserID As String, ByVal objLVUserData As UserData_ZeroLogicFire_ABC,ByVal StrLVUserDataNeeded As String,ByVal objLVGeneralServiceAppData As GeneralServiceAppData ) As ServiceResult
Dim objLVServiceResult As ServiceResult
Dim strMethodExep As String = ""
Try
objLVServiceResult = AssignDataForPremCalc(strLVUserID, objLVUserData,StrLVUserDataNeeded,objLVGeneralServiceAppData)
If objLVServiceResult.ErrorText <> "" Then
TrackMethodCallParams("GetCalculatedPremium_Remote", objLVGeneralServiceAppData, "User Data: " & "[Object]", "User Data Needed: " & strLVUserDataNeeded, "General Service Application Data: " & "[Object]" )
TrackMethodCallError("GetCalculatedPremium_Remote", "WCF", objLVServiceResult.ErrorText, "")
strMethodExep = objLVServiceResult.ErrorText
End If
Catch ex As Exception
TrackMethodCallParams("GetCalculatedPremium_Remote", objLVGeneralServiceAppData, "User Data: " & "[Object]", "User Data Needed: " & strLVUserDataNeeded, "General Service Application Data: " & "[Object]" )
TrackMethodException("GetCalculatedPremium_Remote", ex, strMethodExep)
Finally
Dim bHasErrors As Boolean = (strMethodExep <> "")
LogServiceTransaction("WCF", "GetCalculatedPremium_Remote", strLVUserID, ServiceAuthToken, Not bHasErrors, "", strMethodExep)
If bHasErrors Then
objLVServiceResult = New ServiceResult
objLVServiceResult.ErrorText = strMethodExep
End If
End Try
Return objLVServiceResult
End Function
*********************************************
Private Function AssignDataForPremCalc(ByVal strLVUserID As String, ByVal objLVUserData As UserData_ZeroLogicFire_ABC,ByVal strLVUserDataNeeded As String,ByVal objLVGeneralServiceAppData As GeneralServiceAppData) As ServiceResult
strCVModeOfOperation = "NEWPOLICY"
Dim IntLVProdRisk As Integer
IntLVProdRisk = 0
Dim IntLVUserRisk As Integer
If IsNothing(objLVUserData.PropRisks_Col) Then
IntLVUserRisk = 0
Else
IntLVUserRisk = objLVUserData.PropRisks_Col.Length
End If
If IntLVUserRisk > 3 Then
IntLVProdRisk = IntLVUserRisk - 3
Else
IntLVProdRisk = 0
End If
Dim LDRetValue As String
Dim strLVLDQry As String
Dim objLVLD1Tbl As DataTable = Nothing
Dim objLVLD2Tbl As DataTable = Nothing
Dim objLVLD3Tbl As DataTable = Nothing
Dim objLVLD4Tbl As DataTable = Nothing
Dim boolLVLD1Loaded As Boolean = False
Dim boolLVLD2Loaded As Boolean = False
Dim boolLVLD3Loaded As Boolean = False
Dim boolLVLD4Loaded As Boolean = False
ObjLVGeneralServiceAppData.SaveAsQuote = ObjLVGeneralServiceAppData.RenewalNotice
Dim boolLVValidationReq As Boolean = True
Dim objLVHTExtraParams As New Hashtable
Dim boolLVDefaultCover As Boolean = False
objLVHTExtraParams.Add("SaveAsQuote", objLVGeneralServiceAppData.SaveAsQuote)
objLVHTExtraParams.Add("EndorsementSubType", objLVGeneralServiceAppData.EndorsementSubType)
objLVHTExtraParams.Add("ContextSourceType", "WCF")
objLVHTExtraParams.Add("IsProcessFlowTransaction", objLVGeneralServiceAppData.IsProcessFlowTransaction)
Dim objLVResult As New ServiceResult
Dim objLVProductNode As New Object
Dim objLVUnitDefinition As New UnitDefinition.UdTypes(Format(Now, "dd/MM/yyyy"))
Dim objLVGbl As New LOGON.Globalvariables
Dim strLVPseudoProductIndex As String = ""
objLVGbl.AppUserID = strLVUserID
objLVGbl.AppUserType = objLVLogin.chkUType(strLVUserID)
objLVGbl.userGroup = objLVLogin.GetUserTemplateRole(strLVUserID)
objLVGbl.UserCode = GetUserCode(strLVUserID)
objLVGbl.Product_Code = 5561
If Not IsNothing(objLVGeneralServiceAppData.UserRole) Then
If objLVGeneralServiceAppData.UserRole.Trim.Length <> 0 Then
objLVGbl.UserRole = objLVGeneralServiceAppData.UserRole.Trim
Else
objLVGbl.UserRole = objLVLogin.GetUserRole(strLVUserID)
End If
Else
objLVGbl.UserRole = objLVLogin.GetUserRole(strLVUserID)
End If
Dim FP As System.IFormatProvider
Dim assbly As System.Reflection.Assembly
assbly = System.Reflection.Assembly.Load("ZeroLogicFire.ABC")
Dim mytype As Type
mytype = assbly.GetType("ZeroLogicFire.ABC.ZeroLogicFire.ABC.C_N084231")
If IsNothing(mytype) Then
mytype = assbly.GetType("ZeroLogicFire.ABC.C_N084231")
End If
Dim objWFlowRuntime As System.Workflow.Runtime.WorkflowRuntime
Dim manualService As System.Workflow.Runtime.Hosting.ManualWorkflowSchedulerService
Dim objdataobject As New DataObjectClass
Dim constructor As System.Reflection.ConstructorInfo
Dim ObjLVDataTable As DataTable
Dim objLVLDDoc As New DataObjectClass
Dim qrystr1 As String
Dim objLVArrListReference As New ArrayList
Try
objLVUnitDefinition.GetAllUnits()
If objLVGeneralServiceAppData.ProductCode <> "" Then
qrystr1 = "Select PRODINDEX from INS.UW_INDEX_CODE_MAP A WHERE A.PRODCODE='" & objLVGeneralServiceAppData.ProductCode & "'"
ObjLVDataTable = objdataobject.getSQLDataTable(qrystr1)
If Not IsNothing(ObjLVDataTable) Then
If ObjLVDataTable.Rows.Count > 0 Then
objLVGbl.Product_Code = objLVGeneralServiceAppData.ProductCode
strLVPseudoProductIndex = ObjLVDataTable.Rows(0).Item(0)
End If
End If
End If
Dim args(21) As Object
args(0) = DateTime.Today.ToString("dd/MM/yyyy")
args(1) = Nothing
args(2) = objLVUnitDefinition
args(3) = Nothing
args(4) = strLVUserID
args(5) = "N084231"
-------
----
XIII
All-Star
182707 Points
23464 Posts
ASPInsiders
Moderator
MVP
Re: Stack overflow exception in windows 7 pc
Jan 01, 2013 09:28 AM|LINK
Hi,
if you take out the workflow part, do you also get the errors?
I also noticed your qrystr1 is very likely prone to SQL injection so you want to take that out and replace it with SqlParameters as well.
Grz, Kris.
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!