მორიგი თარიღის მიმღები გამართვის Trick

I’m sure I’m not the first person to come up with this. თუმცა, I haven’t noticed anyone publish a trick like this since I started paying close attention to the community last July. ასე რომ,, მეგონა, მე მინდა ვიცი ამ სწრაფი და ადვილი გამართვის წვერი.

მე მომუშავე ღონისძიება მიმღები დაწყებული წარმოქმნის ამ შეცდომა 12 hive:

შეცდომა და გაშვებული ღონისძიება მიმღები Conchango.xyzzyEventReceiver in xyzzy, მობილური = 1.0.0.0, კულტურის = ნეიტრალური, PublicKeyToken = blahbalhbalh. Additional information is below. : ობიექტის მითითება არ არის, რომ მაგალითად ობიექტი.

I didn’t know where I had introduced this bug because I had done too many things in one of my code/deploy/test cycles.

მე შევეცადე ეს გადაწყვეტა მიიღოს ჩემი pdb იქ იმედოვნებს, რომ SharePoint ნახვა 12 hive იმას აჩვენებენ დასტის კვალი, but no luck. I don’t know if it’s possible and if someone does, გთხოვთ ნება მომეცით ვიცი 🙂

I know it’s possible to write your own log messages to the 12 hive. Frankly, I wanted something a little less scary and quicker to implement.

It occurred to me that I could at least get some basic trace information by catching and re-throwing generic exceptions like this:

  ვცდილობთ {
    UpdateEditionDate(თვისებები);
  }
  დაჭერა (გამონაკლისი e)
  {
    სახიფათოა ახალი გამონაკლისი("Dispatcher, UpdateEditionDate(): გამონაკლისი: [" + e.ToString() + "].");
  }

This showed up in the 12 hive thusly:

შეცდომა და გაშვებული ღონისძიება მიმღები Conchango.xyzzyEventReceiver in xyzzy, მობილური = 1.0.0.0, კულტურის = ნეიტრალური, PublicKeyToken=blahblahblah. Additional information is below. : Dispatcher, UpdateEditionDate(): გამონაკლისი: [System.NullReferenceException: ობიექტის მითითება არ არის, რომ მაგალითად ობიექტი. at Conchango.xyzzyManagementEventReceiver.UpdateEditionDate(SPItemEventProperties თვისებები) at Conchango.xyzzyManagementEventReceiver.Dispatcher(SPItemEventProperties თვისებები, String eventDescription)].

That gave me all the detail I needed to track down that particular problem and I expect to use it a lot going forward.

</ბოლო>

გამოწერა ჩემი დღიური!

3 thoughts on "მორიგი თარიღის მიმღები გამართვის Trick

  1. Anders Rask
    I have had alot of luck lately debugging this kind of issues with a combination of SPTraceView and DebugView
    Debugview alone is very usefull as well. You can pipe out output using System.Diagnostics.Debug.WriteLine().
    You dont even have to remove them when you release build, since the output only is triggered in debug build mode.
    SPTraceView is a tool created by Hristo Pavlov.
    At its default setting it will show you ULS trace events as they happen. And it catches also the ULS trace events that *doesnt* make it to the diagnostics log!
    But that i disable as soon as i run the util. Whats much better is that you can pipe output to show up in DebugView.
    It also has alot of nice features for filtering on event levels, services etc.
    hth
    Anders
    oh and nice seeing you in the bar at SPBP 🙂

დატოვე პასუხი უნდა Charles პასუხის გაუქმება

თქვენი ელ-ფოსტა არ გამოქვეყნდება. აუცილებელი ველები მონიშნულია *