April 21st, 2008 by dwollerman
Site templates can be very useful for an easy custom starting point for common site usage. Site templates can be saved from any site (except publishing sites for some reason…
). These site templates are stored into the site collections site template gallery as STP files. Once they are created a user with permissions can create sites within that site collection based on that template.
What happens if you want to use that site template to create a top level site in a site collection. When creating a site collection you are only shown available templates that are global to the entire farm. If you want to use your custom site template when creating a site collection follow the instructions below…
-
Create your site template (I assume you already know how to do this, but if not go to the site settings of any web and select "Save Site as Template")
-
Navigate to the site template gallery where the site template is saved. This will be under Site Settings -> Galleries -> Site Template Gallery.
-
Save the custom site template to the SharePoint server local drive.
-
Remote Desktop into the SharePoint server where the STP file has been saved, and open a command prompt.
-
Use STSADM to upload the template into the global templates list by using the STSADM -o AddTemplate command. For help with the AddTemplate command use STSADM -help addtemplate.
obviously make sure you either specify the path to stsadm in the command line, or as part of the server's PATH variable. Also, if you are not in the folder where the STP file exisits, you will have to specify the full path to the STP file as well. Remember if there are spaces anywhere in the path you will have to surround the full path with double quotes.
Posted in Uncategorized | Comments Off
April 11th, 2008 by dwollerman
We all know by now you can deploy features using a SharePoint solution package. This is a great addition for SharePoint developers as it easily allows us to quickly and efficently upgrade our customizations, plus it helps keep everything organized.
One thing I ran across was after deploying a solution that included a feature, I realized that I wanted to create a feature receiver for that feature to run some code upon activation and deactivation. I noticed that the feature is partially updated when running a solution upgrade. This means that the feature.xml is updated to look for the specified feature receiver class, but when you activate the feature after the upgrade you receive and error saying the receiver couldn't run.
My resolution that seemed to work for me was to reinstall the feature manually. I ran the following command and I was then able to activate the feature as normal and have the feature receiver kick off as well.
stsadm -o installfeature -name <featurename> -force
Posted in Uncategorized | Comments Off
April 11th, 2008 by dwollerman
Microsoft has a great piece of example code that you can copy and paste into your solution and start using on how to write to the SharePoint trace log. these are the log files that get created from setting up "Diagnostic Logging" under Central Administration -> Operations. I have used it in the past and it works pretty well.
http://msdn2.microsoft.com/en-us/library/aa979590.aspx
Posted in Uncategorized | Comments Off
April 10th, 2008 by dwollerman
This is a wierd issue I recently ran across. I was using remote debugging and I needed to copy over the PDB symbols file to the GAC. I used the command line to copy the file over to the appropiate location. I ran the command line down to the folder I needed to copy to in the GAC and left it open since I didn't want to write that out everytime I needed to update it. (I know I'm lazy, I should of and ended up writing a BAT file to do it for me).
With it left open I noticed that when I updated my solution it would fail and not deploy my assembly to the GAC. I realized that this was because I had the command window open to that folder. I didn't think that it would matter since it wasn't doing anything but sitting there. I closed the command window and re-deployed to my web applications and everything was fine after that.
Posted in Uncategorized | Comments Off
April 10th, 2008 by dwollerman
Like alot of people in the SharePoint development community I have been using a VPC to do debugging of code through SharePoint. I don't really like this because for one, running an enterprise level application plus visual studio with a laptop and 2GB of memory is very time consuming and can get frustrating at times.
With this said, I recently decided to look into remote debugging my SharePoint code from a client machine to the SharePoint server. I still didn't want to load up visual studio on the server either. Below are the steps that I took to accomplish remote debugging my SharePoint code.
-
Created a share on my client machine on my C:Program FilesMicrosoft Visual Studio 8Common7IDERemote Debugger folder.
-
Then I remoted into the SharePoint server and mapped a drive to connect to the share on my client machine.
-
Open the mapped drive on the server and navigate down the folders to x86msvsmon.exe and run it on the server through the share.
-
Once the remote debug monitor is running. Click on tools -> permissions to give the account your logged in as permissions to debug.
-
You will also need to deploy the PDB file generated by visual studio when it creates your assembly to the GAC as well on the server. You will need to copy via the command line utility or map a drive to it since it is not available through the folder structure in windows. the folder you have to copy the PDB file to is c:windowsassemblygac_msil<assemblyname><version>__<public key token>. You will need to replace the three place holders (identified with <>) with the appropiate names for your assembly. Once the PDB file is copied over to that folder location, you are ready to attach and debug
-
In visual studio, select attach to process from the debug menu
-
In the "Qualifier" text box enter the netbios name of the server that the remote debugging monitor is running. It should refresh the screen and connect to the remote debugging session on the server. You can verify by going to the server and looking at the remote debugging monitor to see who is connected.
-
I choose to change the types of code I will be attaching to. I used the "select…" button to remove TSQL from the list since it was causing issues and I wasn't debugging SQL anyway.
-
Select your process and happy debugging.
Good Luck!
Posted in Uncategorized | Comments Off
April 8th, 2008 by dwollerman
I recently was looking into programmatically setting up navigation in publishing sites and came across a scenario I felt I should share with the community so everyone is aware of it, and to see if there is any help with a workaround.
The scenario is that when a normal team site is created it uses the basic WSS navigation structure. This structure can be accessed from the SPWeb.Navigation class. In the site collection where the Team site is located, an administrator can activate the MOSS Publishing Infrastructure under the site collection features area, which will change the Team site navigation to the publishing navigation structure. This is not a big deal since it allows you to have more control over your navigation without all the publishing aspects being turned on within the Team site.
The problem occurs when trying to access this navigation programmatically. You see from the browser that the navigation is using the publishing structure, but you don't have access to the navigation programmatically using the PublishingWeb.Navigation class since the "Web" is not a "PublishingWeb". To make the web a publishingweb you need to activate the publishing feature at the web scope. The catch-22 occurs when you don't want the Team site to have publishing turned on at the web scope, but the publishing infrastructure is turned on at the site scope.
I haven't found a way to manipulate the publishing navigation pieces without having the publishing feature activates at the web scope. If anyone has any tips that would be very much appreciated, but for now the work around is to either configure it manually, or activate the publishing feature at the web scope.
Posted in Uncategorized | Comments Off
March 28th, 2008 by dwollerman
Ever needed to enchance the email for SharePoint alerts? Maybe you wanted to do…
|
Fields, such as the ItemName field, are truncated to 70 characters in the e-mail alert. To work around the 70-character limit, use the method that this article describes. |
|
You want to embed additional content in the e-mail alert. |
|
You want to change the layout or the appearance of the e-mail alert. |
Well now you can, Microsoft has released a support article (KB948321) that walks you through creating a custom alert handler to intercept the alert and apply a custom email template.
Thanks to KBAlertz for the notification!
Posted in Uncategorized | Comments Off
March 26th, 2008 by dwollerman
*** Update ***
Thanks to Dave Hunter pointing me to Ted Pattisons blog post that discusses the use of the Global template. Please visit the following blog post to learn more information on using the Global template with feature stapling.
http://blog.tedpattison.net/Lists/Posts/Post.aspx?List=80e51818%2D7b98%2D41d8%2Db313%2D955977ecd68f&ID=2
Posted in Uncategorized | Comments Off
March 26th, 2008 by dwollerman
The biggest issue related to the single site colleciton vs. multiple is the ability to drill down and find information manually. Every companies biggest hurdle is understanding that SharePoint is not just a single web site. It is a complete environment for your company. Also, companies love to adapt new technology, but their mindset on doing business never changes. Meaning that I contain all my customer information in a single manilla folder in a single drawer file cabinet. As I atract more customers I will need to adjust my organizational needs. I don't want to get big new fancy multi-drawer file cabinet and organize my information the same way in the sinlge manilla folder. I would need to re-think my methods, which include identifying the benefits of the new file cabinet and utilizing them to best fit my needs.
So back to SharePoint, with the use of it's many features such as, memberships, my sites, search, and site directorys and the use of well qualified individuals who maintain the content and design of the environment as a whole will go a long way to make life easier in the corporate intranet environment.
Life isn't all about drilling down, users don't go to the internet and drill down through millions of sites to find the one they need, they search. Even in sharepointblogs.com. You won't drill down to find my blog, you will search for it. Better yet, you might save it as a favorite. Bottom line is that the corporate intranet is catching up to the level of the internet, meaning it just isn't a single web site anymore, it is an entire network of sites where each site has it's own uses. This means that there will be multiple personality types using different methods to find the information they need.
As an example… I know that I am not going to find Receipies on how to bake a cake by drilling down through microsoft.com. And if I don't know where it is, then I will have to find another method, which is usually search. Once I find this great place, then I will save it. Its the same for the intranet now. Times are changing quickly and it doesn't matter how big the company is or how many users there are in the organization anymore. What matters is how they do business and how quickly they can react to changes in the business.
Posted in Uncategorized | Comments Off
March 4th, 2008 by dwollerman
I know this is probably not the best place to conduct a survey, but I am curious on how people are using managed paths to organize their environment and architect their taxonomy. If you are using managed paths in a SharePoint environment, please offer your experiences and settings here.
What I am looking for is just the managed path definition and what type it is. If you would like to offer up a description on what that path is designed for that would be great.
I DO NOT want to know anything about the company or organization affliated with the installation and configuration of the SharePoint managed paths. This is not meant for advertising or for publicity, I am strictly just looking for how they are being used so we as a community can have a better understanding on what they mean to us.
some of my examples…
/departments (Wildcard): use to identify a department
/portals (Wildcard): use to identify the use of a portal used by corporate, a department, or a division
/[deptname] (explicit): use for each department
/projects (Wildcard): use for project team sites; also can be used for integration with project server
/teams (Wildcard): use for team collaboration sites
Posted in Uncategorized | Comments Off