Posted by: Eric Schrader | December 4, 2013

Running MS Office Demo VMs in Azure

UPDATE: If you are a MS employee, Visit https://demomonkey.cloudapp.net/. There is a complete Azure VM deployment script for this in your Azure subscription. I had limited success getting this to work on my own.

If you have used the Microsoft Office Demos website Office 365 environment, you know it’s quite handy for client demos. It used to be similar to the SharePoint Information Worker Demo or SDPS demo. This new environment runs on Windows Server 2012 and features SharePoint 2013, Exchange, Lync, and Office web apps. These demos can be spun up on Office 365, or downloaded as Hyper-V virtual machines for on premise demos. They are HUGE VMs and resource hogs. I think you need 50+ GB of ram to host all 9 VMs, as well as probably 1TB of hard drive space to even consider starting these VMs. Remember, having everything run on the same disk will create major throughput issues with your storage and run unbearably slow (tried on four 1TB Raid 10 7200 SATA drives and could only get a few going before hitting huge performance walls).

So, let’s host it in Azure!

There are plenty of performance considerations in Azure, such as use an E drive for your data, turn on or off disk caching, using separate storage accounts, etc. I will NOT be covering that. This is a POC for a client demo, so my goal is just to get SharePoint 2013 with the Contoso users and content working on premise so we can demo Web Content Management (WCM) features of SharePoint, along with the Content by Search web part and Taxonomy driven navigation for product sites.

I will only require SharePoint and the Domain Controller for this effort. My farm does not require Search live preview, Outgoing/incoming email, Lync presence, etc. So hosting this on

Here are the major steps:

  • Downloading the template
  • Convert VHDX to VHD before uploading to Azure
  • MakeCert
  • Connect Azure to PowerShell
  • Start conversion while waiting (VHDX to VHD)
  • Upload VHDs:
  • Add VHD to VM Image
  • Create VM
  • Repeat and create the SharePoint VM
  • Add VHD to VM Image
  • Create VM
  • Resources and Links

Downloading the template VMs

First, download the VHDX zip files from www.microsoftofficedemos.com

I chose to download mine with content.

  1. 2013-DC v4 (Complete)
  2. 2013-EXCH v4 (Complete)
  3. 2013-LYNC-SE1 v4 (Complete)
  4. 2013-PCHAT v4 (Complete)
  5. 2013-SP v4 (Complete)
  6. 2013-SP-AFCache v4 (Complete)
  7. 2013-VPN v4 (Complete)
  8. 2013-WAC v4 (Complete)
  9. Office Demos 2013 VHD EULA

I downloaded #1, #5 and #7. These 3 files required ~31GB of disk space and extract to ~175GB

Extract each VM to your computer.

Convert VHDX to VHD before uploading to Azure

If you have Windows 8.1 or Windows PowerShell 4.0, Windows Server 2012 R2, Run PowerShell Convert-VHD command: http://technet.microsoft.com/en-us/library/hh848454.aspx

Convert-VHD -path “D:\temp\MS-Office-Demo-VMs\2013-DC v4 (Complete)\2013-DC Complete v4\Virtual Hard Disks\2013DC.VHDX” -destinationpath “D:\temp\MS-Office-Demo-VMs\2013-DC v4 (Complete)\2013-DC Complete v4\Virtual Hard Disks\2013DC.VHD”

MakeCert

Visual Studio command prompt

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Bin\x64

makecert -sky exchange -r -n “CN=MSDNAzure6scport06″ -pe -a sha1 -len 2048 -ss My “MSDNAzure6scport06.cer”

Connect Azure to PowerShell

MMC- add snap-in Certificate. Navigate to Personal certificates. If you are not a local administrator and run CMD as administrator, they will not appear for you. I just exported another Azure cert from the management tools for testing and it worked for me.

Export again as CER – DER 509 CRT to Desktop

Upload CER file to Azure:

Get-AzurePublishSettingsFile

Save Certificate from Azure when prompted to download: C:\temp\

Import-AzurePublishSettingsFile “C:\temp\Windows Azure MSDN – Visual Studio Premium-12-3-2013-credentials.publishsettings”

Test a random command to verify PowerShell is connected: (Your storage account name below):

Get-AzureStorageAccount portalvhdsfz7h5hgfmhh4k

Start conversion while waiting (VHDX to VHD)

convert-vhd -path “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-DC v4 (Complete)\2013-DC Complete v4\Virtual Hard Disks\2013-DC.VHDX” -DestinationPath “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-DC v4 (Complete)\2013-DC Complete v4\Virtual Hard Disks\2013-DC.VHD”

convert-vhd -path “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-SP v4 (Complete)\2013-SP Complete v4\Virtual Hard Disks\2013-SP.VHDX” -DestinationPath “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-SP v4 (Complete)\2013-SP Complete v4\Virtual Hard Disks\2013-SP.VHD”

convert-vhd -path “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-VPN v4 (Complete)\2013-VPN Complete v4\Virtual Hard Disks\2013-VPN.VHDX” -DestinationPath “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-VPN v4 (Complete)\2013-VPN Complete v4\Virtual Hard Disks\2013-VPN.VHD”

Upload VHDs:

Add-AzureVhd -Destination http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-dc.vhd -LocalFilePath “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-DC v4 (Complete)\2013-DC Complete v4\Virtual Hard Disks\2013-DC.VHD” -NumberOfUploaderThreads 32 -OverWrite

Add-AzureVhd -Destination http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-SP.vhd -LocalFilePath “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-SP v4 (Complete)\2013-SP Complete v4\Virtual Hard Disks\2013-SP.VHD” -NumberOfUploaderThreads 32 -OverWrite

Add-AzureVhd -Destination http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-VPN.vhd -LocalFilePath “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-VPN v4 (Complete)\2013-VPN Complete v4\Virtual Hard Disks\2013-VPN.VHD” -NumberOfUploaderThreads 32 -OverWrite​

Add VHD to VM Image

Add-AzureVMImage -ImageName SP2013-DC -MediaLocation http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-dc.vhd -OS Windows -Label SP2013-DC -ImageFamily “Microsoft Office Demo SharePoint 2013 w content” -Eula http://go.microsoft.com/fwlink/?LinkID=324375 -PrivacyUri http://go.microsoft.com/fwlink/?LinkID=282418 -RecommendedVMSize Medium -Verbose

VERBOSE: 2:20:55 PM – Begin Operation: Add-AzureVMImage

VERBOSE: 2:21:03 PM – Completed Operation: Add-AzureVMImage

AffinityGroup :

Category : User

