SharePoint - Installation of Guidance

by 7. August 2008 09:32

NOTE: In hindsight, now that I have successfully deployed the projects per steps outlined below, I now see (in my inexperience) that the steps below are to install a Template that can be used to create a site.  I didn't know what I it was that I was deploying which complicated matters for me, I assumed it to be a site. 

 The P&P SharePoint Guidance has the following instructions for installation:

Installation Instructions

  1. Download and unzip source code.
  2. Open TrainingManagement.sln in Visual Studio 2008.
  3. In Visual Studio, go to the properties of the Training Management project and, in the Debug section, specify the URL of the SharePoint site collection to deploy the project in the Start browser with URL field.
  4. In Visual Studio, right click on the Training Management project and click Deploy.
  5. In Visual Studio, right click on the Training Management Registration Approval workflow project and specify the same SharePoint URL to deploy the workflow to in the SharePoint Debug Settings. (Do not automatically associate the workflow.)

    Was doing great up to this point - then I received an error on step 6 "value cannot be null" Parameter name: uriString

  6. In Visual Studio, right click on the Training Management Registration Approval workflow project and click Deploy.
  7. In Visual Studio, Build the Accounting Management and HR Management projects and place the DLLs into the Global Assembly Cache.
  8. Run iisreset
  9. Go to the SharePoint site collection URL and create a site using the Training Management template.
  10. Create local Windows users "spgmanager" and "spgemployee". Add those users to the Training Management SharePoint site with Reader permissions.
  11. Associate the Registration Approval Workflow with the Registration list. (Create a new task list as part of the association and specify the workflow to start when a new item is added to the list.)

Performing the following for step 5 resulted in a successful deploy:

When I attempted to comply with the above for the TrainingManagement.RegistrationApproval project I receved the noted "Value cannot be null" error.   After trying different things I stumbled upon the "Target Site" property of the TrainingManagement.RegistrationApproval project.   The following properties are not present in the TrainingManagement project which has me assuming they are related to WorkFlow (you'll see why below):

Upon inputting my URL, which worked for deploying the TrainingManagement project - I received the following message (something I could work with).  I ASSUMED that the process would generate a site during deployment - the following gave me a clue to the problem; I was confused because the deployment for TrainingManagement reported that it was successful???

I create a TrainingManagement site and once again the Target Site setting in the project properties list reveals that I must have Document, Task or history list.   This is more like it - not an obscure "value cannot be null".

At this point I attempt to launch my SharePoint site (to create the required list) and it is down for the count - it appears the above crashed it into the ground.  Nothing a START | IISRESET /RESTART couldn't fix, after it was done my SharePoint site was back online. 

I added a Document Library (assuming it was a Document List) and still got the above error, tried a custom list - still no luck.   I then found "Tasks" under tracking and after creating it - Walla!, I was at the next step :)


Now I can understand the comment at the end of step 5 ==> (Do not automatically associate the workflow.)  I unchecked the checkbox, clicked on Finish and the TrainingManagement.RegistrationApproval project's properties were now populated with values.  The "Target List" property being populated with my "Customer List" makes me wonder if I would have encountered more complaints had I not created it....

I then right clicked on TrainingManagement.RegistrationApproval and DEPLOYMENT WAS SUCCESSFUL!

Step 7. notes that we have to update the GAC with the AccountingManagement and HRManagement DLLs.  If you are not comfortable with the Command prompt then you can take advantage of the project property page's Build Events tab - specifically the Post-Build, to do the work for you:



For your convenience I have the statement below so you can copy/paste it - the quotes are important!  Verify that you have the v6.1 sdk (you may have the 6.0) and update the path as applicable.

"C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin\gacutil" -I "$(TargetPath)"

I then completed step 10 and did the following in Step 11:

 

 

SharePoint 2007 - MOSS 2007 Developer Edition won't install on Windows Server 2008

by 24. July 2008 19:56

