Showing posts with label Sharepoint 2007. Show all posts
Showing posts with label Sharepoint 2007. Show all posts

Sunday, November 28, 2010

My SharePoint Development Environment

I have seen many blog posts on using a variety of configurations to run SharePoint 2010, MOSS, WSS, etc. Most of the solutions that I have seen, they revolved around having a hosted machine to run the development environment.

Face it, developing SharePoint solutions is not an easy task. There are so many different factors that can affect your results. The best way IMHO, to create SharePoint solutions is to have a SERVER OS Environment. Since Microsoft VM does not support creating 64bit images, you are left with either Sun’s VirtualBox or VMWare. Regardless of which of these 2 you choose, you still have to deal with the fact that you will run a hosted environment inside your machine.

One of the cool tip I got from AC (#BuckeyeSPUG meeting), was to use Windows Virtual Host. Since I am running Windows 7 x64 Ultimate, I decide to give it a try. This is my laptop configuration:

Hardware: Dell Vostro 1520, 6GB RAM, 320GB HD. OS: Win7 x64 Ultimate edition.

Step 1: Make sure your laptop supports Hardware Virtualization. You will need to enable this setting on your BIOS. If you have the Dell Vostro 1510 you are out of luck (asked me how I know… ;). A: It supports virtualization, but it is disable on the bios.. WTF..!

Step 2: You need to get a bootable image. For more information, check this article on Technet about VHD Support in Win7.

You will need to use the Windows Image to Virtual converter tool Wim2VHD. Get it from http://Code.msdn.microsoft.com/wim2vhd

Get your Win2008_R2 iso and mount it. Run the following command to extract a bootable image. In my case, the iso image is mounted on the F: drive. Also, I put all of the output inside a root folder named vhd.

  • cscript wim2vhd.wsf
    • /WIM:f:\sources\install.wim
    • /SKU:SERVERSTANDARD
    • /SIZE:51200
    • /VHD:c:\vhd\SP2010\win2k8_r2SP2010.vhd

Step 3: Now you need to get familiar with BCDEdit (Boot Configuration Data Store Editor). .

Once you have your bootable image, then you can create multiple boot configurations:

bcdedit /copy {current} /d "Win2008R2 SP2010 Base Dev"

This will return a GUID. Copy that GUID, you will need it for another step.

image

bcdedit /set {returnedGUID-in-here} device vhd="[c:]\vhd\Base2010\win2k8_r2SP2010.vhd"
bcdedit /set {returnedGUID-in-here} osdevice vhd="[c:]\vhd\Base2010\win2k8_r2SP2010.vhd"

Now when you reboot, you will see another entry in your boot menu:

image

Pros: I can run my virtualized environment with full access to 6GB of RAM and no overhead of running a host system.

image

Pros: Another benefit is that I dont have to go buy a Solid State drive to see the improved performance.

Pros: You can attach/managed any VHD using your Win7 Disk Management Console

Pros: The best part of this configuration = MULTIPLE MONITORS.... :)

Wednesday, September 22, 2010

How to Pre-Populate MySites with Pictures in SharePoint

Allowing MySites in a SharePoint environment is good.  But you have to put some governance into it.

Maybe one of the requirements from the HR department is to have only official taken pictures of all employees.  Make this easy to update, but do not allow the employee to change that information.

It's not me, nor you... ;)

Maybe, we need to avoid employees from uploading pictures on reflectives surfaces (bing keywords: ebay pictures kettle).

Anyways, the solution is to give control where control is needed.  In our case, we want the HR department to control what pictures are displayed and we want this process to be painless for them.

I have seen another solution in which they store the picture inside the AD.  But that solution is very cumbersome and not very user friendly.  Not to mention, that it will make the size of your AD database grow exponentially.

Here is an easier way.  Store the pictures in a picture library and then just store the url inside a custom field in your AD. There are 5 easy steps.

image

Step 1:  create a picture library to hold pictures (duh.)

Step 2: Modify your AD to put the url of the picture into the ExtensionAttribute1 field

image

Step 3: Map your AD field to the SharePoint field, and don't forget to set this field to Read-Only mode

image

mapped the field.

image

Step 4: import your user profiles from AD

Step 5: crawl through the user profiles to populate the information.

To test this, perform a search

image

there, Picture is display correctly.!

Tuesday, June 29, 2010

How to remove SQL Mirroring from MOSS 2007

So mirroring technology with SharePoint 2007 does not seem to be working as expected. As a consequence, the decision to remove it from our production servers was made.

I have been trying to remove the mirroring from the SQL Serve 2008 R2, and it still shows the Mirror Databases on the secondary server.  Worse, the status does not change, it is still showing as (Restoring).

image

