|
Navigation
Categories
Entries by Month
| October, 2008 (1) |
| September, 2008 (1) |
| July, 2008 (4) |
| June, 2008 (6) |
| May, 2008 (2) |
| March, 2008 (5) |
| December, 2007 (1) |
| October, 2007 (1) |
| September, 2007 (2) |
| May, 2007 (1) |
| April, 2007 (5) |
| October, 2006 (1) |
| July, 2006 (2) |
| June, 2006 (6) |
| January, 2006 (2) |
| December, 2005 (6) |
| November, 2005 (9) |
| October, 2005 (9) |
| September, 2005 (3) |
| August, 2005 (11) |
| July, 2005 (20) |
| June, 2005 (3) |
| May, 2005 (5) |
| April, 2005 (5) |
| March, 2005 (5) |
| February, 2005 (5) |
| January, 2005 (13) |
| December, 2004 (10) |
| November, 2004 (6) |
| October, 2004 (2) |
| September, 2004 (7) |
| August, 2004 (8) |
| July, 2004 (8) |
| June, 2004 (4) |
| May, 2004 (13) |
| April, 2004 (14) |
| March, 2004 (33) |
| February, 2004 (1) |
| May, 2003 (6) |
| April, 2003 (5) |
| March, 2003 (4) |
| February, 2003 (1) |
| January, 2003 (6) |
|
|
|
 Thursday, January 27, 2005
If you have a resource required by a web part, WSS has a defined way to store and access this resource. Custom web parts can be deployed to the wwwroot/bin directory or to the global assembly cache (GAC). The deployment location also affects the location of the resources directory. For GAC deployments, the directory is mapped to /_wpresources/[assembly_name]. For bin directory deployments, the directory is mapped to /wpresources/[assembly_name].
The workaround to this is to use the ClassResourcePath property. The SDK advises use to "Use the path returned by the ClassResourcePath property to prefix resource URLs for the browser to fetch."
The gotcha comes in when you try to access this external resource directly from disk when the context is a sub-site. Since the file is in a directory, I have always grabbed the file like this:
Dim resourceURI As URI = New Uri(ClassResourcePath) Dim partResourcePath as String = Context.Server.MapPath(resourceURI.AbsolutePath) . . . Dim resourcePath as string = Path.Combine(partResourcePath, "somefile.xsl") Dim trn As XslTransform = New XslTransform trn.Load(resourcePath)
What is happening, however, is that the sub-site address is included in the ClassResourcePath. This is mapped correctly when requesting the file via the URL, but not whem mapping the path to a physical directory.
When using ClassResourcePath, be sure to use http to access the resource.
 Friday, January 21, 2005
I've left pieces of this here and here. But perhaps a little code would help. :)
Public Class MyWebPart Inherits Microsoft.SharePoint.WebPartPages.WebPart
Private Const TRACE_CLASS_ID As String = "MyWebPart"
Protected Overrides Sub RenderWebPart(ByVal output as System.Web.UI.HtmlTextWriter) Dim TRACE_CATEGORY As String = TRACE_CLASS_ID + "RenderWebPart"
Try Context.Trace.Write(TRACE_CATEGORY, "Trying something") ' Do something here
' pretend there is a variable Context.Trace.Write(TRACE_CATEGORY, "variable value: " + variable)
output.Write("you html code goes here")
Catch ex As Exception Context.Trace.Warn(TRACE_CATEGORY, ex.ToString) End Try
End Sub
 Thursday, January 20, 2005
Tariq has a post that details how to create a tabstrip (like a meeting workspace) using a list as the data source.
Thanks Tariq!
I'm testing
a post on the new dasBlog 1.7
Please
disregard
Log Parser 2.2
Log parser is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows® operating system such as the Event Log, the Registry, the file system, and Active Directory®. You tell Log Parser what information you need and how you want it processed. The results of your query can be custom-formatted in text based output, or they can be persisted to more specialty targets like SQL, SYSLOG, or a chart.
Most software is designed to accomplish a limited numer of specific tasks. Log Parser is different... the number of ways it can be used is limited only by the needs and imagination of the user. The world is your database with Log Parser.
This is an update to the tool I mentioned before. (Two years ago!) But, since it still gets hits from the search engines, it's worth updating the post.
 Wednesday, January 19, 2005
dasBlog, the software used to run this blog, has been updated to v1.7. I have upgraded my site, so please let me know if you see anything amiss. This new version includes a Captcha control for comments, which helps to block bots from posting comment spam. I hope that this is not too much trouble for you. Also, my customized theme was not working so well, so I went back to the default until I can figure out what's up.
Thanks for your patience.
 Wednesday, January 12, 2005
