Posted by Steve Pietrek on January 30, 2008
I’m heading to Chicago tomorrow for the Sleepless in Chicago event. Pretty psyched, though a little nervous about staying up all night. I usually in bed by 10:30 pm every night and can’t remember the last time I stayed up past 2:00 am let alone all night.
Wish me luck!
Posted in SPGeneral | No Comments »
Posted by Steve Pietrek on January 30, 2008
OK, learn something new everyday. After the success of creating a custom application.master and applying it correctly (I am currently using Method #1 until I can find the time to do an application development method), I ran into an issue creating a new list column. Within IE7, I received an “undefined or null” script error. Firefox wouldn’t do anything.
Fired up Firebug and reviewed the SubmitPage() method. Set a few breakpoints and realized the FrmSubmit object is undefined. Doh!
Realizing the FrmSubmit information is set by the PlaceHolderUtilityContent placeholder, I quickly saw my error. The problem was I had embedded the PlaceHolderUtilityContent placeholder within the main <Form>. Moved the following line outside of </form> but above </body> and I am good to go.
<asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"></asp:ContentPlaceHolder>
Posted in SPErrors | No Comments »
Posted by Steve Pietrek on January 29, 2008
I have been doing some research on customizing application.master. I found a good KB on Microsoft’s web site listing two ways to customize application.master.
-
Customize the files in the Layouts folder (recommended)
-
Create a custom Layouts folder
The two methods above work well.
I have been messing around with an application development method using a feature, HttpModule, and SPWebConfigModification. The premise of the feature is for every page, in the PreInit event, I check to see if the page’s current MasterPageFile is application.master. If it is, I set the MasterPageFile to my custom application.master. I plan on blogging on this method soon.
Posted in SPAdmin | 1 Comment »
Posted by Steve Pietrek on January 29, 2008
Today I was modifying application.master and ran into the following error:
“Cannot convert type ‘Microsoft.SharePoint.WebControls.DelegateControl’ to ‘System.Web.UI.IAttributeAccessor’”
Instead of following my own advice on disabling My Site and My Links, I commented out the two lines in the custom Master File I created. I copied the commented code from my custom Master File to application.master. When I refreshed the page, I received the error above. At least for the two lines I commented out, SPD adds characters for spaces and such. It does not cause any issues for end-user Master Pages but it does for application.master. Figuring that was the issue, I put back the correct code and uncommented. Error went away.
Posted in SPErrors | No Comments »
Posted by Steve Pietrek on January 10, 2008
CANCELLED
The January Cincinnati SharePoint User Group meeting will take place on 1/14 at 6:00 pm at MAX Technical Training in Mason. Check out the website. There are two sessions:
- Sharepoint integrating with Document Management, Caleb Miller, Tahoe Partners
- Integrating Enterprise Data with SharePoint: Using The BDC, Steve Caravajal, PhD, Microsoft Corporation
Posted in SPUserGroups | No Comments »
Posted by Steve Pietrek on January 2, 2008
Update: Please see this post for a better alternative.
I have been creating feature receivers which I installed to the GAC. Of course I ran into issues and needed to debug the code. Below are the steps I ran through to do so:
- Install the assembly to the GAC. There are a few ways of doing this. First, create a WSP file which installs the assembly to the GAC. Second, you can use gacutil.exe to install it.
- Select Start - Run and type in %SYSTEMROOT%\Assembly\GAC_MSIL
- Open the folder which contains the DLL.
- Open the folder with the version number and public key you are interested in.
- Open Visual Studio 2005 or Visual Studio 2008.
- In the Solution Explorer, right-click on the solution and select Properties.
- On the Build tab, set the Output Path to the folder which contains the DLL (the folder in step #4).
- Build the project. This will copy in the PDB file to the GAC folder.
- Select Debug-Attach to Process.
- Select the correct w3wp process. To know the correct w3wp process, see this post.
- Set breakpoints accordingly.
- Execute code by activating/deactivating the feature in browser.
Note: I need to do some more research on this but the breakpoints were not hit if I activated/deactivated the feature using STSADM. Breakpoints were only hit when I activated/deactivated the feature in the browser. Just something to be aware of.
Posted in SPDev | 2 Comments »