Development
General development thoughts and comments.
Since I spent so many hours on this, I figured I'll post this to remember...
When copying SPFiles from one doc library to another, a few things to keep in mind:
SPFileVersion will not let you get a reference to the SPFile (per MSDN) so don't do this: SPWeb.GetFile(SPFileVersion.Url) because SPFile.Item will be null
SPFileVersionCollection (SPFile.Versions) is not in sync with SPListItemVersionCollection. SPFile.Versions actually does NOT return the current version. So, iterate through all SPFileVersions and use SPFile.Versions.GetVersionFromLabel(SPListItemVersion.VersionLabel)
To keep the check in comments with each version, use the following method to add...
SubText is my choice blogging app for this Blog. It's .Net based, open source, and just nifty. Yesterday I had a cow with it though. The contact form refused to send notification e-mails. No error was generated. That was confusing, discouraging and frustrating -- since potential clients contact me via this blog.
There were only two places that I knew of where changes could be made to the e-mail delivery mechanism. web.config file to set the smtp server and the contact form code to execute the delivery.
The mystery deepened when I could setup SubText on a couple of spare servers....
"The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly.."
This error sometimes shows up in the Crawl Log in the SSP.
The issue in my case was a custom database that the crawler account did not have access to. Of course an easy way to figure this out is to login to the website as the crawler account -- to see what it sees... It worked. A quick adjustment of SQL permissions and voila, we're crawling again.
Pesky little thing. MS introduced a loopback security check for websites accessed locally on the server.
To fix:http://support.microsoft.com/kb/896861
Click Start, click Run, type regedit, and then click OK.
In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Right-click Lsa, point to New, and then click DWORD Value.
Type DisableLoopbackCheck, and then press ENTER.
Right-click DisableLoopbackCheck, and then click Modify.
In the Value data box, type 1, and then click OK.
Quit Registry Editor, and then restart your computer.
You should. But here is a tool that can help get it:
http://www.infopathdev.com/files/folders/help_files/entry25827.aspx
When deploying custom SPOneTimeSchedule job definitions sometimes the timer service (OWSTIMER.EXE) just sorta sits there. Your job definition is created, but isn't executed. It will most likely eventually run, but I have better things to do than sit around wait for it. Setting the time for the job in the past seems to move things along faster.
// Create new job
CustomJob MyJob = new CustomJob(Constants.JOB_NAME, webApp, properties.Definition.DisplayName);
MyJob.Title = Constants.JOB_TITLE;
// Set up the job to run once
MyJob.Schedule = new SPOneTimeSchedule(DateTime.Now.AddHours(-4));
MyJob.Update();
Do you know the difference between .Net CLR versions? Is 2.0.50727.1433 newere than 2.0.50727.42? What's the difference?
Here is a nice reference:
http://alt.pluralsight.com/wiki/default.aspx/Keith/DotnetVersionWiki.html
What should be a simple engagement turned into a headache this evening. Importing from Excel in Sql 2005 has become more cumbersome due to various 'issues' with the import/export wizard. So here is a good solution:
SELECT * INTO XLImport4 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Excel 8.0;Database=C:\test\xltest.xls', [Customers$])
May have to enable Ad Hoc Remote queries in SAC.
May have to place the Excel file on the SQL server's file system.
Reference: http://support.microsoft.com/kb/321686/en-us
UPDATE: There is another way, it's a Sitewide Tracking code, under Options, Configure, in your SubText management UI. (version 2.0+)
SubText is the blog engine of my choice. Skinning is simple, it's free, it's written in .Net and it's feature rich. Now if I we could only get some visitor stats. Google Analytics to the rescue.
JavaScript tracking code is what makes GA work. Adding the tracking code to SubText was simple enough. DTP.asxp is the page that SubText uses to dynamically render content. So we just insert the JavaScript snippet right above the </body> tag and we're all set.
GA takes a...
I thought the name for this module is perfect. It's a gallery module that lots you page a single folder with arrows. I'll improve the basics at some point, but for now, it is what it is.
Download theOh So Simple Gallery all zipped up and ready to go.
Warning: download and use at your risk. you should be comfortable with vb.net to fix anything or to make improvements.
http://www.oaksvillage.org/default.apsx is still under development. But the pure CSS skin with DNN backend is ready. Thanks to a very friendly graphic designer the site looks very nice. Next step is SEO and analytics software hookup!
Frustrations include the fact that DNN does not produce validatable code. So, I ended up with quirksmode in transitional HTML. I ended up using the new DNN:Nav navigation control. CSS flow box drop-down was fixed by overflow:hidden and using an admin skin for editing content in controls that would otherwise break the page. A day's labor.
I'm using my home-made javascript transition module that I used MooTools...
About a year ago I've started to focus on two technologies to develop websites with. Dot Net Nuke and SharePoint. Both products are .Net based and Microsoft backed. At the end of this post are links to articles that do a good job comparing the two frameworks. Needless to say, as frameworks, these products vary greatly in the way you can accomplish your goals. Nevertheless, having the common thread of .Net makes them similiar in so many ways.
I'm excited to continue to explore (and amazed at) some of the powerful tools that each product provides out of the box. As...