Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Help Help. I really need some help with this

Reply
Thread Tools

Help Help. I really need some help with this

 
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      01-31-2007
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWlrZSBSYW5k?=
Guest
Posts: n/a
 
      01-31-2007
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
>
>

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hyaXM=?=
Guest
Posts: n/a
 
      01-31-2007
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:

> 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
> >
> >

 
Reply With Quote
 
=?Utf-8?B?SmFzb24gVmVybWlsbGlvbg==?=
Guest
Posts: n/a
 
      01-31-2007

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:

> 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:
>
> > 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
> > >
> > >

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I really need help with this so if anyone can help me out that wouldbe really great of you. adityagaddam90@gmail.com Java 30 02-10-2008 11:29 PM
Really need some help with wireless network! Geo General Computer Support 1 10-16-2006 09:52 PM
do we really-really need Photoshop Elements? Giovanni Azua Digital Photography 6 05-18-2005 04:22 PM
Really need some help on this Michael S. Kolias ASP .Net 5 01-05-2005 02:12 PM
I really some need help with this compare validator, which isn't working properly. TN Bella ASP .Net 0 07-02-2004 01:33 AM



Advertisments