Location : West US

LogicalSizeInGB : 41

Label : SP2013-DC

MediaLink : http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-dc.vhd

ImageName : SP2013-DC

OS : Windows

Eula : http://go.microsoft.com/fwlink/?LinkID=324375

Description :

ImageFamily : Microsoft Office Demo SharePoint 2013 w content

PublishedDate :

IsPremium : False

IconUri :

PrivacyUri : http://go.microsoft.com/fwlink/?LinkID=282418

RecommendedVMSize : Medium

PublisherName : User

OperationDescription : Add-AzureVMImage

OperationId : 4e871f30-af08-3f06-95e3-ef9b72913288

OperationStatus : Succeeded

Create VM

Go to Azure, Create new Virtual Machine. Choose My Images. Choose SP2013-DC

Chose a unique local user account (probably wont be used) and non-common password.

Select a region or affinity group (I have an affinity Group)

Open Port for RDP and PS for now. Later we might have to add more for the DC, etc.

Wait for the VM to provision.

Connect using contoso\administrator. Password is pass@word1

Repeat and create the SharePoint VM

Add VHD to VM Image

Add-AzureVMImage -ImageName SP2013-SP -MediaLocation http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-SP.vhd -OS Windows -Label SP2013-SP -ImageFamily “Microsoft Office Demo SharePoint 2013 w content” -Eula http://go.microsoft.com/fwlink/?LinkID=324375 -PrivacyUri http://go.microsoft.com/fwlink/?LinkID=282418 -RecommendedVMSize Medium -Verbose

If you get an error, its because the dynamic disk on the SP box is an issue: http://social.msdn.microsoft.com/Forums/windowsazure/en-US/e5feddff-7fee-49b4-86e2-751a1903e852/the-blob-is-not-a-valid-vhd

My error turned out that the VHD was not uploaded correctly. Retried uploading and it worked.

Add-AzureVMImage : “An exception occurred when calling the ServiceManagement API. HTTP Status Code: 400. Service

Management Error Code: BadRequest. Message: The blob is not a valid VHD.. Operation Tracking ID:

9db3a37a1da33d75ba569ee062f63936.”

At line:1 char:1

+ Add-AzureVMImage -ImageName SP2013-SP -MediaLocation http://portalvhdsfz7h5hgfmh

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : CloseError: (:) [Add-AzureVMImage], ServiceManagementClientException

+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Management.ServiceManagement.IaaS.DiskRepository.AddAzureVMImage

Back to square 1. Its takes 6 hours to upload this VHD at 30mbps.

Reupload:

Add-AzureVhd -Destination http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-SP.vhd -LocalFilePath “E:\Hyper-V\Virtual Hard Disks\MS Office Demo\2013-SP v4 (Complete)\2013-SP Complete v4\Virtual Hard Disks\2013-SP.VHD” -NumberOfUploaderThreads 32 -OverWrite

Convert VHD to VM template:

Add-AzureVMImage -ImageName SP2013-SP -MediaLocation http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-SP.vhd -OS Windows -Label SP2013-SP -ImageFamily “Microsoft Office Demo SharePoint 2013 w content” -Eula http://go.microsoft.com/fwlink/?LinkID=324375 -PrivacyUri http://go.microsoft.com/fwlink/?LinkID=282418 -RecommendedVMSize Medium -Verbose

VERBOSE: 7:26:47 AM – Begin Operation: Add-AzureVMImage
VERBOSE: 7:26:53 AM – Completed Operation: Add-AzureVMImage

AffinityGroup :
Category : User
Location : West US
LogicalSizeInGB : 127
Label : SP2013-SP
MediaLink : http://portalvhdsfz7h5hgfmhh4k.blob.core.windows.net/vhds/2013-SP.vhd
ImageName : SP2013-SP
OS : Windows
Eula : http://go.microsoft.com/fwlink/?LinkID=324375
Description :
ImageFamily : Microsoft Office Demo SharePoint 2013 w content
PublishedDate :
IsPremium : False
IconUri :
PrivacyUri : http://go.microsoft.com/fwlink/?LinkID=282418
RecommendedVMSize : Medium
PublisherName : User
OperationDescription : Add-AzureVMImage
OperationId : e493b45b-d214-3fe1-a5b8-6c21a349f670
OperationStatus : Succeeded

Create VM

Go to Azure, Create new Virtual Machine. Choose My Images. Choose SP2013-SP

Chose a unique local user account (probably wont be used) and non-common password.

Select a Cloud Service from previous DC vm:

Open Port for RDP and PS for now. Later we might have to add more for SP, etc.

Wait for the VM to provision.

Connect using contoso\administrator. Password is pass@word1

Fixing the SharePoint VM

Looks like Central Admin (CA) loads, but not the DNS host names for http://intranet.contoso.com. This is not a big deal but let’s trace the issue.

Let’s trace the DNS. SP2013-DC is the DNS/DHCP/AD server.

Log in to the SP2013-DC VM.

Try to ping SP2013-SP, we can’t. That means Azure is taking over our DNS.

You can configure Azure to use your VM as a DC, but it looks complicated: http://msdn.microsoft.com/en-us/library/windowsazure/jj156088.aspx#bkmk_BYODNS

I will just update my hosts file for now under C:\Windows\System32\Drivers\etc:

127.0.0.1        intranet.contoso.com

127.0.0.1        2013-sp

127.0.0.1        www.contoso.com

127.0.0.1        www.contoso.de

10.76.86.2        2013-dc

Be sure to update your DC IP under 2013-DC. Just do an IPConfig from the DC box.

Update: I just realized the VM image is called 2013-x, not SP2013-x. I don’t think Azure needs this info to match from what I can gather at this moment.

Open Internet Explorer from the 2013-SP box and go to www.contoso.com and intranet.contoso.com

Its pretty slow, but I get a SharePoint start page. www.contoso.de challenges me for credentials, I think its because I am rebooting the DC.

I made the DC an Extra Small CPU, since its only at 3% CPU on a Medium footprint.

The SP box is 97% cpu in the past hour, so I want to make it a Large footprint, but its still provisioning.

I also want to open some incoming ports for mydomain.cloudapp.net so users can come in using their web browser.

Resources:

Storage issues

Using Azure disks not sysprepped (DC, SP farm, etc) http://blog.aditi.com/cloud/guide-to-azure-iaas-vhds-disks-images/

Uploading a VHD to Azure (Latest instructions from Official Azure site) http://www.windowsazure.com/en-us/manage/windows/common-tasks/upload-a-vhd/

