Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sporadic error message 1

Status
Not open for further replies.

taree

Technical User
May 31, 2008
316
0
0
US
Hi all,

I have about 5 aspx pages in my root directory. For most part these application run without any problem but sometimes I get this sporadic error message and none of the 5 aspx pages apps. are working after I click to the apps so many times the application will start working again.So every time I have this error I have to click one of the apps numerous times inorder to make the apps get to work. Do you have any clue why all of them at the same time show an error message.will this error caused because the web.config file is corrupted or something else. I do not have the access to see the error message from the log event page...please point me to the right direction.

Thank you
 
Here is one error message. I am using asp.net 2.0 and oracle 9i database


Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 2/3/2008 10:17:39 AM
Event time (UTC): 2/3/2008 4:17:39 PM
Event ID: d433bcf02a8d4db1b2144efb9545f3ae
Event sequence: 61
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1254215889/Root-1-128465278459457296
Trust level: Full
Application Virtual Path: /
Application Path: D:\Applications\bidlet\
Machine name: OITW2KS815

Process information:
Process ID: 3988
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: AccessViolationException
Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Request information:
Request URL: Request path: /ItemDetail.aspx
User host address: 65.54.155.35
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 7
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.Common.UnsafeNativeMethods.OCIServerAttach(OciHandle srvhp, OciHandle errhp, Byte[] dblink, Int32 dblink_len, MODE mode)
at System.Data.OracleClient.TracedNativeMethods.OCIServerAttach(OciHandle srvhp, OciHandle errhp, String dblink, Int32 dblink_len, MODE mode)
at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at ItemDetails.BindData() in D:\Applications\bidlet\ItemDetail.aspx.vb:line 19
at ItemDetails.Page_Load(Object sender, EventArgs e) in D:\Applications\bidlet\ItemDetail.aspx.vb:line 11
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
Exception information:
Exception type: AccessViolationException
Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
 
Thank you jbenson001 for your reply. You mean the memory for the server? Should I mention to the server admn. that the memory is corrupt? What is the next thing that I should do?

Thank you
 
It looks like there is a problem with the server memory. I would contact the network admins and have them diagnose the memory to see if it is corrupt
 
thank you for the help. I really appreciate that!
 
Here is my code that caused the
Exception information:
Exception type: AccessViolationException
Exception message: Attempted to read or write protected memory.

and the server admn suggested that there may be a memory leak or memory location are unintentionally modified due to programming errors. here is my code please let me know if there is a way to improve the code.

code behind:
---------------
Imports System.Data
Imports System.Data.OracleClient
Imports System.Configuration.ConfigurationManager
Partial Class addtest
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
BindData()
End If
End Sub

Sub BindData()
Dim srtOrder As String = SortList1.SelectedValue
Dim drDirection As String = DirectionList.SelectedValue

' Dim connectionString As String


Dim oOracleConn As OracleConnection
' Dim oOracleConn As OleDbConnection
Dim connectionString As String = ConnectionStrings("ConnectionString").ConnectionString
oOracleConn = New OracleConnection(connectionString)
'oOracleConn = New OleDbConnection(connectionString)

