Uncategorized | @SPJeff

DataSheet – master page background color hides cell text [FIXED]

February 22, 2012 in Uncategorized

While changing the background color of a master page, I noticed a new issue with DataSheet view.   DataSheet uses an ActiveX control to render the grid control.  This control uses the <BODY> background color so attempts to set the “#s4-mainarea” <DIV> with a background color were in vain.   It works for HTML content, but just not for DataSheet.  Using light color (#FFF white in the example below) is more compatible with DataSheet view’s  gray text and gray cell border.  If you have a light <BODY> background color, it may work OK, but those those with dark backgrounds … what can we do?   There are two options:

Before and After Screenshots

Here’s a site with bad colors before the fix:

bad

Here’s the same site with smart code to give a different background-color driven by “ShowInGrid” URL:

good

Option #1 – Server Side – Master page with C# code

A brief snippet of ASP.Net code written in C# can be inserted into the master page.   The server side rendering will look for a “ShowInGrid” URL parameter. 

Pro

  • Fast
  • No client browser “blink” that JS has
  • Foundation for writing other Dot Net server side code  (“smart” master pages)

Con

  • Requires [web.config] edit

Action Steps

  1. Open site with SharePoint Designer
  2. Open Master page with Edit in Advanced Mode
  3. Add the below code just before the </HEAD> tag
  4. Open INETMGR and locate the website
  5. Open [web.config] from the IIS website folder with Notepad
  6. Add the below <PageParserPath> tag.   NOTE – be sure to update the site collection relative URL to match your environment.   Enabling this for all pages (/*) is not generally recommended unless the only people with SP Designer also are trusted developers.
  7. Repeat steps #4 – #6 on each web front end server

 
<% if (Request["ShowInGrid"] == null) { %>
    <style type="text/css">
    /* ShowInGrid - URL parameter not found. black default. */
    body { background-color: #000; }
    </style>
<% } else { %>
    <style type="text/css">
    /* ShowInGrid - URL parameter found. white DataSheet support. */        
    body { background-color: #FFF; }
    </style>
<% } %>    

2-22-2012 2-01-59 PM

2-22-2012 2-03-48 PM

<PageParserPath VirtualPath="/_catalogs/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />

2-22-2012 2-06-43 PM

Option #2 – Client Side – Master page with JavaScript code

A brief snippet of ASP.Net code written in C# can be inserted into the master page.

Pro

  • Does not require any server access

Con

  • Slow
  • Client browser will “blink” when JS changes the color changes from light to dark

Action Steps

  1. Open site with SharePoint Designer
  2. Open Master page with Edit in Advanced Mode
  3. Add the below code just before the </BODY> tag
<script type="text/javascript">
    //change background color to black, unless DataSheet view
    if (document.location.href.indexOf("ShowInGrid") == -1) document.body.style.backgroundColor = "#000";
</script>

2-22-2012 2-07-47 PM

IIS 7 URL Rewrite to mix anonymous and secure SharePoint content

January 25, 2012 in Uncategorized

This is a quick follow up to Chris’ SharePoint blog post http://blogs.visigo.com/chriscoulson/mixed-anonymous-and-secure-content-with-sharepoint-2010/ with an IIS trick learned from Foreignkid at http://blog.foreignkid.net/2011/11/iis-7-url-rewrite-http-redirect-to-root-site/

Summary

Blending anonymous and authenticated users on a single site can be challenging.  Enable anonymous read on all site content is generally not appropriate.  Anonymous users should only be granted a bare minimum set of permissions.  Enabling read on the “Site Pages” library works well to enable homepage viewing.  However, the challenge with this approach is that anonymous users then cannot “see” the root site (/) in order to be properly redirected with HTTP 302 (/SitePages/Home.aspx) to the homepage.

I recommend leveraging IIS 7 URL Rewrite to handle this direct at the IIS tier before SharePoint sees the HTTP request.   This way all root site (/) requests are correctly sent to the homepage – for both anonymous and authenticated users.

Action Steps

  • Allow Anonymous on the Web Application
  • Create root site collection (/)
  • Enable Welcome homepage
  • Enable Anonymous Access on “Lists and Libraries” under Site Settings
  • Grant “View Items” permission on the Site Pages library
  • Install IIS 7 URL Rewrite .MSI
  • Create a new rule with Regular Expression (^$) and 302 Redirection (SitePages/Home.aspx)

Screenshots

Allow Anonymous on the Web Application
image

image

Create root site collection (/)
image

Enable Welcome homepage
image

Enable Anonymous Access for “Lists and Libraries” under Site Settings
image

image

image

Grant “View Items” permission on the Site Pages library
image

image

image

image

Install IIS 7 URL Rewrite .MSI

Download MSI from http://www.iis.net/download/urlrewrite and install on all web front ends (WFE)

Create a new rule with Regular Expression (^$) and 302 Redirection (SitePages/Home.aspx)

image

image

image

image

image

Hope that helps!

Business Intelligence – Crossword Puzzle

January 24, 2012 in Uncategorized

Lately I’ve been a little overwhelmed with long product names in the Microsoft BI stack.  Maybe I’m lazy … but saying “PerformancePoint Services” over and over again just feels like a lot of work.  For simpler conversations please feel free to use the below acronyms.   I created a Crossword Puzzle for the five people who actually read my blog because they have entirely too much free time.  Smile

1-23-2012 8-57-20 PM

 

BI Acronyms
BCS Business Connectivity Services
BI Business Intelligence
BIDS Business Intelligence Development Studio
DD Dashboard Designer
DTS Data Transformation Services
ECT External Content Type
PP PowerPivot
PPS Performance Point Services
PV PowerView
RB Report Builder 3.0
RDL Report Definition Language
RDS Report Data Source
RSS Really Simple Syndication
SPD SharePoint Designer
SSAS SQL Server Analysis Services
SSIS SQL Server Integration Services
SSRS SQL Server Reporting Services
VS Visio Services

Error: The install in progress conflicts with a previously installed Microsoft Office 2010 Server product (FIXED)

November 17, 2011 in Uncategorized

I came across this error when doing a re-install and wanted to post it in case this helps anyone else. The root cause was that I had uninstalled SharePoint Server 2010 without first uninstalling Office Web Applications.

  • Downloaded Windows Installer Clean Up utility (msicuu2.exe)
  • Highlight any rows beginning with “Microsoft Office Web App …” and click “Remove”
  • Reboot
  • Run SharePoint 2010 install again

 

clip_image001

clip_image002

Corrupted Install? No Bueno.

November 17, 2011 in Uncategorized

I came across this today. If you’re reading this from Google search results, unfortunately I have bad news. You can’t go forward or backward. A few quick attempts on SETUP.EXE proved useless. I did find an article about how to uninstall MOSS 2007, which might be close enough to work. However, in my case it was just easier to delete the VM and get a fresh copy of Windows.  Lesson learned?    Never accidentally power off a VM halfway during install.

 

Error

  • The install in progress conflicts with a previously installed Microsoft Office 2010 Server product.
  • This product installation has been corrupted. Run setup again from the CD, DVD, or other original installation source.

http://blogs.msdn.com/b/dhirajm/archive/2010/06/20/how-to-manually-uninstall-the-microsoft-sharepoint-server-2007.aspx

clip_image001

clip_image002

Tour of Office 365 Professional (many screenshots)

October 8, 2011 in Uncategorized

Microsoft put a lot of emphasis behind Office 365 and SharePoint Online during last week’s #SPC11 conference.   The cloud is definitely here to stay and has many compelling benefits.  We all should take time to get more familiar with the products available.  Earlier this year I signed up for the trial and honestly didn’t take much time to look around before that expired.   However, today I purchased a “Professional” license so I can take my time to explore.  Smile   Below are my notes as I toured of the features.

 

Welcome Page

Clean easy to follow layout.  Standard stuff overall, but I like the use of icons and right hand side navigation pane.  Less is more.  Oh, and everything I did was with FireFox!  Full browser compatibility, not even a single hiccup.   The getting started documentation is concise, yet complete.   Everything I needed was only a click or two away.  Billing, licenses, and user accounts are all easy to find under the “Admin” tab.

image

Email is about what you’d expect.  Outlook Web Access 2010 with some 365 branding.

image

SharePoint Team Site to start with.   Pretty normal stuff here also.

image

For the full experience you’ll want to download Lync and other desktop MSI/EXE packages.

image

Service Health is a nice feature that shows a timeline of each cloud feature and status icon.

image

 

Microsoft Online Services Sign-in Assistant

You have to first download http://g.microsoftonline.com/0BX00en-US/427 for everything to work locally.   Full desktop applications (Lync, Access, Word, Excel, etc.) work best when they are integrated to your SharePoint site.   Generally corporations use Active Directory and this is already done, but with Office 365 we need an extra program to handle login.   Installation was quick and easy.

image

image

image

image

 

Access Services

I figured this was only SharePoint Foundation, and was really happy to see the various templates for “web databases” available.   Integration with Access 2010 locally was smooth and appears fully featured.  The only hiccup was authentication. 

image

image

image

image

image

image

 

Lync 2010

This is pretty cool stuff and worth more than $6/month by itself.   IM, video, live meetings, and desktop sharing. 

image

You also have granular control over which features are visible per user.  That could be handy for small businesses with fewer IT staff.

image

 

Internet Site

This feature I found to be the most interesting and it still seems to be a work in progress.   These aren’t normal Web Part Pages … nor are they HTML … they’re a new animal.   “Gadgets” replace web parts, but yet we still have zones.  Overall page editing seems reduced to a few basic toolbar buttons.   Probably still evolving, but I would guess this was done to reduce support calls (“I broke my page”).

image

image

image

 

Invite More Users

Few sales pitches are more compelling than a referral from a happy customer.   On several menus you’ll find a convenient place to invite more users to participate on the site.   That’s great from an ease of use perspective.   However, I’m not yet clear on how this dovetails into licensing costs.   You probably have to create user accounts and pay up first … then double back to grant permissions.

image

 

SharePoint Designer

Yes, SPD is available.  As best I can tell it hasn’t been restricted with the SharePoint web application controls available in 2010.   That’s good and bad.   It allows for flexibility, but you have to be careful not to break customized ASPX pages.   Workflows, permissions, and data connections are all here.

One important thing to notice on the overall tenant architecture is how the root site collection is basically just a placeholder for:

  • Internet Pages (gadgets, about company, etc)
  • Site Collection Features
  • Other admin menus

Most all of the real content work happens on the /TeamSite/ child web.   However, if you want to manually type the URL suffix “/_layouts/viewlsts.aspx” and see the all site content for the root you can do that.   This might be a good trick to know for creating more sibling child webs.   For example, a local Access database could be published to “/Database” for a cleaner simpler URL.

image

image

image

Office Web Applications

We have Word, Excel, PowerPoint, and OneNote available.   Just click any icon on the “Home” tab to start a new document.  Easy enough.  Having an Office 365 P1 license doesn’t give me any desktop applications, but still this can be a great way to build a simple document from any PC.   Just like with on-premise OWA, some of the fun features are only available in the full desktop application.  Excel, for example, could not make a chart in the web browser.   However, after making a chart with desktop Excel I was able to view it from the browser.

image

image

image

image

Windows 8 – first look

September 27, 2011 in Uncategorized

I finally got around to downloading the ISO.   Screenshots below.   I really like the Metro tile interface, but it is a bit jarring when you switch back to the classic display for common functions.  Hopefully this will be smoother before RTM.   Also, the offering of Hyper-V for virtualization was an exciting feature to see listed.   That was a big wish list item for many people on Windows 7.  IIS appears to be the same and I would expect SharePoint to run on Win8 no differently that how you can run it on Win7 today.

 

9-27-2011 11-08-09 AM9-27-2011 11-25-39 AM

9-27-2011 11-26-02 AM9-27-2011 11-31-20 AM

9-27-2011 11-31-50 AM9-27-2011 11-32-35 AM

9-27-2011 11-34-18 AM9-27-2011 11-35-42 AM

9-27-2011 11-36-10 AM9-27-2011 11-36-50 AM

9-27-2011 11-43-34 AM

Add-SPSolution: Failed to extract the cab file in the solution (FIXED)

August 20, 2011 in Uncategorized

Today I saw this error message and was able to fix by renaming the original source files in Visual Studio 2010 to remove special characters.   After checking on Google it appears that symbols such as ~!@#$%^&* may cause issues.   Lesson learned: keep file names simple so SharePoint is happy.  Smile

Add-SPSolution: Failed to extract the cab file in the solution.

8-3-2011 8-44-21 AM

References

FIXED – An attempt has been made to use a data extension ‘ADS’ … with Access Services 2010

August 15, 2011 in Uncategorized

The below error might appear if you are using Access Services 2010 for the first time.  The local Access 2010 publishing wizard will create RDL and RSDS files for reports you have.   However, the SSRS server side configuration may require a minor update to enable ADS  (Access Data Server).  See http://technet.microsoft.com/en-us/library/ee662542.aspx for full details.

The instructions are pretty clear except for where to find the “rssrvpolicy.config” file.  Mine was under C:Program FilesMicrosoft SQL ServerMSRS10_50.MSSQLSERVERReporting ServicesReportServer.   Hope that helps.  If you’d like to learn Access Service 2010 on your system be sure to check out the Northwind 2010 Web Database at http://office.microsoft.com/en-us/templates/results.aspx?qu=northwind&ex=1     Smile

 

Successful Report

image

image

 

 

Error Detail

image

image

  • An error has occurred during report processing. (rsProcessingAborted)
    An attempt has been made to use a data extension ‘ADS’ that is either not registered for this report server or is not supported in this edition of Reporting Services. (rsDataExtensionNotFound)
  • An error has occurred during report processing. (rsProcessingAborted)
    The Group expression for the grouping ‘Group1’ contains an error: Request for the permission of type ‘Microsoft.Office.Access.Server.Security.AccessServicesPermission, Microsoft.Office.Access.Server.Security, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ failed. (rsRuntimeErrorInExpression)

Central Administration – hide the Health Analyzer bar (CSS)

August 15, 2011 in Uncategorized

Many SharePoint farms display the below warning.  Unfortunately it tends to get people’s blood pressure up.  While it’s good to know about your farm, some of the underlying conditions may persist or even by expected.  A bright red color on the homepage creates a sense of panic which generally isn’t helpful.   For my CA homepage I made a simple CSS addition via Content Editor Web Part to override the background color.

I still see the messages, but they come across less like a blaring three alarm fire and more like a gentle reminder.  Smile

 

The SharePoint Health Analyzer has detected some critical issues that require your attention. View these issues. 

Before

image

After

image

CSS Code

Below is the internal code for a Content Editor Web Part to apply more calm color styling. 

   1: <style type="text/css"> 

   2: .s4-status-s4 

   3: { 

   4:     background-attachment:scroll; 

   5:     background-color:rgb(246, 246, 246); 

   6:     background-image:url("/_layouts/images/selbg.png"); 

   7:     background-position-x:left; 

   8:     background-position-top:top;    

   9:     background-repeat:repeat-x; 

  10:     border:1px 1px 1px 1px; 

  11:     border-color:#e0e0e0; 

  12: } 

  13: .s4-status-s4 a 

  14: { 

  15:     color:inherit; 

  16: } 

  17: .s4-status-s4 a:visited 

  18: { 

  19:     color:inherit; 

  20: } 

  21: </style>

 

For the really ambitious admin, you can hide the entire thing with a one liner.

   1: <style type="text/css">#s4-statusbarcontainer {visibility:hidden;display:none;}</style>

Download .DWP Web Part

Then you can easily import to your environment.

  

Return to Top ▲Return to Top ▲