Azure VHD dynamic disk error: http://social.msdn.microsoft.com/Forums/windowsazure/en-US/e5feddff-7fee-49b4-86e2-751a1903e852/the-blob-is-not-a-valid-vhd

VHDX

Lessons learned uploading a VHDX to Azure: (see step #27) http://blogs.catapultsystems.com/cmoore/archive/2013/04/30/one-does-not-simply-upload-a-vm-to-azure.aspx

Converting VHDX to VHD http://blogs.technet.com/b/cbernier/archive/2013/08/29/converting-hyper-v-vhdx-to-vhd-file-formats-for-use-in-windows-azure.aspx

Convert-VHD command http://technet.microsoft.com/en-us/library/hh848454.aspx

Azure PowerShell trust certs

Add Certificates to MMC: http://social.technet.microsoft.com/wiki/contents/articles/2167.how-to-use-the-certificates-console.aspx

Convert PFX to CER: http://stackoverflow.com/questions/403174/convert-pfx-to-cer

Visual Studio: makecert- http://msdn.microsoft.com/en-us/library/bfsktky3(v=vs.110).aspx

Add-AzureVHD http://msdn.microsoft.com/en-us/library/dn205185.aspx

Networking

Azure DNS- http://msdn.microsoft.com/en-us/library/windowsazure/jj156088.aspx#bkmk_BYODNS

I had an error today when I created my farm via PowerShell. I forgot to run the SharePoint Products and Configuration Wizard (PSConfig) after creating the farm. The result was an error when creating site collections via the UI, as well as subsites via the UI. I could only create the sites via PowerShell and I got quite a few errors in the UI and had to navigate to http://intranet/_layouts/settings.aspx to get the site to load without an error.

 

Sorry, something went wrong.

Feature with ID ’87294c72-f260-42f3-a41b-981a2ffce37a’ is not installed in this farm, and cannot be added to this scope.

Technical Details

 

ULS shows this error creating a subsite under the root site collection via the UI: “Failed to apply template “STS#0″ to web at URL “http://intranet.com/Test”, error Feature with ID ‘guid’ is not installed in this farm, and cannot be added to this scope.”

Solution: Run PSConfig, then try creating your site in the UI.

If you created the sites via PS and want to delete them, I had to do get-spsite | remove-spsite (THIS REMOVES ALL SITE COLLECTIONS). Then I ran PSConfig and recreated the Site Collections via PowerShell successfully.

 

You can run the following command:

Install-SPFeature –AllExistingFeatures

via powershell, but there are other commands as well that must be ran that PSConfig performs:

Install-SPHelpCollection -All

Initialize-SPResourceSecurity

Install-SPService

Install-SPFeature –AllExistingFeatures

New-SPCentralAdministration -Port 1234 -WindowsAuthProvider “NTLM”

Install-SPApplicationContent

Posted by: Eric Schrader | September 19, 2013

SharePoint 2013 On-Premise App Store Configuration

The SharePoint 2013 March Public Update requires additional configuration steps to complete a SharePoint App Store deployment.
In this article, “Enable apps in AAM or host-header environments for SharePoint 2013″, http://technet.microsoft.com/en-us/library/dn144963.aspx The additonal steps are indicated.

New-SPWebApplicationAppDomain
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentService.SupportMultipleAppDomains = $true
$contentService.Update()
Iisreset

We recently migrated our SharePoint 2010 content database to SharePoint 2013.

In SharePoint 2013, users tried to use a MMD field/column on a new item form and received this error: “The given guid does not exist in the term store”

After researching the issue, it appears that the error is due to a disconnect between the list column and the MMD values. I remembered the MMD database/terms for the Managed Metadata Service Application is separate from the content database.

I opened the Managed Metadata Service Application on SharePoint 2013 and confirmed there were no terms present:

Optional: To confirm the term store structure back on SharePoint 2010, I opened the Managed Metadata Service Application on the SharePoint 2010 farm, the terms were indeed present:

Since we only migrated the SharePoint 2010 content database (not the Managed Metadata Service Application data), the MMD field fails to retrieve the values from the new SharePoint 2013 farm.

Solution: You will have to migrate the Managed Metadata Service Application from SharePoint 2010 to SharePoint 2013.

For more information on how to upgrade the Service Applications, see http://technet.microsoft.com/en-us/library/jj839719.aspx

“When you upgrade from SharePoint 2010 Products to SharePoint 2013, you must use a database attach upgrade, which means that you upgrade only the content for your environment and not the configuration settings. After you have configured the SharePoint 2013 environment, and copied the content and service application databases, you can upgrade the service applications to SharePoint 2013. This article contains the steps that you take to upgrade the service applications.”

I had a link in my email inbox for “User wants access to ‘Intranet’” sent from the user to myself. I am the Intranet site Owner and recieve access requests.

There is a link to “Accept or Decline this request”

If I click accept from the email Link, I get a SharePoint error:

Sorry, something went wrong
An unexpected error has occurred.

Correlation ID: 00000000-0000-0000-0000-000000000000

Date and Time: 8/5/2013 3:19:39 PM


Go back to site

I took a look in the ULS logs and found this error when I requested the page:

08/05/2013 14:56:19.09 w3wp.exe (0x2BCC) 0x26C4 SharePoint Foundation Runtime tkau Unexpected System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (%).    at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()     at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

08/05/2013 14:56:19.09 w3wp.exe (0x2BCC) 0x26C4 SharePoint Foundation General ajlz0 High Getting Error Message for Exception System.Web.HttpException (0×80004005): A potentially dangerous Request.Path value was detected from the client (%).     at System.Web.HttpRequest.ValidateInputIfRequiredByConfig()     at System.Web.HttpApplication.PipelineStepManager.ValidateHelper(HttpContext context)

08/05/2013 14:56:19.09 w3wp.exe (0x2BCC) 0x26C4 SharePoint Foundation General aat87 Monitorable

08/05/2013 14:56:19.10 w3wp.exe (0x2BCC) 0x26C4 SharePoint Foundation General ajb4s Monitorable ViewStateLog: Failed to write to the velocity cache: https://intranet/Access Requests/pendingreq.aspx

The URL from the email is: https://intranet/sites/BI/Access%2520Requests/pendingreq.aspx

The link was %2025, as soon as I went to Site Settings > Access requests and invitations, The page loaded and the URL was https://intranet/sites/BI/Access%20Requests/pendingreq.aspx#InplviewHash45f07088-94ce-4184-8700-e90e139485fb=#InplviewHashb2af6c82-aa6b-402e-97f7-b7503c93b415=

Note how the URL is %20, not %2520. This was the cause of the error.

Environment: Windows Server 2012 with SharePoint 2013 March 2013 Public Update.

For now, use the UI or manually change the link. I am reporting this issue to Microsoft and will update this if I find anything out.

Posted by: Eric Schrader | March 27, 2013

SharePoint 2013 – Common Installation Issues

With SharePoint 2013, I have had a lot of installation issues. I will cover the latest issues I have ran into. This post does not enforce the Least Privlages security practice, but it can easily be adapted to for other environments. This post was for standing up a development environment. After a long battle of getting SharePoint 2013 to work without any issues, I wanted to share my experience in one place.

I have documented our company’s current development environment setup in this post. Your environment does not have to match mine 100%. Feel free to use Windows Server 2012, etc.

Installation Media Requirements (MSDN):

  • en_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_x64_dvd_617601.iso
  • en_office_professional_plus_2013_x64_dvd_1123674.iso
  • en_sharepoint_designer_2013_x64_1134649.exe
  • en_sharepoint_server_2013_x64_dvd_1121447.iso
  • en_sql_server_2012_enterprise_edition_with_sp1_x64_dvd_1227976.iso
  • en_visio_professional_2013_x64_1123802.exe
  • en_visual_studio_premium_2012_x86_dvd_920758.iso and update en_visual_studio_2012_x86_update_1_1203928.exe

One common issue I found is that I had to run Windows Update before installing SQL 2012. There were 96 Windows updates on a clean server install and it took 2 hours. At about an hour and a half Internet Explorer has a hidden install prompt in the background that you have to click “Next” on, etc. The patch process is as follows: Install, reboot, install security update, reboot one last time.

Before installing SQL Server 2012, I had to go to my Windows Server 2008 R2 Roles/Features and add the .NET Framework 3.5.1 Features.

.net 3.5

Next I installed SQL Server 2012. I let the installer check for updates. If this installer fails, you probably did not finish the Windows Updates.

I installed the following features for SQL:

  • Database engine
  •  Full text Search
  •  SSAS
  •  SSRS Integrated
  •  SSRS addin tool
  •  Management tools basic and complete (for SSRS)

SQL 2012 features

You don’t need Full Text, but we are using it in our development environment for custom SQL applications outside of SharePoint.

Install Visual Studio 2012 and the update listed in the beginning of this post.

Then Install SharePoint 2013 Prerequisites. You will need to reboot and continue, then reboot again (I see a pattern here…)

For configuing SharePoint, MAKE SURE YOU ARE LOGGED IN AS A DOMAIN USER ACCOUNT – SPSetup for example! I tried using local admin and my service account created the SQL database, but got an error on the products and configuration wizard:

03/26/2013 23:07:06  6  ERR                        Failed to create the configuration database.

An exception of type System.InvalidOperationException was thrown.  Additional exception information: An error occurred while getting information about the user SPFarm at server Domain.local: Access is denied

System.InvalidOperationException: An error occurred while getting information about the user SPFarm at server Domain.local: Access is denied

Configuration Failed

Configuration failed. One or more configuration settings failed. Failed to create the configuration database.

Basically SharePoint is trying to get information about this service account and access is denied. This is because you are running the Windows session and Products and Configuration Wizard as a local user that does not have access to the AD OU to verify the SPFarm domain account. Log out, Log in as SPSetup (or any domain user if you don’t have one) and re-launch the SharePoint Products and Configuration Wizard. Specify the SPFarm account to connect to the SQL Database. Dont forget, you might have to log in to SQL Management Studio and remove the partially created farm database SharePoint_Config or use a different name the second time.

Then Install SharePoint 2013. I use Complete instead of Stand-alone.

Specify your domain Database Access account (Domain\SPFarm). This account has to be DBOwner and Security Admin in the SQL instance (or sysadmin if you are lazy and frustrated).

Launch the Farm Configuration Wizard.

Specify a new managed account for the service applications (For Dev I ended up using the same SPFarm account).

I noticed the SharePoint 2013 Farm Configuration Wizard said “Working on it…” Sorry to keep you waiting. for over 6 hours. I read a blog post from Todd that once the W3WP.exe and OWSTimer.exe processes die down, you can kill the IE window and re-open Central Admin. Give it a good 15 minutes or so. More time the better.

Once you bring up Central Admin, then create the root site collection. My Sites is configured on the root web application under /my site collection. Go to About Me on your username above the ribbon to verify everything works.

Boom, SharePoint 2013 is up and running.

Posted by: Eric Schrader | April 30, 2012

SharePoint 2010 Caching options

These are a few notes from Designing a Microsoft SharePoint 2010 Infrastructure PDF. (Page’s 3-30 and 3-31)

There are 3 different types of caching options in SharePoint 2010. Two of these require publishing features.

  1. (page) Output Caching
    1. Setting this to as small as 60 seconds can make a big difference on WFE servers load
    2. Page requests are stored in memory on the WFE server.
    3. Available with the Publishing feature enabled
    4. Memory based on WFE servers
    5. Cache Profiles
      1. Determine which users receive cached pages, etc. Set at the Site, Site collection, or web application level
  2. Object cache
    1. Store lists/ libraries/ or page layouts on WFE server. Size adjusted at the site collection or web application level
    2. Available with the Publishing feature enabled
    3. Memory based on WFE servers
  3. BLOB cache
    1. Better for media streaming (allows files to play before they are finished downloading). Possibly better for large files (depending on your SQL specs vs WFE).
    2. Default is 10GB and disabled
    3. Web application level
    4. Disk based on WFE servers
      1. Determine which users receive cached pages, etc. Set at the Site, Site collection, or web application level

More from MS: http://technet.microsoft.com/en-us/library/cc261797.aspx

Posted by: Eric Schrader | January 26, 2011

Microsoft SharePoint Hyper-V virtual machine DNS fix

After downloading the MS SharePoint preconfigured VM (demo2010a and demo2010b), I started them up on my network and noticed they would not load the SharePoint sites.

Here is the VM I downloaded from Microsoft: 2010 Information Worker Demonstration and Evaluation Virtual Machine (RTM):


http://www.microsoft.com/downloads/en/details.aspx?FamilyID=751fa0d1-356c-4002-9c60-d539896c66ce&displaylang=en

After trying the site http://intranet.contoso.com in the Demo2010A machines internet browser and getting a Page cannot be displayed error, I checked my app pools, IIS web site, central admin (which worked on http://demo2010a:2010 btw), alternate access mappings, and DNS.

I noticed some funny settings with my vm’s DNS manager on Demo2010A machine.

The IP’s I was seeing were 192.168.150.0 and 192.168.150.1, which I am on the 10.6.0.x network, so this was alarming to me.

I called over our new IT guy and put him to work, explaining that I can access one of the applications by hostname (http://demo2010a:2010), but all of the alternate access mappings and DNS entries were not working.

After some troubleshooting and changing the DNS entry for demo2010a and demo2010b (SEE PICTURE ABOVE) to 10.6.0.164 and 10.6.0.169 (The new 10.6.0.x IP’s were the IPs machines were both assigned from TCIP set to automatic).

After I modified the DNS, I did a Command prompt ipconfig /flushdns

Following this,my coworker set the DNS under TCP/IP v4 to the IP of demo2010a machine (the dns server- 10.6.0.169).

The issue was that the DNS server was inheriting from my companys DNS on the same 10.6.0.x network, instead of the contoso DNS entries on demo2010a machine.

After setting Demo2010A and Demo2010B’s DNS to the local IP of demo2010a (10.6.0.169), this fixed the site. I can now access http://intranet.contoso.com from the demo2010a machine. I CANNOT access this on any computer who’s DNS is not set to 10.6.0.169, as the DNS automatically obtains my company’s DNS server and settings.

Ever wonder how SharePoint 2010 uses CoreV4.css and Themes together to style your site? In this blog post, I hope to grab this bull by the horns and make empower you to decode this large file and create your own themes.

Basically, I took CoreV4.css located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\Themable and copied it locally, then attached it to my SharePoint page.

Figure 1- Copy the original CoreV4 from the backend to a local temporary drive to modify. Lcoation: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\Themable

Save the copy to your SharePoint site in the Style Library or where you desire.

Open V4.master and add your CSS reference:

Find in V4.master at top:

<SharePoint:CssLink runat=”server” Version=”4″/>

<SharePoint:Theme runat=”server”/>

Add the following AFTER the above tags:

<!–custom add themes and css –>

<SharePoint:CssRegistration runat=”server” name=”<% $SPUrl:~sitecollection/Style Library/ClientName/CSS/style1.css %>” After=”corev4.css”/>

<SharePoint:CssRegistration name=”/Style Library/en-us/Themable/style.css” After=”corev4.css” runat=”server”/>

Change your paths to match. I have two tags, the first is for CSS, and the second is for Themable CSS files using themable comments.

Once your file (copy of Corev4.css named Style or Style1.css) is in place, we can begin modifying it.

Themes:

Themes in SharePoint 2010 are pretty tough. There are about 60 permutations, and you can only define about 10 of those colors.

Heres the table:

Figure 2- You have seen this grid before from the Site Settings > Look and Feel > Themes page. The OOTB one has colors applied to each square. This image maps to the Themes page so you get an idea of what each color is called.

The colors you can define in themes are:

  1. Dark 1
  2. Light 2
  3. Dark 2
  4. Accent 1
  5. Accent 2
  6. Accent 3
  7. Accent 4
  8. Accent 5
  9. Accent 6
  10. non visited link
  11. visited link

The rest are generated from those that you define. This includes gradient images (they use transparent PNG overlays, big plus in my book) and a lot of other images used in SharePoint.

I put together an Excel of OOTB CoreV4.css

This Excel shows all the Theme Permutations, what CSS selector in CoreV4.css uses that Theme permutation, the CSS Selector and code itself, and a guide to whether it’s a Background attribute, Color attribute, or Border attribute defined in that selector.

Download from blog: http://ericschrader.files.wordpress.com/2011/08/corev4-styles-calculated-no-errors_blog-export.xlsx

This is not used to modify the code (but it could be, just copy the PARSED CSS columns and paste it to a CSS file), but more as a guide to how CoreV4.css works.

The Green shows a match, eg. Which theme color matches to what CoreV4.css selector, and even a possible attribute. If its red, that theme or attribute was not a match in that selector. So if a theme permutation is red, then that theme color is not in that CSS tag. Pretty handy to get an idea whats in this file.

The numbers inside the green are just what position the theme permutation is found, eg. Hyperlink = 88 green just means that the word Hyperlink is found in that particular CSS selector at character 88. They can be ignored, but my Excel skills are lacking in that department :)

Each row is a selector from CoreV4.css.

Each of the first 60 columns is a theme permutation, and each cell that is green is a match of that theme permutation in that selectors CSS attributes value.

The column after that, I totalled how many theme permutations in that row are for that selector (some have up to I think 5 theme permutations in a single selector!)

Then the next few columns are the CSS selector, bracket, attributes/values, then closing CSS bracket. This can be copied and pasted into a CSS file if you want, just like CoreV4.css. NOTE: I may have mis-formatted some of the CoreV4.css, so just let me know if you find a typo/bad replacement and I will recheck it).  Note also that I parsed out all themable selectors only for this Excel. My rule to parse was any selector with a comment in the attributes section. CoreV4.css is not the only file, SharePoint has a few more, but this is the big momma of CSS files.

