SharePoint / ASP.Net Development
Experiences from the field...
Navigation
   RSS 2.0
Categories
Entries by Month

# Wednesday, April 07, 2004

That thud you heard was my next web part crashing...

I'm converting the Personal Web Links part from SQL Digital Dashboard v3 (DDv3) to Windows SharePoint Services (WSS). The effort was not very difficult: a few CSS class name changes, a custom property that ShouldSerialize, referencing WPSC instead of DDSC, removing obsolete JavaScript functions, updating the XSL from the “TR/WD-xsl” namespace to the “1999/XSL/Transform” namespace. Everything looks good on my development machine, but other users saw nothing.

My debugging method of choice is the ASP.Net trace feature. In web config, I set the trace options:

    <trace enabled=”true” pageOutput=”true” localOnly=”true” />

This will dump a bunch of information at the bottom of the page. (WARNING: Do not do this on a publicly accessible machine. It will compromise security.)

In my web part, I include a call to Context.Trace.Write at the beginning of each routine. In the catch blocks, I call Context.Trace.Warn(ex.ToString). This puts the entire exception into the trace output. Plus, it avoids the WSS error page (“The [Name] Web Part appears to be causing a problem.“)

My exception output indicated an error accessing C:\WINDOWS\temp\faqvgg2l.dll(??). Thanks to the stack trace, I was able to determine that this dll contains the script embedded in the XSLT in an msxml:script tag. Fortunately, that function can be moved into the web part assembly, so I'm on my way.

Wednesday, April 07, 2004 1:40:52 PM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 

I found a couple of tips from the microsoft.public.sharepoint.* newsgroups and I'm posting them here for future reference:

Newsgroup: microsoft.public.sharepoint.windowsservices
Subject: RE: Cross-site announcements
Date: Wednesday, April 07, 2004 4:22 AM

Please follow the steps below:

1. Open and edit the subsite page in FrontPage 2003.
2. Select Insert-->Database-->Data view-->Manage catalog.
3. Add a new catalog and type the main site URL in "Location".
4. After that, you can see all the data in the main site.
5. Drag the announcement list from the "SharePoint Lists" to the sub site
page.

UPDATE: Jan Tielens went further - he actual did this and included screen shots! Thanks Jan.


Newsgroup: microsoft.public.sharepoint.portalserver.development
Subject: Re: Re-Ghosting an Unghosted .ASPX Page
Date: Monday, March 29, 2004 7:58 AM

The ghost page in SPS 2003 means using the template page directly. The ghost settings will be saved in the "Docs" table. ... For this item, there is one column named Content. By default, the value for this column is "null", which means SPS will get the information from the Template. However, after we edit the page in FrontPage, SPS will save the page information to this column. In other words, SPS will use the data in the database and ignore the information from the Template.

For the default sps page, we can reset the value with the SQL commands below:

--select the portal database
use sps1_site
go
--retrieve the page id
SELECT ID FROM Docs
WHERE (leafname= 'default.aspx') 
    AND setuppath like '1033\SPS\default.aspx%'
go
--set the content to null
UPDATE Docs
SET Content = NULL
WHERE (Id = '{A3DE463E-D6E9-4A8C-A2D2-8D49562442B7}')
--please replace the id with the value on your side

Wednesday, April 07, 2004 8:38:25 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Monday, April 05, 2004

I posted a new article to the SharePoint blog:

A description of the code and HTML to replicate Microsoft's Tool Pane user interface. Sample code is included.

Monday, April 05, 2004 8:54:14 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
# Friday, April 02, 2004

We "launched" the beta site yesterday. The beta group has 25 users, all in the IT department, including the all-important help desk and training department. The "site" is really just one page -- and it contains only what is on the current home page. We don't want to throw new things out yet.

The page has three web parts, plus a fourth in the virtual server gallery. Two more parts are under development and will be added next week. These parts:

Announcements

Yes, I know that announcements are included. We have two years worth of announcements in the current system that don't really fit in the default announcement list. Also, we don't want a different interface for the end users, so we just brought over the existing code.

That code is from the old SQL Server Digital Dashboard. (That is a story for a different day!) The web part is just a DIV tag and a bunch of client-side script. The script uses the MSXML dll's to pull the announcement data from SQL (using SQLXML) and an XSL stylesheet from the legacy web server. The script runs the transformation to the innerHTML property of the DIV.

Long term, we'll migrate this data into a WSS list so that it is included with the search results. I expect that I'll need to keep the existing format, so I'll be using another custom part, or a custom view if possible.

Corporate Links

This is just a WSS list that is populated with specific links to our corporate websites. The end-users can only view this. The fun thing about this part is that I wrote a small .Net console application to populate the list using the WSS Web Services. (That console app will most likely grow to be the conversion program for the announcements.)

Intranet Navigator

This is the part with the custom toolpart. The top-level "units" of the organization are displayed. Click on one and it expands to show the child units. The other top-level items are then hidden. The tool pane allows you to select which down-level items are displayed in the initial view.

