Thursday, November 06, 2008

Resolved: Installing Silver Tools Beta 2 with Visual Studio 2008 SP1

If you have Visual Studio 2008 SP1 installed and you are attempting to install Silverlight Tools Beta 2 (silverlight_chainer.exe), you may have run into the following error:

The installation failed with the following message: Fatal error during installation. Click the Finish button to exist.






If you open the log file and scroll to the bottom, you may find an error similar to this:

Original exit code: c:\a50aad885dc5172be00e9656bfb3\Silverlight.2.0_Developer.exe returned non-MSI error code: 0x5de - The event log file is full.

If you attempt to run that executable, you will likely get an error that a newer version already exists. The interesting part is this executable is trying to install the "developer" version of Sliverlight (which allows for debugging as I understand).

I went to Control Panel --> Add or Remove Programs and removed Silverlight. I then ran that executable again and voila, it worked.

I then ran the silverlight_chainer.exe again.

Surprise surprise! It worked!

--------------

I just found out that there is a Silverlight release for Visual Studio 2008 SP1.

Tuesday, October 28, 2008

Using Workflow with ASP.NET: Setting up a database

I will be writing a series on using Workflow with ASP.NET. For now, I will just be adding tidbits on how to set things up.

First, you will need to persist (and track) your workflows to a sql server database. To do so (taken from MSDN), create a new database and run the following scripts:

%windir%\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\SQL\EN\SqlPersistenceService_Schema.sql

%windir%\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\SQL\EN\Tracking_Schema.sql

%windir%\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\SQL\EN\SqlPersistenceService_Logic.sql

%windir%\Microsoft.Net\Framework\v3.0\Windows Workflow Foundation\SQL\EN\Tracking_Logic.sql

Thursday, October 23, 2008

Visual Studio 2008: Error When Opening Workflow Designer

You may run into this error when you upgrade to Visual Studio 2008 and attempt to view a workflow in the designer:

there is no editor available for [..] make sure the application for the file type (.cs) is installed

I first attempted to reset settings for Visual Studio and that didn't do it. I re-installed Visual Studio 2008 and kept getting the same error. Little did I pay attention to the output window! It was already telling me how to fix it:

The Microsoft.Workflow.VSDesigner.DesignerPackage, Microsoft.Workflow.VSDesigner, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 ({FD526733-BD72-4F81-BEEC-BEB06E2AF59F}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt.

And so, I ran that command (if you don't have your system variables set up, you may have to browse to folder where the IDE executable resides. For example: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE).

Monday, October 13, 2008

SQL Server and "User Instance" Error: The user instance login flag is not supported on this version of SQL Server. The connection will be closed

If you attempt using the membership/role providers with the .NET framework 2.0, you may get the following error:

The user instance login flag is not supported on this version of SQL Server. The connection will be closed

There could be a number of reasons:

1) You have not run the aspnet_regsql (in the C:\Windows\Microsoft .NET\Framework..) folder to register the required stored procedures for the membership and/or role providers.

2) You are not using SQL Server Express and your connection string has User Instance=True.

3) You downloaded a starter kit and trying to point it to a SQL Server 2005 instance and haven't modified the default Web.config (or forgot to remove User Instance=True in the connection string).

What's the User Instance flag used for?

It is only supported for the express edition of SQL Server. It allows running applications under a least-privilege user account (LUA).

It allows the creation of a separate SQL Server Express instance (spunned off the parent instance) that runs under the security context of the current user. You can read more here.

Rebuilding the master DB for SQL Server 2005

I was starting the SQL Server 2005 instance. The service failed to start.

I checked the event log and found the following error:

Error 2(The system cannot find the file specified.) occurred while opening file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.

I went to that folder and sure enough, the master database does not exist. So how do you build one? It appears that you have to change the installation in order to do that.

Control Panel --> Add/Remove Programs --> Microsoft SQL Server 2005.

Click on Change. You should get a Microsoft SQL Server 2005 Maintenance dialogue.

First: Component Selection --> Select the troubled instance.

Next.

Second: Feature Maintenance --> I selected Database Engine.

Next. That should start a Microsoft SQL Server 2005 Setup Dialogue.

Thursday, September 18, 2008

Changing the owner of tables

Taken from: http://weblogs.asp.net/owscott/archive/2004/01/30/65229.aspx

The below helps changing ownership of tables (not database. You can follow the same principle to change other types of objects). Please note running the below would could limit access to these tables.

DECLARE @old sysname, @new sysname, @sql varchar(1000)
SELECT
@old = 'OldOwner'
, @new = 'dbo'
, @sql = '
IF EXISTS (SELECT NULL FROM INFORMATION_SCHEMA.TABLES
WHERE
QUOTENAME(TABLE_SCHEMA)+''.''+QUOTENAME(TABLE_NAME) = ''?''
AND TABLE_SCHEMA = '''
+ @old + '''
)
EXECUTE sp_changeobjectowner ''?'', '''
+ @new + ''''
EXECUTE sp_MSforeachtable @sql

Changing database owner when dbo is associated with a sql or windows account

You may have run into a situation where the dbo role is associated with a sql or a windows account (as you create objects under that identity). The problem? If you attempt to delete the account or remove its mappings (User Mapping under the properties of that account), you will get the following error:

Drop failed for User 'dbo'.

...

Cannot drop the database owner. (Microsoft SQL Server, Error: 15181)




The best way that I have found to go around this is to re-associate dbo with "sa" by using the sp_changedbowner stored procedure:

EXEC sp_changedbowner 'sa'

(Note: make sure you use "USE databaseName" or run the SP in the context of the database)

Wednesday, May 07, 2008

Search request was unable to connect to the Search Service

The search request was unable to connect to the Search Service.

Resolution: make sure the correct ports are open between server if you have your index and query servers on different boxes within your MOSS farm. Also, the correct roles need to be selected for each of these servers in the central administration.

Sunday, March 16, 2008

The language is not supported on the server - Office SharePoint Server2007 installation

I got the following error while trying to create a list based on a custom template:

The language is not supported on the server - Office SharePoint Server2007 installation

I came across this post but that did not seem to resolve my problem even after restarting the server.

Comparing other servers in the farm, I noticed that HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0 was actually missing InstalledLanguages.

So I saved the following to a .reg file, double-clicked and voila! It worked like a charm:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\InstalledLanguages]"1033"="12.0.4518.1016"

SharePoint 2007 (MOSS): DST is the root of all evil!

I'm leading a project to convert our MCMS implementation to MOSS. Migrations have been working great until recently. What changed, one might wonder?

It's this time of the year where daylight savings reeks havoc! The issue is the Windows Sharepoint Timer Service (you can find it under Admin Tools --> Services) could take an hour or longer to run your jobs.

So if you create Web applications, for instance, in a farm, it would take MOSS an hour to actually provision these sites. So before you drive yourself crazy, here are some tricks (if you don't want to take the risk of applying SP1, or MS hotfixes, which are often unreliable!):

Look at the job definitions under Operations and verify the job in question is listed.

If it is, then you can force it by running the following command:

"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o execAdmSvcJobs

Remember that you need to run this command on all your Web servers in the farm.