The next columns are some rough CSS attibutes, Background (image or Color), Color (for fonts, etc), and Border (color, size, width, etc)

Thats pretty much the Excel. Just a visual display of this bad boy. Notice how line 469 of my Excel has 0 number of times for a theme found. This is because they did not replace a token in their CSS, /* [ReplaceColor(V4_THEMING_COLOR_DAR2)] */;color: #3b4f65; So I figure if this Excel can catch this, it must be pretty useful.

This gives you an idea for how much themes are used in SharePoint, and how you can modify pretty much everything using your own theme.

I ended up breaking out CoreV4.css into to parts:

  1. Uses themable CSS comments
  2. Does not use themable CSS comments

The themable CSS I moved to a file in the Style Library/en-us/themable directory.

The Non-themable CSS I keep just in the Style Library a few folders down.

When a theme is applied, my themable CSS is applied. When my Non-themable CSS is modified, the changes are reflected instantly on the site.

This allows me to make changes to normal CSS without have to re-apply my theme to the entire site for my changes to show.

Here is a recent project I did, here is the Themable CSS: (must have file checked in, published, and apply another theme, then the theme for the changes to be seen, its pretty crazy… Good luck, once you get it, its easy)

My Themable CSS: (Style Library\en-us\Themable\Style.css)

.pageTitle {

    /* [ReplaceColor(themeColor:"Accent2")] */    color: #8A2A1C;

    /* [ReplaceColor(themeColor:"Accent1")] */    border-bottom: 1px #343434 dashed;

}

