Content by Category
.NET 1.x
.NET 2.0
.NET 3.0
.NET 3.5
.NET 4.0
.NET Assemblies
.NET Framework
.NET Getting Started
Accessibility
ADO.NET
Advertorials
Agile Development
AJAX
Architecture
ASP.NET
ASP.NET MVC
ASP.NET WebForms
Azure
B2B (Business Integration)
Bing
BizTalk
Book Excerpts
Build and Deploy
C#
C++
ClickOnce
Cloud Computing
Code Contracts
CODE on the Road!
COM+
Community
Conferences
Continuous Integration
Crystal Reports
CSLA.NET
CSS
Data
Design Patterns
Development Process
Display Technologies
Distributed Computing
DotNetNuke
DSL
Dynamic Programming
Editorials
Enterprise Services ("COM+")
Entity Framework
Events
Expression Blend
F#
Fox to Fox
Frameworks
Functional Programming
Git
Graphics
Internet Explorer 8.0
Interviews
iPhone
Iron Ruby
Java
Java Script
jQuery
LINQ
Linux
Mac OS X
MDX
Microsoft Application Blocks
Microsoft Business Rules Framework
Microsoft Dynamics
Microsoft Expression
Microsoft Office
Mobile Development
Mobile PC
Mono
MsBuild
Network
NHibernate
Object Oriented Development
Open Source
Opinion
Opinions
Oracle
ORM
Other Languages
Parallel Programming
Patterns
Podcasts
Post Mortem
PowerPoint
Print/Output
Product News
Product Reviews
Project Management
Python
Q&A
Rails
Rake
Reporting Services
REST
RIA Services
Ruby
Ruby on Rails
Search
Security
Services
SharePoint
Silverlight
SOA
Social Networks
Software & Law
Software Business
Source Control
Speech-Enabled Applications
SQL Server
SQL Server 2000
SQL Server 2005
SQL Server 2008
SQL Server CE/AnyWhere/Mobile/Compact
Subversion
Sync Framework
Tablet PC
TDD
Team System
Techniques
Testing and Quality Control
Tips
UI Design
UML
User Groups
VB Script
VB.NET
Version Control
VFP and .NET
VFP and SQL Server
Virtual Earth
Vista
Visual Basic
Visual Basic 6 (and older)
Visual FoxPro
Visual Studio .NET
Visual Studio 2005
Visual Studio 2008
Visual Studio 2010
Visual Studio Tools for Office
VSX
WCF
Web Development (general)
Web Services
WF
Whitepapers
Windows 7
Windows Azure
Windows Live
Windows Server
Windows Vista
WinForms
Workflow
WPF
XAML
XML
XNA
XSLT



DevConnections


 


DevReach

Reader rating:
Article source: CoDe (2009 Jul/Aug)


Article Pages:  1  2 3 - Next >


SharePoint Applied: SharePoint 2007 Ninja Debugging

One of the challenges of working as an on-demand consultant is that I frequently get called into projects where the SharePoint installation is a bit sick, and it is in production. All the usual tricks have been tried, and the Infrastructure Ogre won't let me install Visual Studio on the production systems to truly be able to debug the problem. Yet another

problem of being an on-demand consultant is that the clock starts ticking even before I've understood the problem description.

Here are some examples of problems I hear:

My SharePoint is slow. This description is about as good as saying it may rain next week. This tells me nothing about where it is slow, at what times, and what the definition of slow is.

I am getting a random exception every now and then, and SharePoint says “unexpected error has occurred.” I think you will agree that “random” is not to be used when describing specifics of a problem, but it frequently is.

It works in the development environment, but we have no idea why it blows up in production, and we really can't diagnose because of restricted access to production.

Did I mention that SharePoint is a big and complex product with a lot of moving parts? So that makes it a little bit more challenging to diagnose the above, than, say for instance, an ASP.NET app. But luckily the same concepts apply. Also, SharePoint production installations are usually comprised of multiple servers so it is incredibly difficult sometimes to identify the source of the problem by bouncing electrons off of your installation. A typical request on a corporate network may go through a couple of firewalls, a load balancer, a few security appliances, and finally one of the Web front ends may render the actual content, which is reverse URL rewritten over a Forefront server before it comes back to the browser. Good luck finding where the “slowness” in your SharePoint farm is coming from. As a SharePoint consultant, the boundaries of my responsibility end at proving that the SharePoint farm itself was slow or not slow, and thereby rectifying the problem if it is indeed in SharePoint, or having a “blame-storming” session and finding out what needs to be fixed.

In this article, I'll demonstrate a debugging technique I have used frequently on production environments where I need to diagnose a problem with minimal or zero downtime to the application. The process is ridiculously simple, and the data collected using this mechanism is invaluable.

Here are the steps:

  1. Setup a simple database.
  2. Throw an ASPX into the 80 directory.
  3. Make some changes to the web.config file.
  4. Use the website normally and reproduce the error.

So let's get started.

Setup a Simple Database

Technically, you could use any database structure with this technique. If you wish to write a custom database structure, perhaps something more optimized for large amounts of data to be collected over time, all you'd have to do is write a custom logging provider. But since I'm the laziest guy you'll ever meet or hear about, I'll use the aspnetdb that comes as a part of Microsoft.NET 2.0.

In order to set up the database, run the following command on the command line.

$Windir\Microsoft.NET\Framework\
v2.0.50727\aspnet_regsql.exe 

This command will bring up a wizard. Go through the wizard to set up such a database on any available database server other than SQL Express. While I could have used SQL Express, it is just a whole lot easier to talk to a server-based SQL product when working with SharePoint. While you are at it, also go ahead and set up a SQL Authentication user that can work with such a database.

&

By: Sahil Malik

Sahil Malik is a Microsoft MVP, INETA speaker, a .NET author, consultant, and trainer, and a well-rounded overweight geek. He has a passion for SharePoint, data access, and application architecture.

Sahil loves interacting with fellow geeks in real time. His talks are full of humor and practical nuggets. His talks tend to get very highly charged, fast moving, and highly interactive.

You should check out his blog at http://blah.winsmarts.com

sahilmalik@gmail.com



Article Pages:  1  2 3 - Next Page: 'Throw an ASPX in the 80 Director' >>

Page 1: SharePoint Applied: SharePoint 2007 Ninja Debugging
Page 2: Throw an ASPX in the 80 Director
Page 3: Reproduce the Error

How would you rate the quality of this article?
1 2 3 4 5
Poor      Outstanding

Tell us why you rated the content this way. (optional)

Average rating:
5 out of 5

6 people have rated this article.

      CODE TRAINING

 

iPhone iPad Developers Conference