Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / January 2007

Tip: Looking for answers? Try searching our database.

Help Help. I really need some help with this

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris - 31 Jan 2007 19:10 GMT
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 - 31 Jan 2007 19:22 GMT
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

> Hi,
> I have an application which was working fine then all of a sudden my users
[quoted text clipped - 80 lines]
>
> please assist
Chris - 31 Jan 2007 19:50 GMT
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?

> Chris,
> I'm not sure, but just looking at your code, could it be possible that the
[quoted text clipped - 90 lines]
> >
> > please assist
Jason Vermillion - 31 Jan 2007 21:33 GMT
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

> You are correct. This is the GetUserLocations() function
>
[quoted text clipped - 109 lines]
> > >
> > > please assist

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.