.bottomFooter, .bottomFooter a, .bottomFooter a:active, .bottomFooter a:hover, .bottomFooter a:visited {

    /* [ReplaceColor(themeColor:"Accent6")] */    color: #FFFFFF;

}

.rightsidefixed {

    /* [ReplaceColor(themeColor:"Accent5")] */    background-color:#e5dbc2

}

.s4-toplinks a.dynamic, .s4-toplinks a.dynamic:active, .s4-toplinks a.dynamic:hover, .s4-toplinks a.dynamic:link, .s4-toplinks a.dynamic:visited {

    /* [ReplaceColor(themeColor:"Accent2")] */    color: #8A2A1C;

}

.ms-navitem A {

    /* [ReplaceColor(themeColor:"Accent6")] */    color: #FFFFFF !important;

}

#s4-mainarea {

    /* [ReplaceColor(themeColor:"Light2")] */    border: 6px #EDE8E2 solid;

    /* [ReplaceColor(themeColor:"Light2")] */    background-color: #EDE8E2;

}

.containerBackground {

    /* [ReplaceColor(themeColor:"Light2")] */    background-color: #EDE8E2;

}

body #s4-workspace {

    /* [ReplaceColor(themeColor:"Accent2")] */    background-color: #8A281C;

}

body .s4-toplinks {

    /* [RecolorImage(themeColor:"Accent2")] */    background: url(“/_layouts/images/selbg.png”) repeat-x left top;

    /* [ReplaceColor(themeColor:"Accent2")] */    background-color: #f6f6f6;

    /* [ReplaceColor(themeColor:"Light2")] */    border: 5px solid #ede8e2;

}