As soon as Windows Server 2008 became available on my MSDN subscription I installed it - I had installed the beta and was very impressed with the "Vista" look and feel (I've been developing under Vista since it was in beta) but was more impressed with the Remote Desktop services.  MOSS 2007 will be the first application I will be installing under it.

Microsoft Office SharePoint Server 2007 (MOSS) is on the top of my list to learn (along with WPF and Unity).   I downloaded the MOSS 2007 Developer Trial version (271 meg) and was disappointed to receive the following prompt:

I googled SharePoint Office Server 2007 Trial and found that the Standard and Enterprise Trials offer you the option to download two versions - I'm now downloading the version that has SP1.

I don't recall the developer edition offering the option to download a version with SP1 - after registration I just had a download button.

I believe the download information suggested that Windows SharePoint Services (WSS) 3.0 was a prerequisite for installation.  The following link suggested that installing WSS on Windows Server 2008 may be an adventure in itself http://blogs.msdn.com/sharepoint/archive/2007/07/20/installing-windows-server-2008-with-windows-sharepoint-services-3-0.aspx - we'll see....

Web Service Software Factory - BlueYonderAirLines tutorial contined....

by 24. July 2008 13:11

The Web Service Software Factory was my introduction to WCF and DSL's and I must say I was very VERY impressed.   The Web Service Software factory will be my tool of choice when working with WCF.   As great as the Tutorial was it assumed a wee bit to much knowledge on my part and ended somewhat abruptly - without and idea of how to use the many projects and classes that were generated for me.   For those like myself new to WCF the following is a continuation that will let you use the demo you created :)

New to WCF/WSSF?  Visit http://code.msdn.microsoft.com/ServiceFactory 

  • Topics Covered
    • Hands-on Lab continued - how to consume a WCF service (with and without Config file)
    • Assumptions that had me googling and burning hours...
    • Configure IIS for WCF

BYA.Mfg.SCM.Svc.WCF :: Tests :: BYA.Mfg.SCM.Svc.WCF.Client :: MainForm.cs 
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

using BYA.Mfg.SCM.Svc.WCF.Client.MaterialMgmtProxy;

namespace BYA.Mfg.SCM.Svc.WCF.Client
{
    public partial class MainForm : Form
    {
        PartsMgmtServiceContractClient client;

            public MainForm()
        {
            InitializeComponent();
            client = new PartsMgmtServiceContractClient("DefaultEndpoint");
        }

        // Utilizes App.Config
        private void ExecuteButton_Click(object sender, EventArgs e)
        {
            // Configure the request utilizing input - valid input
            // are "one" and "two" - all others will return 0 values
            DemandRequest request = new DemandRequest();
            request.AircraftPart = new AircraftPart();
            request.AircraftPart.Part = SearchText.Text;

            ResultsGrid grid = new ResultsGrid(client.GetRequirementDemand(request));
            grid.Show();
        }

-- OR --

        // Utilizes Channel
        private void ExecuteButton_Click(object sender, EventArgs e)
        {
            // Configure the request utilizing input - valid input
            // are "one" and "two" - all others will return 0 values
            DemandRequest request = new DemandRequest();
            request.AircraftPart = new AircraftPart();
            request.AircraftPart.Part = SearchText.Text;

            BasicHttpBinding binding = new BasicHttpBinding();
            EndpointAddress endPoint = new EndpointAddress("http://localhost:2035/BYA.Mfg.SCM.Svc.WCF.Host/MaterialMgmt.svc");

            ChannelFactory<PartsMgmtServiceContract> channelFactory =
                new ChannelFactory<PartsMgmtServiceContract>(binding, endPoint);

            PartsMgmtServiceContract service = channelFactory.CreateChannel();

            DemandResponse response = service.GetRequirementDemand(new DemandRequest1(request));

            ResultsGrid grid = new ResultsGrid(response.PartLevel);
            grid.Show();

        }
    }
}

Be sure to read this blog on WCF Proxy Wrapper - it holds important information disposing!

SQL Server 2005 - How to Install Samples

by 24. July 2008 12:31

With our folder monitor being overrun (processing taking to long) we brain-stormed numerous ways to get over 50,000 images to process (our load test) without dropping an image.   A team member suggested SQL Server 2005 Notification Services as a possible solution. Thus began my adventure to create a prototype; samples are not installed by default and they aren't as easy to install as one might think....

I've come to gain a huge respect for Microsoft Tutorials; I find they consistently save hours of time and now (more than ever) provide an abundance of information and details.   As I opened the tutorial for Notification Services it told me I had to setup SMTP and install the Samples.   I installed the SQL Server 2005 Standard Edition CD and selected tools (I'm running from memory) and after some churning and burning it came back with a dialog box that told me I had process Sql Server Tools from the control panel's programs feature.  This is where the fun started because there is no SQL Server Tools in the program list.

Longgggg story short - you have to remove SQL Server 2005 (I needed to get the samples installed so was going to uninstall everything and reinstall).  If this sounds odd to you, that you have to remove SQL Server 2005 to install your samples, then we think alike - you really don't have to remove SQL Server 2005 but this isn't readily apparent and I never would have figured it out had I not been so frustrated that I decided to remove it.... to my surprise the SQL Server 2005 REMOVE button results in a checkbox list of items to remove - one of them being SQL Server Tools!!!

I unstalled SQL Server Tools, went back to the installation process, had it install everything and was happy to see my samples folder and files!  After hours of effort I was ready to work.

Visio - Classifier does not show up in dropdown list

by 24. July 2008 12:06

Some of the classes are not being properly imported into Visio resulting in them not showing up in the classifier list (specifically while trying to declare a sequence diagram object LifeLine).  Numerous attempts of making copies, moving to other projects and then back failed....  The following is the workaround that I found to work:

Note in figure 1 that BuildFailedException is not available in the Visio classifier list, without it we'll be unable to add it to our sequence diagram....

 

If we create a new class with the same name we'll have two of them in our list???  Curious as to why the other one now shows up... If we go back and delete the one we just added they will both drop from the list....

The solution is to keep the new class entry and drag/drop all of it's methods and properties into the new class.  From that point on Visio will display the class so that it can be used.   Not an optimal solution but sure beats having to reenter all of the properties, methods and the method parameters.

Tags: , ,

Visio - How to reverse engineering VS2008 (hack)

by 22. July 2008 08:15

I found a work-around for those of you, like myselt, that are not in a position to take risk trying to hack the registry and don't want to switch from Visio; it is only a few steps and has worked on every project I've tried it on (at least 5 last night).

  1. Open the project in notepad (remove the readonly attribute if under source control)
  2. Find the following statement    <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  3. Change it to   <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />  (we're changing Tools to Bin)
  4. Save the file
  5. Load the project in Visual Studio 2005 (Visio for Architects) and reverse engineer the project.
  6. Reverse steps 2 and 3, save and restore the readonly attribute if applicable.

I also changed a Visual Studio 2008 Solution header (in notepad) from version 10.00 to 9.00 (VS2005) and was able to load the solution and the projects I made the above changes to so I could more easily reverse engineer them.   I trust in the very near future I'll write a program to do these few steps but for now I'm content with having access to the objects so that I can diagram with them without having to manually add them.


FYI, the following MSDN article covers MSBuildToolsPath / MSBuildBinPath if your interested:
http://msdn.microsoft.com/en-us/library/bb397428.aspx

Related post in the MSDN Architecture & Design forum:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3654817&SiteID=1&mode=1

Tags:

Notice

Blog videos and references to CodePlex projects are no longer valid