Received the following email today:
We have been working on customizing the Training page. On that page (doc library) we're going to store all our training materials, and we'd like to store our Camtasia "movies" there as well. These movies are annotated screen captures of the steps to perform various tasks. Once recorded and annotated, they are stored as an .exe file that includes the Camtasia viewer, which is the optimal way of doing this.
We discovered that we cannot put an .exe file on the page (in the document library). Is this something that can be changed for our page?
I know you're thinking “that's a nice can of worms you have there.”
The technical answer is yes. Refer to the admin guide.
I would love to hear any arguments in favor of allowing this. This is a completely internal site. The server is controlled by the corporate IS Department. The WSS site in in the Intranet Zone.
My point is that users will develop habits regardless of the location of the server. Telling them that it is OK to download and run this file because it is on our server will lead to them thinking it's alright do this elsewhere.
I welcome your comments.
I (finally) got around to opening the new Scot Hillier book Advanced SharePoint Services Solutions. Right out of the gate, he describes CAML in great detail. Very nice.
He mentions in the introduction that this is not a beginners book, and rightly so. In the first two chapters, there is just a little introduction and then lots of detail. For example, the web services chapter dives right into create a SOAP request with spending time explaining SOAP. This is perfect for me!
The last half of the book discusses other related Microsoft products: IBF, BizTalk, MSMS. Since I've not used those too much, I haven't spent time in those chapters. But the first half of the book has been very helpful.
You can view the table of contents at the Apress site.
 Friday, January 07, 2005
Brian Goldfarb is soliciting help about what type of MasterPage templates to build. (He doesn't say so, but I assume he means that these would be shipped with ASP.Net 2.0 or at least downloadable.)
My response in his comments:
I think have at least a few "ready-to-go" pages would be helpful. Like SharePoint services -- some templates are full of web parts, others are just shells.
 Wednesday, January 05, 2005
Mom
The most powerful force in this universe.
John Buccigross; ESPN.com; January 2, 2005
I wrote about and dismissed SmarterStats for web server log analysis. It's been almost a year, so a little update is in order.
I have licensed and installed the enterprise version of this tool. With the web farm deployed (read the Sharepoint category) and some legacy web servers, SmarterStats became a very attractive option.
For those with less demanding needs, Microsoft has a KBase article that shows how to use the bulk copy program (bcp) to load the log files.
Update: KB Article discovered via John West
 Monday, January 03, 2005
UPDATE: John points out “It should be noted that when you change the setting to CT with UIiB, an automatic Full or Incremental (depending upon the presence of a timestamp column) is executed to re-sync the table data with the FT Catalog.“ I missed this when I posted, but new visitors should be aware of this. Thanks John!
John Kane came across my post on the forums at Joel on Software about full-text indexing on SQL Server. I suggested that I could post a script that sets all of the tables in an index to background change tracking, but I never did make that post.
So, here is a T-SQL script that will check every table in every catalog in the current database:
DECLARE @FTCatID smallint, @FTPath nvarchar(260), @FTStatus int DECLARE @FTName sysname, @FTNbrTbls int DECLARE @csr_FT CURSOR
DECLARE @FTTOwner sysname, @FTTName sysname, @FTTIndex sysname DECLARE @FTTColid int, @FTTActive int, @FTTCat sysname DECLARE @csr_FTT CURSOR
-- Get all the catalogs in the current database EXEC sp_help_fulltext_catalogs_cursor @csr_FT OUTPUT FETCH NEXT FROM @csr_FT INTO @FTCatID, @FTName, @FTPath, @FTStatus, @FTNbrTbls WHILE (@@FETCH_STATUS = 0) BEGIN
-- Get all the tables in this catalog
print @FTName EXEC sp_help_fulltext_tables_cursor @csr_FTT OUTPUT, @FTName FETCH NEXT FROM @csr_FTT INTO @FTTOwner, @FTTName, @FTTIndex, @FTTColid, @FTTActive, @FTTCat
WHILE (@@FETCH_STATUS = 0) BEGIN
print ' ' + @FTTName EXEC sp_fulltext_table @FTTName, 'Start_change_tracking' EXEC sp_fulltext_table @FTTName, 'Start_background_updateindex'
FETCH NEXT FROM @csr_FTT INTO @FTTOwner, @FTTName, @FTTIndex, @FTTColid, @FTTActive, @FTTCat
END
CLOSE @csr_FTT
DEALLOCATE @csr_FTT
FETCH NEXT FROM @csr_FT INTO @FTCatID, @FTName, @FTPath, @FTStatus, @FTNbrTbls END
CLOSE @csr_FT DEALLOCATE @csr_FT
If your server is setup like mine, you might have multiple databases on the server. If you want to run the above script on all the databases, here is a VBScript to do so:
dim oServer, oDB, oFS, oFile dim sCmdBatch
Set oFS = CreateObject("Scripting.FileSystemObject") Set oFile = oFS.OpenTextFile("FT_change_tracking.sql") sCmdBatch = oFile.ReadAll
Set oServer = CreateObject("SQLDMO.SQLServer")
WScript.Echo "Connecting..." oServer.LoginSecure = True oServer.Connect "servername"
On Error Resume Next
For Each oDB in oServer.Databases WScript.Echo "Database: " & oDB.Name oDB.ExecuteImmediate sCmdBatch Next
|
|
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 2008, Paul Schaeflein
E-mail
|