.s4-tn li.static > .menu-item, .s4-tn li.static > .menu-item:active, .s4-tn li.static > .menu-item:hover, .s4-tn li.static > .menu-item:link, .s4-tn li.static > .menu-item:visited {

    /* [ReplaceColor(themeColor:"Light1")] */    color: #3b4f65;

}

.s4-toplinks .s4-tn a.selected, .s4-toplinks .s4-tn a.selected:active, .s4-toplinks .s4-tn a.selected:hover, .s4-toplinks .s4-tn a.selected:link, .s4-toplinks .s4-tn a.selected:visited {

    /* [ReplaceColor(themeColor:"Light2")] */    border-color: #91cdf2;

    /* [RecolorImage(themeColor:"Light2")] */    background: url(“/_layouts/images/selbg.png”) repeat-x left top;

    /* [ReplaceColor(themeColor:"Light2")] */    background-color: #ccebff;

    /* [ReplaceColor(themeColor:"Accent2")] */    color: #003759;

}

#s4-leftpanel, #s4-leftpanel a, #s4-leftpanel a:active, #s4-leftpanel a:hover, #s4-leftpanel a:link, #s4-leftpanel a:visited, #s4-leftpanel .ms-vb {

    /* [ReplaceColor(themeColor:"Light1")] */    color:#FFFFFF

}

#s4-leftpanel #DatePickerDiv, #s4-leftpanel #DatePickerDiv a, #s4-leftpanel #DatePickerDiv a:active, #s4-leftpanel #DatePickerDiv a:hover, #s4-leftpanel #DatePickerDiv a:link, #s4-leftpanel #DatePickerDiv a:visited, #s4-leftpanel #DatePickerDiv .ms-vb {

    /* [ReplaceColor(themeColor:"Dark1")] */    color:#343434

}

body #s4-leftpanel {

    /* [ReplaceColor(themeColor:"Accent3")] */    background-color: #567F1A;

    /* [ReplaceColor(themeColor:"Light1")] */    color:#FFFFFF

}

body #s4-leftpanel-content {

    /* [ReplaceColor(themeColor:"Light2-Lightest")] */    border: 1px solid #dbddde;

}

.s4-ql ul.root > li > .menu-item, .s4-qlheader, .s4-qlheader:visited {

    /* [ReplaceColor(themeColor:"Light1")] */    color: #FFFFFF;

}

.s4-ql ul.root ul > li > a {

    /* [ReplaceColor(themeColor:"Light1")] */    color: #FFFFFF;

}

.s4-ql ul.root ul > li > a:hover {

    /* [ReplaceColor(themeColor:"Light1")] */    color: #FFFFFF;

}

.s4-ql a.selected {

    /* [ReplaceColor(themeColor:"Accent4")] */    background-color: #345208;

    /* [ReplaceColor(themeColor:"Light2-Lighter")] */    border-top-color: #c6e5f8 !important;

    /* [ReplaceColor(themeColor:"Light2")] */    color: #FFFFFF !important;

}

.s4-specialNavLinkList a {

    display: block;

    padding: 3px 4px 3px 10px;

}

.s4-specialNavLinkList a {

    /* [ReplaceColor(themeColor:"Light2")] */    color: #3b4f65;

}

.ms-rteStyle-ContentHeader {

-ms-name:”Content Header”;

    /* [ReplaceColor(themeColor:"Accent2")] */    background-color: #841019;

    /* [ReplaceColor(themeColor:"Light1")] */    color: #FFFFFF;

    font-size:10pt;

    font-weight:bold;

    padding:4px 4px 5px 5px;

    border-top:5px #EDE8E2 solid;

    margin:0px;

    border-bottom:5px #FFFFFF solid;


}

.ms-rteStyle-ContentBackground {

    -ms-name:”Content Background”;

    background-color:#fff;

    margin:0px;

    padding:6px 10px;

}

.ms-WPHeader {

    /* [ReplaceColor(themeColor:"Accent2")] */    background-color: #841019;

    /* [ReplaceColor(themeColor:"Light1")] */    color: #FFFFFF;

}

.ms-WPTitle, .ms-WPTitle a, .ms-WPTitle a:active, .ms-WPTitle a:hover, .ms-WPTitle a:link, .ms-WPTitle a:visited {

    /* [ReplaceColor(themeColor:"Light1")] */ color: #FFFFFF;

}

.s4-wpActive .ms-WPTitle, .s4-wpActive .ms-WPTitle a {

    /* [ReplaceColor(themeColor:"Light1")] */ color: #FFFFFF;

}

My recent adjacent Style1.css file (Style Library\ClientName\CSS\Style1.css)

/*shell- under construction*/

body #s4-bodyContainer {

    margin: 0 3%;

    min-width: 935px;

/*no height in ie7, ie8, for firefox set height to 100%*/

}

body #s4-titlerow {

    border-left: 13px transparent solid;

}

/*modal shell – after shell*/

.ms-dialog body #s4-bodyContainer {

    margin: 0;/*remove red background margin from popup*/

    min-width: inherit;

}

