Home > Archive > ASP .NET > January 2007 > Help Help. I really need some help with this
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Help Help. I really need some help with this
|
|
|
| Hi,
I have an application which was working fine then all of a sudden my users
are getting my custom error page. When I check the event log on web Server I
see
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 1/31/2007 1:23:08 PM
Event time (UTC): 1/31/2007 6:23:08 PM
Event ID: 07e688eeb1614408ad39b600cfd3e3d9
Event sequence: 8
Event occurrence: 1
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/myapp-1-128147413814374195
Trust level: Full
Application Virtual Path: /myapp
Application Path: D:\Sites\Beta\myapp\
Machine name: servername
Process information:
Process ID: 8860
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: ArgumentNullException
Exception message: Value cannot be null.
Parameter name: value
Request information:
Request URL: http://beta/myapp/Default.aspx
Request path: /myapp/Default.aspx
User host address: 1.1.1.1
User: DOMAIN\username
Is authenticated: True
Authentication Type: Negotiate
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 1
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.Caching.CacheEntry..ctor(String key,
Object value, CacheDependency dependency, CacheItemRemovedCallback
onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration,
CacheItemPriority priority, Boolean isPublic)
at System.Web.Caching.CacheInternal.DoInsert(Boolean isPublic, String
key, Object value, CacheDependency dependencies, DateTime
utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority
priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace)
at System.Web.Caching.Cache.Insert(String key, Object value,
CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan
slidingExpiration)
at Controls_Queue.Page_Load(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
For more information, see Help and Support Center at
The default.aspx page has one control on it. This is the entry code for that
control
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
_list = GetUserLocaations()
For Each l As String In _list
drpLocation.Items.Add(l)
Next
End Sub
please assist
| |
| Mike Rand 2007-01-31, 7:13 pm |
| Chris,
I'm not sure, but just looking at your code, could it be possible that the
getLocations method is returning a null value? Or is it returning a dynamic
list that may get updated seperately (i.e., if it is a list of directories
and someone else on the network deleted a folder, this could cause a problem).
Just a few ideas, I would try to step through the code and inspect the list
for null values.
Good luck!
- Mike
"Chris" wrote:
> Hi,
> I have an application which was working fine then all of a sudden my users
> are getting my custom error page. When I check the event log on web Server I
> see
>
> Event code: 3005
> Event message: An unhandled exception has occurred.
> Event time: 1/31/2007 1:23:08 PM
> Event time (UTC): 1/31/2007 6:23:08 PM
> Event ID: 07e688eeb1614408ad39b600cfd3e3d9
> Event sequence: 8
> Event occurrence: 1
> Event detail code: 0
>
> Application information:
> Application domain: /LM/W3SVC/1/Root/myapp-1-128147413814374195
> Trust level: Full
> Application Virtual Path: /myapp
> Application Path: D:\Sites\Beta\myapp\
> Machine name: servername
>
> Process information:
> Process ID: 8860
> Process name: w3wp.exe
> Account name: NT AUTHORITY\NETWORK SERVICE
>
> Exception information:
> Exception type: ArgumentNullException
> Exception message: Value cannot be null.
> Parameter name: value
>
> Request information:
> Request URL: http://beta/myapp/Default.aspx
> Request path: /myapp/Default.aspx
> User host address: 1.1.1.1
> User: DOMAIN\username
> Is authenticated: True
> Authentication Type: Negotiate
> Thread account name: NT AUTHORITY\NETWORK SERVICE
>
> Thread information:
> Thread ID: 1
> Thread account name: NT AUTHORITY\NETWORK SERVICE
> Is impersonating: False
> Stack trace: at System.Web.Caching.CacheEntry..ctor(String key,
> Object value, CacheDependency dependency, CacheItemRemovedCallback
> onRemovedHandler, DateTime utcAbsoluteExpiration, TimeSpan slidingExpiration,
> CacheItemPriority priority, Boolean isPublic)
> at System.Web.Caching.CacheInternal.DoInsert(Boolean isPublic, String
> key, Object value, CacheDependency dependencies, DateTime
> utcAbsoluteExpiration, TimeSpan slidingExpiration, CacheItemPriority
> priority, CacheItemRemovedCallback onRemoveCallback, Boolean replace)
> at System.Web.Caching.Cache.Insert(String key, Object value,
> CacheDependency dependencies, DateTime absoluteExpiration, TimeSpan
> slidingExpiration)
> at Controls_Queue.Page_Load(Object sender, EventArgs e)
> at System.Web.UI.Control.OnLoad(EventArgs e)
> at System.Web.UI.Control.LoadRecursive()
> at System.Web.UI.Control.LoadRecursive()
> at System.Web.UI.Control.LoadRecursive()
> at System.Web.UI.Page.ProcessRequestMain(Boolean
> includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
>
>
> Custom event details:
>
> For more information, see Help and Support Center at
>
>
> The default.aspx page has one control on it. This is the entry code for that
> control
>
> Protected Sub Page_Load(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Me.Load
>
>
> _list = GetUserLocaations()
>
> For Each l As String In _list
> drpLocation.Items.Add(l)
> Next
>
> End Sub
>
>
> please assist
>
>
| |
|
| You are correct. This is the GetUserLocations() function
Public Function GetUserLocations()
Dim dr as SqlDatareader = ...
If dr.HasRows Then
Dim _list As New Generic.List(Of String)
While dr.Read
_list.Add(dr.Item("name"))
End While
Return _list
End If
Return Nothing
End Function
What is the best way to return an empty list?
"Mike Rand" wrote:
[color=darkred]
> Chris,
> I'm not sure, but just looking at your code, could it be possible that the
> getLocations method is returning a null value? Or is it returning a dynamic
> list that may get updated seperately (i.e., if it is a list of directories
> and someone else on the network deleted a folder, this could cause a problem).
> Just a few ideas, I would try to step through the code and inspect the list
> for null values.
> Good luck!
> - Mike
>
> "Chris" wrote:
>
| |
| Jason Vermillion 2007-01-31, 7:13 pm |
|
Instead of returning Nothing return a new list that does not have any items
added to it.
See code below. You can probably also get rid of the test for dr.HasRows.
I think dr.Read will return false if no rows were returned by the
sqldatareader.
Jason Vermillion
Public Function GetUserLocations()
Dim dr as SqlDatareader = ...
Dim _list As New Generic.List(Of String)
If dr.HasRows Then
While dr.Read
_list.Add(dr.Item("name"))
End While
End If
Return _list
End Function
"Chris" wrote:
[color=darkred]
> You are correct. This is the GetUserLocations() function
>
>
> Public Function GetUserLocations()
>
> Dim dr as SqlDatareader = ...
>
> If dr.HasRows Then
> Dim _list As New Generic.List(Of String)
> While dr.Read
> _list.Add(dr.Item("name"))
> End While
> Return _list
> End If
> Return Nothing
>
> End Function
>
> What is the best way to return an empty list?
>
>
> "Mike Rand" wrote:
>
|
|
|
|
|