|
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) |
|
|
|
 Wednesday, March 02, 2005
In Part 2 of my continuing series on Intranet Journal, I look at the basic installation of a corporate intranet and some basic customization options.
Thanks to Bob Mixon for his technical review.
 Thursday, February 24, 2005
I had an interesting email conversation today discussing SharePoint and it occurred to me that it is possible to try it out free of charge.
Jan. 12, 2006: Updated the links to point to the most recent versions.
 Friday, February 18, 2005
 Monday, February 07, 2005
 Thursday, February 03, 2005
 Wednesday, February 02, 2005
I found a post of mine on a different website. They obviously are reading my RSS feed, but it doesn't look like it:

I DID NOT SUBMIT THIS!!!! And what pisses me off is that they have Google Ads on that page.
If you know who runs this site -- have them stop. (Or they can pay me.)
 Monday, January 31, 2005
I wrote in my previous post that you should use http to access web part resources. Well guess what -- there is more to it.
If your WSS site is running with anonymous access off, then the attempt to get the resource will fail with a 401 Unauthorized error. This happens because web requests made in code will perform an anonymous GET.
In my specific case, I was attempting to read an XSLT file from the resource directory by passing the URL to the file. To solve the security issue, the Load() method on the XslTransform object needs a security resolver. The code necessary for this (which I copied from the .Net SDK):
' Build the URI to the resource Dim resourceURI As Uri = New Uri(ClassResourcePath) Dim xslPath As String = Path.Combine(resourceURI.ToString(), "filename.xsl")
' Create a secure resolver with default credentials. Dim resolver as XmlUrlResolver = new XmlUrlResolver() Dim sResolver as XmlSecureResolver = new XmlSecureResolver(resolver, xslPath) sResolver.Credentials = CredentialCache.DefaultCredentials
' Get the xsl file Dim trn As XslTransform = New XslTransform trn.Load(xslPath, sResolver)
 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.
|
|
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
|