Department Roster

This is just a fancy phone list. Each of the department pages has this part to show their members. The part reads an SQL table related to the HR system, so the built-in members part was not used.

Our first feedback meeting is this afternoon.  I hope it goes well!

Friday, April 02, 2004 11:06:18 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
# Wednesday, March 31, 2004

Steve Clarke, in my comments, points out a few other sites with information about CSS in WSS.

The same reference is over here:
http://www.sharepointcustomization.com/resources/tipstricks/wss_cssguide.htm

And for something even cooler, check out this version. Hovering over an element reveals the style:
http://www.frontpagedevkit.com/wss/articles/themes-custom2.htm#Identifying_the_styles_that_change_key_elements

Thanks Steve!!

Wednesday, March 31, 2004 7:32:50 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
# Tuesday, March 30, 2004

I was looking throughout the SDK help file for these CSS Class Definitions and never did find them!! Of course, now that I've scoured the source of many pages, I find it...

Tuesday, March 30, 2004 8:52:39 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 

I hurriedly wrote the post last night but did not have time to explain why.  My own little cliffhanger!

My part needs to get data from an XML file, both in “regular” mode and in “tool pane” mode. I figured that I could put the file in the ASP.Net application cache and grab it during On_Load(). This seems to be a bit different -- rather than having declared controls that show some data, I have data that defines the controls. This doesn't seem to match up well with the WebPart model.

So, I moved the XML load routine to On_Init(). But, a valuable lesson learned.

Tuesday, March 30, 2004 8:17:07 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
# Monday, March 29, 2004

As I'm working thru my WebPart development, I occasionally received an error: Object Reference not set to an instance of an object.

Turns out that the order of events in the WebPart class are slightly different when the tool part is being displayed:

“Regular“ mode “ToolPane“ mode
New New
On Init On Init
On Load CreateChildControls
CreateChildControls On Load
GetToolParts
On PreRender On PreRender
RenderWebPart RenderWebPart

Monday, March 29, 2004 4:06:14 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 

I posted a new article to my SharepointBlog titled ToolPane Customization. (I practice code re-use all the time -- even in the blog titles!) None of this is really ground-breaking, just some background on what I'm trying to do. I don't know how many parts the series will have, but I hope you'll stick around for the series.

Monday, March 29, 2004 8:38:29 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
# Friday, March 26, 2004

I've been deep in coding my first web part. It is a rather complicated one, but I need to replicate one of the functions on our existing intranet site.  I'll post the details in a later post, because I want to document it carefully.

Any of you WSS developers out there, drop me a note. I know your out there, and I want to find you!!

Friday, March 26, 2004 2:14:08 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
# Wednesday, March 24, 2004

Alex Chang writes about his experience installing WSS. Of particular interest is the discussion in his comments about included/excluded paths.

Wednesday, March 24, 2004 1:51:36 PM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 

Thank you for all your efforts at "personalizing" Microsoft. I certainly appreciate it.

I know that you are working on bringing RSS throughout the company.  I would love to see a feed added to the "Columns" page (http://msdn.microsoft.com/vstudio/using/Columns/default.aspx). In my opinion, this is one of the best areas of MSDN online.

Wednesday, March 24, 2004 10:06:11 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 

From Christa Carpentiere:

The Knowledge Base is your friend

For about the umpteenth time, I've seen a newsgroup question on how to merge data from two or more DataTables responded to with a link to HOW TO: Implement a DataSet JOIN helper class in Visual C# .NET. This is just one in a series of KB articles on a DataSetHelper class that can be used to address common data merging and filtering questions. They can be handy - if you want to see what's available, just go to http://support.microsoft.com and search on "datasethelper".

Wow!  I knew that there where How To articles in the KBase, but I didn't know the depth of this subject. I wonder how much “gold” is in there...

Wednesday, March 24, 2004 9:06:36 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 

The initial stress test went well. I was able to get over 1100 connections to each server. According to the test tool, I generated almost 300 requests per second.

One thing that I don't like about performance numbers is the vast quantity of them! I need to find more time to research the particular items to record to ensure that I am watching the right things. So, while the test was running, I fired up the browser and navigated to the site being tested.  I did not notice any difference. WOO HOO!!!!

For those interested, the servers each reported an average of 175 requests executed per second, which exceeds the 300 the clients reported. During the 15 minute test, 266,000 requests were issued with 2400 failed connections. (This is less than 1%, so we will most likely not follow-up until later.)

The performance is deemed acceptable, so now we push forward with a “beta” roll-out starting April 1st. I have a few parts to create, so it's off to the SDK.

Wednesday, March 24, 2004 8:54:22 AM (Central Standard Time, UTC-06:00)  #    Comments [0]  | 
Search

Further Reading...

Powered by: newtelligence dasBlog 2.2.8279.16125

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009, Paul Schaeflein

Send mail to the author(s) E-mail