.ms-dialog #s4-mainarea {

    border: 0px transparent solid; /* remove borders around content of popup*/

}

.ms-dialog .bottomFooter {

    display:none /* hide footer*/

}

/*shell*/

div.s4-pr {

    border-right: 0px transparent none;

}

/*BG Logos*/

#s4-workspace > div {

    background-image: url(‘../Images/bg_gradient.png’);

    background-repeat: repeat-y;

    background-position: -20px top;

}

#s4-workspace {

    background-image: url(‘../Images/PowayBuilding.png’);

    background-repeat: no-repeat;

    background-position: -20px top;

    background-attachment: scroll;

}

/*Header styling*/

.ms-siteactionsmenu > SPAN > SPAN > A {

    color:#FFFFFF

}

.s4-titletext {

    padding-bottom: 0px;

}

.s4-titletext {

    vertical-align: bottom;

}

table.s4-wpTopTable {

    margin-right: 4px;

}

.s4-help {

    margin-left: 4px;

}

/* Top Nav */

.s4-title {

    overflow: visible;

}

body #s4-topheader2 {

    border: 0px transparent none;

}

.s4-tn LI.dynamic > .menu-item:visited {

    font-weight: bold;

}

.s4-tn LI.dynamic > .menu-item:hover {

    font-weight: bold;

}

.s4-tn LI.dynamic > .menu-item:active {

    font-weight: bold;

}

.s4-tn LI.dynamic > .menu-item:link {

    font-weight: bold;

}

.s4-tn LI.dynamic > .menu-item {

    font-weight: bold;

}

.s4-tn ul.dynamic {

    padding: 5px;

    border-bottom: 1px #CFAEA4 solid;

}

.s4-tn a:visited {

    font-weight: bold;

}

.s4-tn a:link {

    font-weight: bold;

}

.s4-tn a:hover {

    font-weight: bold;

}

.s4-tn a:active {

    font-weight: bold;

}

.s4-tn a {

    font-weight: bold;

}

.menu-horizontal {

    padding: 0px;

    border: 0px;

    margin: 0px;

    border-spacing: 0px;

}

body .s4-toplinks {

    border-bottom: 0px solid transparent;

}

.s4-toplinks .s4-tn a.selected, .s4-toplinks .s4-tn a.selected:active, .s4-toplinks .s4-tn a.selected:hover, .s4-toplinks .s4-tn a.selected:link, .s4-toplinks .s4-tn a.selected:visited {

    padding: 4px 10px 6px 10px;

    margin: 0px 10px;

    border: 0;

}

/*breadcrumbs*/

.s4-title H1 A, .s4-title H2 A {

    display: inline;

}

.breadcrumbs {

    min-height: inherit;

    min-height: 10px;

}

.breadcrumbs h2 {

    font-size: 10px;

    text-decoration: none;

    padding-bottom: 1px;

}

.breadcrumbs a:link {

    font-size: 10px;

    text-decoration: none;

    padding-bottom: 1px;

}

.breadcrumbs a:visited {

    font-size: 10px;

    text-decoration: none;

    padding-bottom: 1px;

}

.breadcrumbs a:hover {

    font-size: 10px;

    text-decoration: none;

    padding-bottom: 1px;

}

.breadcrumbs a:active {

    font-size: 10px;

    text-decoration: none;

    padding-bottom: 1px;

}

.breadcrumbs a {

    font-size: 10px;

    text-decoration: none;

    padding-bottom: 1px;

}

.breadcrumbs {

    font-size: 10px;

    text-decoration: none;

    padding-bottom: 1px;

}

/*Left nav */

.ms-quicklaunchouter {

    width:100% /* Fixes minimum width in quick launch */

}

.leftnavtop, .ms-quicklaunchouter {

    float: left;

}

body #s4-leftpanel {

    width: 170px; /* make sure you set the margin-left on MSO_ContentTable to this number*/

}

/*left navigation indent first level */

#s4-leftpanel-content ul.root > li.static > a.static {

    border-bottom: 1px solid #ffffff;

    font-weight: bold;

}

/* left navigation indent second level*/

#s4-leftpanel-content ul.root > li.static > ul.static {

    padding-left: 20px;

    margin-left: -10px;

}

/* left navigation indent third level */

#s4-leftpanel-content ul.root > li.static > ul.static > li.static > ul.static {

    padding-left: 20px;

    margin-left: -10px;

/* left navigation indent fourth level*/

}

#s4-leftpanel-content ul.root > li.static > ul.static > li.static > ul.static > li.static > ul.static {

    padding-left: 30px;

    margin-left: -10px;

}

.s4-ql UL.root UL {

    margin: 0px;

}

.ms-quickLaunch {

    padding: 0px;

}

body #s4-leftpanel-content {

    padding: 0px 0px 5px;

    background-color: transparent;

    border-top-width: 0px;

    border-right-width: 0px;

    border-bottom-width: 0px;

    border-left-width: 0px;

}

.s4-ql ul.root > li > .menu-item, .s4-qlheader, .s4-qlheader:visited {

    font-size: 1.2em;

    margin: 0px;

    padding: 3px 4px 3px 10px;

    border-width: 1px 0px;

    border-style: solid;

    border-color: transparent;

    word-wrap: break-word;

    overflow-x: hidden;

}

.s4-ql ul.root ul > li > a {

    padding: 3px 4px 4px 10px;

    border-width: 1px 0px;

    border-style: solid;

    border-color: transparent;

    overflow-x: hidden;

    display: block;

    zoom: 1;

}

.s4-ql ul.root ul > li > a:hover {

    text-decoration: underline;

}

.s4-ql a.selected {

    background: url(“/_layouts/images/selbg.png”) repeat-x left top;

    border-width: 0px !important;

    padding-left: 9px !important;

}

/*content styling*/

#MSO_ContentTable {

    margin-left: 175px; /* Set s4-leftpanel width to equal or less than this*/;

    background-color: #EDE8E2; /*sets main area background color */

}

.contentCenterRegion {

    vertical-align: top;

}

ul.ms-rteStyle-ContentBackground, ol.ms-rteStyle-ContentBackground {

    list-style-position: inside; /*fix for rtf bullet points being to far to the left, also ordered lists */

}

.rightsidefixed {

    width: 250px; /* sets right layout zone width*/;

    vertical-align: top;

}

div.s4-title {

    background: transparent;

    background-color: transparent;

}

.ms-WPHeader {

    border-bottom: 5px #FFFFFF solid;

}