Dim strStringBuilder As StringBuilder
strStringBuilder = New StringBuilder
With strStringBuilder
.Append(" SELECT DISTINCT p.cprojnum, p.cprojnum || NVL2 (TRIM (p.prroute), '(' || p.prroute || ')', NULL) AS stateproject, ")
.Append(" TRIM (SUBSTR (pr.pjprjnum, INSTR (pr.pjprjnum, '/') + 1) ) AS minnesotaprojectnumber, ")
.Append(" a.contid, LTRIM (a.addend, 0) addendanum, TO_CHAR (a.dateadd, 'MM/DD/YYYY') AS dateadded, (a.adescr) as Descr, ")
.Append(" substr(l.letting,3,2)||'-'|| substr(l.letting,5,2)||'-'|| substr(l.letting,1,2)Lett_date ")
.Append(" FROM addend a, letprop l, proposal p, propproj pp, project pr ")
.Append(" WHERE a.contid = p.contid AND pp.contid = p.contid AND pp.pcn = pr.pcn AND l.lcontid = p.contid ")
'''''Here only change the letting Number
.Append(" AND (l.letting = '08062701') AND INSTR (pr.pjprjnum, p.cprojnum) > 0 ")
'.Append("ANd pr.pjprjnum <> '5703-42 / HSIP 5707(007)'"
.Append(" GROUP BY a.addend,a.dateadd, a.contid,l.letting, p.cprojnum,p.prroute, a.adescr, pjprjnum ")
' .Append(" ORDER BY 1 ")
.Append(" ORDER BY " & srtOrder & " " & drDirection)
End With

'create a new command and pass our sql statement and our connection object.
Dim cmdAddenda As New OracleCommand()
' Dim cmdAddenda As New OleDbCommand()
cmdAddenda.Connection = oOracleConn
cmdAddenda.CommandType = CommandType.Text
cmdAddenda.CommandText = strStringBuilder.ToString

'open the connection
'oOracleConn.Open()

'create a new sqladapter and set its command object with our sqlcommand
Dim adAddenda As New OracleDataAdapter(cmdAddenda)
'Dim adAddenda As New OleDbDataAdapter(cmdAddenda)

'create a new dataset to hold our data
Dim dsAddenda As New DataSet


'fill the dataset with the result of our query from the specified command
adAddenda.Fill(dsAddenda, "AddendaList")

'Bind the DataSet to the GridView
gvaddenda.DataSource = dsAddenda
gvaddenda.DataBind()


'Close the connection
' oOracleConn.Close()
lblTotal.Text = dsAddenda.Tables("AddendaList").Rows.Count.ToString
If lblTotal.Text = "0" Then
SortList1.Visible = False
DirectionList.Visible = False
Button1.Visible = False
lblSrt.Visible = False
End If

End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
BindData()
End Sub

End Clas

------aspx page---
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="addenda.aspx.vb" Inherits="addtest" %>

<html xmlns=" >
<head>
<link href="css/tecsup-print.css" rel="stylesheet" type="text/css" />
<title> </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
<meta name="description" content="Addenda List" />
<meta name="Items" content="Addenda List,Addenda List For Current Project" />

</head>
<body>


<form id="form1" runat="server">
<div>

<table style="width: 99%; background-color: #e6e6fa">
<tr>
<td style="width: 100px; text-align: left;">
<span style="color: red"><strong>
CAUTION:<br />
</strong><span style="color: #000000"></span></span>
</td>
</tr>
</table>
<br />
This site has a list of addenda issued for the current letting but does not
have the text of the addenda.The actual addenda are either mailed or faxed out to
the planholders of record when they are issued.It is the contractor's responsibility
to determine which, if any, addenda pertains to any project they may be bidding.
Failure by the bidder to acknowledge an addendum could result in a bidding being
rejected as irregular.&nbsp;<br />



<br />
<table style="width: 99%; background-color: #FFEFD5;">
<tr>
<td style=" width:47%">
<span style="color: black">
<br />
<br />
Total Number of addenda found:<asp:Label ID="lblTotal" runat="server" Text="Label" Width="112px" Font-Bold="True" ForeColor="Red"></asp:Label></span><strong>
</strong>
</td>
<td style="width: 22%">
<br />

<asp:Label ID="lblSrt" runat="server" Text="Sort By:" Width="82px"></asp:Label>
&nbsp; &nbsp;
<asp:DropDownList id="SortList1" Runat="server" >
<asp:ListItem Text="S.P. Number" Value="stateproject" />
<asp:ListItem Text="Contract Id" Value="contid" />
<asp:ListItem Text="Issue Date" Value="dateadded"/>
<asp:ListItem Text="Letting Date" Value="Lett_date"/>
</asp:DropDownList></td>
<td style="width: 18%">
<div id="SrtOrd">
<br />
&nbsp;<asp:DropDownList id="DirectionList" Runat="server">
<asp:ListItem Text="Ascending" Value="Asc" />
<asp:ListItem Text="Descending" Value="Desc" />
</asp:DropDownList>
<asp:Button ID="Button1" runat="server" Text="Go!" /></div>
</td>
</tr>
</table>

<asp:GridView ID="gvaddenda" runat="server" CellPadding="4" ForeColor="#333333" Width="99%" HorizontalAlign="Left" AutoGenerateColumns="False">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" Font-Size="Small" HorizontalAlign="Left" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" Font-Size="Small" HorizontalAlign="Left" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" Font-Size="X-Small" HorizontalAlign="Left" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />



<columns>
<asp:BoundField DataField="stateproject" HeaderText="State Project Num">
<ItemStyle Font-Size="11px" Wrap="False" />
</asp:BoundField>
<asp:BoundField DataField="minnesotaprojectnumber" HeaderText="MN Project Num">
<ItemStyle Font-Size="11px" />
</asp:BoundField>
<asp:BoundField DataField="contid" HeaderText="Contract Id">
<ItemStyle Font-Size="11px" />
</asp:BoundField>
<asp:BoundField DataField="addendanum" HeaderText="Addend. No">
<ItemStyle Font-Size="11px" />
</asp:BoundField>
<asp:BoundField DataField="dateadded" HeaderText="Issue Date">
<ItemStyle Font-Size="11px" />
</asp:BoundField>
<asp:BoundField DataField="Descr" HeaderText="Brief Description Of Addenda">
<ItemStyle Font-Size="11px" />
</asp:BoundField>
<asp:BoundField DataField="Lett_date" HeaderText="Letting Date">
<ItemStyle Font-Size="11px" />
</asp:BoundField>
</columns>

</asp:GridView>
<br />
<p>
&nbsp;</p>
<p>
&nbsp;</p>
<p>
&nbsp;</p>
<p>
&nbsp;</p>

</div>
</form>



</body>
</html>
 
There isn't any code that you have written should cause an error to state that the memory may be corrupt (I could understand it if it was simply a case of lots of memoery being used, but you would get a different error in that case). I'd get your server team to run some memory tests as errors like that do not relate to excessive memory usage.


-------------------------------------------------------

Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Delivering professional ASP.NET solutions
[URL unfurl="true"]http://weblogs.asp.net/marksmith[/url]
 
Thank you mark for your reply.I will certainly let them to run some memory tests.The strange thing is if one of the aspx page show the error message below that other pages will show the same error message.I think each aspx page is independent of each other and the error messge from one page should not affect the other pages.Am I right on this?
Thank you again for the help.

Exception information:
Exception type: AccessViolationException
Exception message: Attempted to read or write protected memory
 
You are correct all pages are independent. The problem, according to the messages, is a physical memory problem, not a memory usage problem.
 
Hi all again,

the server admn did test the memory and did not find any problem with it.I am still getting the same error message and I copied the stack just in case someone wants to look at it. I did google to find out but there is no clear answer or solution for it. It is really furstrating...please help

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/20/2008 11:44:25 AM
Event time (UTC): 6/20/2008 4:44:25 PM
Event ID: c6289185c95845e6a9116ee8b7aeaeae
Event sequence: 9
Event occurrence: 1
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1254215889/Root-35-128584538622284881
Trust level: Full
Application Virtual Path: /
Application Path: D:\Applications\bidlet\
Machine name: OITW2KS815

Process information:
Process ID: 3504
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE

Exception information:
Exception type: AccessViolationException
Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Request information:
Request URL:
Request path: /plandetail.aspx
User host address: 156.99.41.188
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 76
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.Common.UnsafeNativeMethods.OCIServerAttach(OciHandle srvhp, OciHandle errhp, Byte[] dblink, Int32 dblink_len, MODE mode)
at System.Data.OracleClient.TracedNativeMethods.OCIServerAttach(OciHandle srvhp, OciHandle errhp, String dblink, Int32 dblink_len, MODE mode)
at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable)
at phldetail.addenda()
at phldetail.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
Not sure if this will help, but you could put your code in a try catch, and on finally, close your connection. Maybe an error is sometimes occuring and you have connections that are never closed.
 
thank you for the reply. unfortunatelly the error still not going away. as you can see it is a very simple code but I donot know why it gives me a headache. Do you think it is b/s of the system.Data.OracleClient ?

here is my code:
=================
Imports System.Data
Imports System.Data.OracleClient
Imports System.Configuration.ConfigurationManager
Partial Class addtest
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
BindData()
End If
'.Append("ANd pr.pjprjnum <> '5703-42 / HSIP 5707(007)'"
End Sub

Sub BindData()
Dim srtOrder As String = SortList1.SelectedValue
Dim drDirection As String = DirectionList.SelectedValue

Try
'Dim oOracleConn As OracleConnection
Dim connectionString As String = ConnectionStrings("ConnectionString").ConnectionString
Dim oOracleConn As OracleConnection = New OracleConnection(connectionString)


Dim strStringBuilder As StringBuilder
strStringBuilder = New StringBuilder
With strStringBuilder
.Append(" SELECT DISTINCT p.cprojnum, p.cprojnum || NVL2 (TRIM (p.prroute), '(' || p.prroute || ')', NULL) AS stateproject, ")
.Append(" TRIM (SUBSTR (pr.pjprjnum, INSTR (pr.pjprjnum, '/') + 1) ) AS minnesotaprojectnumber, ")
.Append(" a.contid, LTRIM (a.addend, 0) addendanum, TO_CHAR (a.dateadd, 'MM/DD/YYYY') AS dateadded, (a.adescr) as Descr, ")
.Append(" substr(l.letting,3,2)||'-'|| substr(l.letting,5,2)||'-'|| substr(l.letting,1,2)Lett_date ")
.Append(" FROM addend a, letprop l, proposal p, propproj pp, project pr ")
.Append(" WHERE a.contid = p.contid AND pp.contid = p.contid AND pp.pcn = pr.pcn AND l.lcontid = p.contid ")
.Append(" AND (l.letting = '08062701') AND INSTR (pr.pjprjnum, p.cprojnum) > 0 ")
.Append(" GROUP BY a.addend,a.dateadd, a.contid,l.letting, p.cprojnum,p.prroute, a.adescr, pjprjnum ")
.Append(" ORDER BY " & srtOrder & " " & drDirection)
End With

'create a new command and pass our sql statement and our connection object.
Dim cmdAddenda As New OracleCommand()
' Dim cmdAddenda As New OleDbCommand()
cmdAddenda.Connection = oOracleConn
cmdAddenda.CommandType = CommandType.Text
cmdAddenda.CommandText = strStringBuilder.ToString

'open the connection
'oOracleConn.Open()

'create a new sqladapter and set its command object with our sqlcommand
Dim adAddenda As New OracleDataAdapter(cmdAddenda)

'create a new dataset to hold our data
Dim dsAddenda As New DataSet


'fill the dataset with the result of our query from the specified command
adAddenda.Fill(dsAddenda, "AddendaList")

'Bind the DataSet to the GridView
gvaddenda.DataSource = dsAddenda
gvaddenda.DataBind()


'Close the connection
oOracleConn.Close()
lblTotal.Text = dsAddenda.Tables("AddendaList").Rows.Count.ToString
If lblTotal.Text = "0" Then
SortList1.Visible = False
DirectionList.Visible = False
Button1.Visible = False
lblSrt.Visible = False
End If
Catch ex As Exception
MsgBox("Can't load Web page" & vbCrLf & ex.Message)
End Try


End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
BindData()
End Sub

End Class
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top