from the MSDN, this is supposed to be an easy step: ms189112 but it is not.!

As you can see, my SQL1 server has the actual databases, while SQL2 is supposed to have the mirrors of SQL1.

A quick search on the internet turned nothing to the (Restoring…) status message.  Connecting to the second SQL Server and trying to delete the database were encountered with failure.

TITLE: Microsoft SQL Server Management Studio
------------------------------

Alter failed for Database 'SPSProd_Main_Search'.  (Microsoft.SqlServer.Smo)

For help, click: Some useless article on MSDN

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

ALTER DATABASE is not permitted while a database is in the Restoring state.
ALTER DATABASE statement failed. (Microsoft SQL Server, Error: 5052)

  Then I went into the query editor and ran the

DROP DATABASE <databasename> from the master databases. It worked.!

image 


Command(s) completed successfully.!  :)

Thursday, October 30, 2008

How to configure a MOSS VPC Development image

On the Microsoft TechNet site, there is a couple of articles on how to set up a MOSS environment. Following those steps will give you a good environment.  However, I have found that there is not that much control over the naming of the databases.  This is fine, but then you have to come back and do some extra steps to rename them correctly.  These are the steps that I follow to avoid having to come back and do all of that work.

I have already configure a VPC image with Windows Server 2003, SQL Server, Visual Studio 2008, etc.  I have also set it up as a Domain Controller (DC) and create a couple of accounts (SharepointService, SQLService, etc).

There are instructions on TechNet on how to setup the SQL Server before setting the MOSS environment: Prepare the Database servers. Follow those steps.

Now start the MOSS setup, select the Advance installation

image

I choose to install the Web Front End, since it gives me the most flexibility

image

Once this step has finished running, this is a good point to rename the Content DB's.

image

Do not run the configuration wizard yet.

image

Uncheck and close this window. Now use the psConfig utility, which it is available on this location:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

parameter value
Server MossOnlyAW
Domain MOSSBSG
User SharepointService
Password *********
Config DB name STS_Config
Admin Content DB name STS_AdminContent

this is the parameters to configure the initial Databases

psconfig.exe
  -cmd configdb
  -create -server MossOnlyAW  
  -database STS_Config
  -user MOSSBSG\SharepointService
  -password <myPassword> 
  -admincontentdatabase STS_AdminContent

Run this from the command prompt window and you will get the following results:

SharePoint Products and Technologies Configuration Wizard version 12.0.4518.101
Copyright (C) Microsoft Corporation 2005. All rights reserved.

Performing configuration task 1 of 3
Initializing SharePoint Products and Technologies configuration...

Successfully initialized the SharePoint Products and Technologies configuration

Performing configuration task 2 of 3
Creating the configuration database...

Successfully created the configuration database.

Performing configuration task 3 of 3
Finalizing the SharePoint Products and Technologies configuration...

Successfully completed the SharePoint Products and Technologies configuration.

Total number of configuration settings run: 3
Total number of successful configuration settings: 3
Total number of unsuccessful configuration settings: 0
Successfully stopped the configuration of SharePoint Products and Technologies.
Configuration of the SharePoint Products and Technologies has succeeded.

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>

now if you check your SQL server, you will see the 2 databases that were created, it also went and added that SharepointService account to the valid logins in your SQL Server.

image

Now go ahead and run the SharePoint Configuration Wizard. It will pick the databases that you have created, do not disconnect from this server farm:

image

I like to specify a port number that is easy to remember

image

Gotchas:  You might run into an error if the service account does not have enough rights:

Server Error in '/' Application.
--------------------------------------------------------------------------------

The current identity (MOSSBSG\SharepointService) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.

so open up this folder and add the SharepointService account to the list of  authorized users. Give this account access to modify.

image

Close the browser and re-open the Central Administration page. You can now start to configure your MOSS sites.

Wednesday, November 21, 2007

How to edit rich text in SharePoint 2007 forms

Since I have been using Window Live Writer, I have not had the need to write all of that html code (what is HTML?). I edit using Live Writer, and then I switch to HTML view, copy and paste the formatted text into the SharePoint text box. I thought it was weird that Microsoft will only give a blank text box and you need to go and figure out all of the markup tags.



Then I saw on this other developer screen that his text boxes look a lot different from mine..!!



Clicking on the
Click for help about adding HTML formatting.
just take you to the normal help, nothing useful there.

Well, I found out that it was just another x64 vs x32 bit kind of deal. Since moving to the 64bit bandwagon, I almost exclusively use Internet Explorer (64 bit). It is a great way to get to the Microsoft sites without being bogged down by all of the flash advertisement (oh yeah, those flash do not work on 64bit... ;)

However, there is a whole new world out there if you use the 32bit version of Internet Explorer.!!

yikes.