Posts Tagged ‘microsoft’

Guide: MOSS 2007 Multiple site collections on Port 80

Thursday, December 9th, 2010

Requirement: multiple site collections on port 80 on unique URLs in SharePoint 2007, e.g,. http://democlient1, http://someotherdemo
The scenario: you have one development machine which you use for multiple clients. Because of this, you want to host multiple site collections and allow a unique URL for each, without having to specify the port number in the URL. For example, if your machine name is SPDEV then by default your primary web application will respond on http://spdev. But you also want to have http://democlient1, http://someotherdemo, etc. There are a three ways of doing this. The two common ways are 1) assign unique IP addresses to each web application each responding on port 80, but this can be more complicated to setup and manage at the machine level, or 2) Use a non-standard port number for each web application, but this creates uglier URLs, e.g., http://democlient1:18765, http://someotherdemo:18734 etc.

Solution: It’s possible to achieve the requirement.
(more…)

Reporting a product bug to Microsoft

Friday, March 12th, 2010

I needed to update our installation of SQL Server 2008 to include Integration Services so that maintenance plans would run. I have local admin privilege on the machine, but as with most Microsoft related installation tasks, you routinely get so far through the process and you’re hit with the SeSecurityPrivilege error – that is, you don’t have some permission or other. The installation process goes wrong and you have to cancel out of the whole process in order to restart it with an account that has the privilege.

Except in this case, that doesn’t actually work – there’s a bug in the SQL Server 2008 installation mechanise.

SQL Server 2008 installation error

SQL Server 2008 installation error

Clicking Retry fails again because you don’t have the privilege.
Clicking Cancel fails… because you don’t have the privilege.

Granted, it’s a fairly obscure bug, but it’s a bug nonetheless. My only option is to physically kill a process, and I really don’t like doing that sort of operation on production machines which are half way through trying to update the configuration of a live SQL server*.

I figured I’d report the issue to someone at Microsoft. Long story short, after a bit of hunting around, the endeavour was futile (as per this guy and this guy) and I can’t find a single way to report a bug to Microsoft about their arsing software (that doesn’t involve going through direct support channels, paying fees, checking license blah blah blah. I care about this a bit… but not that much.)

I’m sure someone somewhere in Microsoft’s vast array of tech support type people could monitor a “bugs@microsoft.com” email address and actually help to listen to its customers. I love my Mac.. I don’t know if a bug reporting mechanism exists as above… but then I’ve never had to do it. [CueFlame] “They just work” ! [/Flame]

* As it turns out, this is actually a serious issue. Manually killing the installation process halfway through means the installation files that it creates aren’t rolled back/destroyed. So when you then go run the installation again… SQL Server thinks you’ve already installed the thing you’re trying to install. So you’re then faced with “repair”-ing an instance which is absolutely fine.

Workflow error help: failed on start and more

Thursday, July 16th, 2009

One of the major selling points of SharePoint is the power of workflows. Designing very basic sequential workflows in Sharepoint Designer 2007 is a very straightforward task using the workflow designer wizard. But unfortunately straightforward is the key word here, as you are limited by the functionality available to you in SharePoint Designer. Simple tasks (e.g., update an item, send an email, etc.) are doable, but, for example, you can’t do any string manipulation other than building “dynamic strings”. So even creating a suitable subject line to an email can require a complicated collection of variables and such like. SPD workflows are also very much “single use” – i.e., they start, they run, they finish. They can wait and so on, but complicated business logic is pretty difficult to program. At that point, you’ll need to get involved with Visual Studio. That’s not without its difficulties, however, and as someone coming from a Visual Studio software background, creating workflows can be a minefield. Certain expectations you may have with Winforms just go completely out the window.

So here are some observations, hints and tips that I’ve picked up during my time with workflows and Visual Studio. Note that I’m using Visual Studio 2008 on an all in one MOSS2007 box (i.e., my development machine) to write these workflows. VS2008 does all of the debugging and deployment for you – if you’re on VS2005 then the process is a little different, as you have to manually develop the XML files that make up the package (which is beyond the scope of this).

1. Workflows don’t run at all – For security reasons, the workflow engine might not run at all if the web application pool is running as an administrative account. You can change the application pool to a network service in central administration.
2. Workflow failed to start (retrying) – this is a horrible error message. First thing to check is that the correlationtoken is set properly – in theory it should be as VS wouldn’t let you start debugging if it wasn’t. For anyone trying to get their head around what a correlationtoken is, don’t fret too much – it’s just a unique “key” that identifies the workflow. For your WorkflowActivated activity, you could set the token as “WorkflowActivatedToken” and then set the OwnerActivityName to the root class of your workflow. You can use the same correlationtoken for all activities in your workflow EXCEPT to say that logical units of the workflow (e.g., things surrounding the creation/use of tasks etc.) should get a separate token.
2b. Note: If you change the name of your class i.e., from Workflow1 to MyAwesomeWorkflow, Visual Studio unhelpfully does NOT update the workflow.xml file – you should do this manually
2c. Note: Sharepoint does a lot of logging some helpful, some not. If you trawl through the logs, you’ll usually get a step in the right direction to tracking down your errors. The logs are by default in : %Program Files%\Common Files\Microsoft Shared\web server extensions\12\LOGS
3. Activity/workflow properties can be empty -  In the properties of each your activities/methods, you don’t need to fill in all of the details. In fact, most of them will be empty, e.g., a method doesn’t necessarily need a MethodInvoking method if you don’t need to do anything more complex with it. In fact, my experience is to be as minimal as possible. By setting some apparantly insignificant properties or asking VS to create your eventhandlers, you can end up with a lot of extra code that you just don’t need. Always pick through the codefile and identify things that can be simplified or removed.

I’ll add more as I come across them, but for now here is a useful link for basic workflowing in Sharepoint / MOSS 2007 and Visual Studio 2008 which has a lovely video you can watch.

Microsoft software: an example

Wednesday, September 10th, 2008

The “I hate Microsoft brigade” vs the “I love Microsoft brigade” have debated for eons the merits of the company. The argument will rage until you and I are long gone. Personally, I don’t hate Microsoft as a corporation, I’m by no means their biggest fan, but I have no reason to hate them and it’s irrefutable that they created the computer industry as it is today. But I do have issues with some of their software. It’s a boring subject, so I’m not going to bang on about the evils of the Microsoft and laud the wonder that is Apple. It’s a pointless no-win argument – some people like Microsoft, some people like Apple. You choose, and you do what you want.

But here is a good example why Microsoft software has a bad reputation.

(more…)