.ms-WPHeader TD {

    border-bottom: transparent 0px none !important;

    border-right: transparent 0px none !important;

    border-top: transparent 0px none !important;

    border-left: transparent 0px none !important;

}

.s4-wpTopTable, .s4-wpActive, .ms-settingsframe {

    background-color: #FFFFFF; /*make web part backgrounds white, even in edit mode*/;

}

.ms-rte-wpbox {

    margin-bottom: 8px; /*add spacing below each webpart*/

}

.floatleft {

    float: left;

}

.floatright {

    float: right;

}

.pageTitle {

    font-size: 20px;

    font-weight: bold;

    margin: 0px;

    padding: 0px;

    width: 80%;

    padding-top: 0px;

    margin-left: 10px;

    letter-spacing: 1px;

}

.ms-WPTitle {

    font-weight: bold;

}

/* Style right side web parts */

.rightSide #MSOZoneCell_WebPartWPQ20 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ19 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ18 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ17 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ16 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ15 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ14 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ13 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ12 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ11 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ10 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ9 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ8 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ7 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ6 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ5 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ4 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ3 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ2 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide #MSOZoneCell_WebPartWPQ1 {

    background-color: #fff;

    border: 5px #EDE8E2 solid;

}

.rightSide .ms-WPBody {

    padding: 10px;

}

/*News Webpart*/

.NewsArea {

    padding: 5px;

}

.NewsDate {

    padding-bottom: 5px;

}

/*user presence icon*/

.ms-imnlink img {

    border: 0px;

}

/*user description*/

div.description {

    padding-left: 17px;

}

/*footer styling*/

.bottomFooter {

    min-height: 44px;

    padding-top: 16px;

    padding-left: 4px;

    padding-right: 4px;

    clear: both;

}

.footerlinks {

    word-spacing: 4px;

    padding-bottom: 4px;

    line-height: 14px;

}

That’s it, let me know if you have questions and I can get more detail/instructions on any part.

For more on how to work with CoreV4.css and create your own CSS, see my other blog post from today.

Posted by: Eric Schrader | September 23, 2010

A great way to create SharePoint 2010 CSS from original CSS

Working with SharePoint 2010′s CoreV4.css is very difficult. I have developed a technique to allow developers to leverage SharePoints OOTB CoreV4.css selectors, but while not hacking together CSS selectors and dealing with !important and other CSS hacks.

Here is the concept:

Your SharePoint page will have 2 stylesheets on it, CoreV4.css and a new blank file, Custom.css. Custom.css will have the exact contents of CoreV4.css, but be attached AFTER coreV4.css so it overwrites the original. This will allow you to modify Custom.css (a copy of CoreV4.css) directly from the SharePoint Designer or the browser. You can use IE Developer Toolbar or Firebug to get the selectors SharePoint 2010 uses OOTB, search for that selector in Custom.css, modify it, then save and test. Repeat for each change.

Once complete, you will have CoreV4.css (original) and Custom.css, both two very large files.

This next step is optional, but highly recommended for Production. Take CoreV4.css, format the CSS so the selectors are each on their own line, along with their attributes all on the same line. This way you only have each line starting with the selector.

Figure 1- Copy the original CoreV4 from the backend to a local temporary drive to modify. Lcoation: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES\Themable

Once Copied locally, you can open it in Microsoft Expression Web:

You should see:

From here, we need to Reformat the CSS to have each selector on its own line, eg:

Here is how we do it:

In Expression Web, go to Tools> Page Editor Options

Click on the Code Formatting Tab

We will modify these formatting rules to put each selector on one line.

Under the bottom CSS section, modify the following:

Figure 2- No changes to Selector

Figure 3- Change Lines After from 1 to 0

Figure 4- Property Name- No Changes

Figure 5-Proptery Value change Lines after from 1 to 0

Figure 6- Closing Brace change Lines Before from 1 to 0, HIT OK

Now we can format our CoreV4.css copy to have each selector on its own line:

Figure 7- Right click on CoreV4.css in the Code view and go to Reformat CSS (Note, the file extention is .css)

Your CSS should all be on one line:

Repeat the same steps for Custom.css (figure 7 and 8 above) (the copy of CoreV4.css you have been modifying. Once Custom.css looks like above, but with your changes, we can compare the two files and extract only the changed lines as an overwritter CSS file for Corev4.css )

I use Beyond Compare for this next step to compare the changes. You can use any tool that allows you to compare two text files and ONLY VIEW DIFFERENCES, and ALLOWS YOU TO EXTACT (copy and paste) OUT ONLY THE CHANGED LINES!

In Beyond Compare, do a new TEXT compare:

Figure 8- Click Text Compare from the button

Copy CoreV4.css

Paste on the left of the text compare:

Figure 9- Paste on left

Copy Custom.css, (MAKE SURE ITS FORMATTED THE SAME AS COREv4.css, ALL SELECTORS ON OWN LINE)

Paste on the right side (MAKE SURE YOU ARE ON THE FIRST LINE, SCROLL TO THE TOP BEFORE YOU PASTE!) of the text compare:

Now apply a filter to the comparison to only show changes:

Figure 10-Click Show Differences from the top bar.

Figure 11- Uncheck Show Context (one with the up and down arrows and the red line)

Copy out the code on the right side with Select all, then Copy it.

Now you can paste this code over your Custom.css file to only have the CSS Overwritters

.ms-SPLink {font-family: ‘Arial’,’Lucida Grande’,Verdana,Arial,sans-serif; font-size: 0.8em; /* [ReplaceColor(themeColor:"Accent3-Darker")] */; color: #1A70B9;}

.ms-SPLink a:link, .ms-SPLink a:visited {/* [ReplaceColor(themeColor:"Accent3-Darker")] */ color: #000000; text-decoration: none;}

My code, I changed the Font to Arial and the font color to #000000. No need for an entire duplicate of CoreV4.css in my Custom.css, just need the overwriting different CSS.

Note, this file contains Themable CSS comments. For my code changes to be applied, The CSS must be embeded to my masterpage using the following tag in the header, after the other CSS Theme tags.

<SharePoint:CssRegistration name=”/Style Library/en-us/Themable/style.css” After=”corev4.css” runat=”server”/>

 Then make sure you SAVE, Check in and publish/approve this CSS file. THEN apply a different theme, then apply back the desired theme. You CSS will now be visible. NOTE: apply themes to all subsites if you want the CSS to be visible during these steps.

Only do this at Export, as you want to have Custom.css a complete copy of Corev4.css during Development.

Hope this helps!

For more on modifying CoreV4.css, see my other blog post from today.

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.

Join 92 other followers