Rob Garrett - Blogs

Welcome to Rob Garrett - Blogs Sign in | Join | Help
in Search
Google

Software/Technology Discussion

Software and Technology Tid-bits

  • SharePoint InfoPath Submission as Anonymous User

    Creation of user submitted forms within web sites typically involves some HTML and JavaScript magic; to post data to a back end business storage or processing system.  ASP.NET relies on form HTTP POST exclusively to implement the page post back mechanism, familiar to all ASP.NET developers.  Developers manipulate form posted data using server-side code, invoked after form data is submitted to the web server.  In ASP.NET this code usually exists as code behind or code inline VB.NET or C#, using the Framework to access posted data via a dedicated request object.  So what about SharePoint?

    Microsoft's answer to form submission in SharePoint is InfoPath Services.  Microsoft Office InfoPath 2007 supports web browser enabled forms within Microsoft Office SharePoint 2007 ("MOSS") Enterprise using a dedicated InfoPath engine running in MOSS - InfoPath Server.  Unfortunately, if you're using Windows SharePoint Services, or any version of MOSS below Enterprise then InfoPath Services is unavailable to you, and your left with the alternative of hosting ASP.NET forms using custom developed web parts or user controls.

    InfoPath Services work well - non-developers can create forms within InfoPath 2007 on their desktop and then publish these forms to a "forms library" in MOSS.  The problem comes about when hosting InfoPath forms in Publishing Web site collections with anonymous user access turned on.  Typically, site owners like to access form submitted data in a SharePoint list, for future processing, which is a problem when a user submitting form data is not authenticated.  Any good publishing site in MOSS utilizes the lock-down feature so anonymous users cannot access back-end lists, which includes write access.  With lock-down enabled, InfoPath Server is unable to submit anonymous user form data, and usually throws up an error.   Fortunately there exists a clean solution, using web service submission, detailed below in this blog post...

    Getting Started

    Before we get into the specifics of implementation be sure that your version of MOSS 2007 is Enterprise and that InfoPath Services is turned on.  Within SharePoint Central Administration, under the Applications Management tab, click Configure InfoPath Forms Services under the InfoPath Forms Services section.

    image

    Make sure that the top two check boxes are checked to allow hosting of forms.

    Within the Site Settings of the top level site collection of the SharePoint site hosting InfoPath Services, click Site Collection Features. Make sure that "Office SharePoint Server Enterprise Site Collection features" is enabled.

    The Forms Library

    Next, create a "Form Library" within the host site collection - I suggest hosting at the top level site collection to make life easier.  For the purpose of this blog post I created a form library called "Test Forms."  You can use the default forms library installed by SharePoint, although it's best to create your own library to prevent overwriting existing published templates in the default library.

    image

    The Web Service

    This is the tricky part of this operation.  Rather than submitting directly to SharePoint from InfoPath we're going to submit via a custom WCF Web Service, hosted in SharePoint.  Be sure to install .NET 3.0 (ideally .NET 3.5 also) on the SharePoint server. 

    Check that the WCF extensions are installed into IIS - the SVC file extension should map as follows:

    image 

    Create a standard class library, create the following interface definition:

       1:     [ServiceContract(Namespace = "http://contoso.net/Schemas/WCF/InfoPathService/")]
       2:      public interface IInfoPathService
       3:      {
       4:          /// <summary>
       5:          /// Upload InfoPath form data to a library in SharePoint.
       6:          /// </summary>
       7:          /// <param name="formData">Form Data.</param>
       8:          [OperationContract]
       9:          void PostInfoPathForm(string formData);
      10:      }

    Create a class that implements the above interface and includes the following methods:

       1:          public void PostInfoPathForm(string formData)
       2:          {
       3:              // Use elevated privileges so anonymous users can upload through
       4:              // this service.
       5:              SPSecurity.RunWithElevatedPrivileges(delegate { UploadToDocLibrary(formData); });
       6:          }
       7:   
       8:          private static void UploadToDocLibrary(string formData)
       9:          {
      10:              try
      11:              {
      12:                  // With the form data submitted to this web service, we now
      13:                  // need to find the location for submitting list data.
      14:                  XmlDocument xmlDoc = new XmlDocument();
      15:                  xmlDoc.LoadXml(formData);
      16:                  // Get the XSN location
      17:                  XmlProcessingInstruction pi = 
      18:                      (XmlProcessingInstruction)xmlDoc.SelectSingleNode("/processing-instruction(\"mso-infoPathSolution\")");
      19:                  if (null != pi && !String.IsNullOrEmpty(pi.Value))
      20:                  {
      21:                      Match m = Regex.Match(pi.Value, "href=\"(.+?)\"");
      22:                      if (m.Success && m.Groups.Count > 1)
      23:                      {
      24:                          string xsnLoc = m.Groups[1].Value;
      25:                          if (!xsnLoc.StartsWith("http", StringComparison.OrdinalIgnoreCase) || !xsnLoc.ToLower().Contains("/forms/"))
      26:                              throw new Exception("XSN location is not a published InfoPath document library.");
      27:                          // Open the site and web, try to get the list.
      28:                          using (SPSite site = new SPSite(xsnLoc))
      29:                          {
      30:                              using (SPWeb web = site.OpenWeb())
      31:                              {
      32:                                  web.AllowUnsafeUpdates = true;
      33:                                  string libLoc = xsnLoc.Substring(0, xsnLoc.LastIndexOf("/Forms/"));
      34:                                  // Upload form data to the library.
      35:                                  SPFolder folder = web.GetFolder(libLoc);
      36:                                  if (null == folder)
      37:                                      throw new Exception("Cannot find the InfoPath document library root folder.");
      38:                                  UTF32Encoding encoder = new UTF32Encoding();
      39:                                  byte[] data = encoder.GetBytes(formData);
      40:                                  folder.Files.Add(String.Format("{0}/{1}.xml", libLoc, Guid.NewGuid()), data);
      41:                                  web.AllowUnsafeUpdates = false;
      42:                              }
      43:                          }
      44:                      }
      45:                  }
      46:              }
      47:              catch (Exception ex)
      48:              {
      49:                  throw new Exception("Failed to upload form data", ex);
      50:              }
      51:          }

    The above code runs as a privileged user, thus getting around the anonymous user posting problem, and submits the form data to the SharePoint on the users behalf.  The code above assumes that the InfoPath forms library exists at the same location as the XSN, which typically lives in the "Forms" folder of the library.

    Compile the class library and add the assembly to the GAC.

    Create an SVC file, named InfoPathService.svc, as follows, replace the qualified name for the assembly in the GAC, and the service namespace.

       1:  <%@ Assembly Name="Fully qualified assembly name"%> 
       2:  <%@ ServiceHost Service="My.Namespace.InfoPathService" %>

    Create a web.config file as follows:

       1:  <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
       2:  <configuration>
       3:    <system.serviceModel>
       4:      <services>
       5:        <service behaviorConfiguration="InfoPathService.service1Behavior" name="My.Namespace.InfoPathService">
       6:          <endpoint binding="basicHttpBinding" contract="My.Namespace.IInfoPathService" bindingNamespace="http://contoso.net/Schemas/WCF/InfoPathService/" />
       7:        </service>
       8:      </services>
       9:      <behaviors>
      10:        <serviceBehaviors>
      11:          <behavior name="InfoPathService.service1Behavior">
      12:            <serviceMetadata httpGetEnabled="true" />
      13:            <serviceDebug includeExceptionDetailInFaults="false" />
      14:          </behavior>
      15:        </serviceBehaviors>
      16:      </behaviors>
      17:    </system.serviceModel>
      18:  </configuration>

    Copy the InfoPathService.svc and web.config file to subdirectory: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\MyWebServices

    Confirm that the service spins up using the address of your server, e.g:

    http://contoso.net/_vti_bin/MyWebServices/InfoPathWebService.svc

    InfoPath

    With the web service installed and functioning inside SharePoint, it's now time to create a form in InfoPath 2007, and publishing it to the SharePoint forms library.  Remember I created a form library at /Test Forms earlier.

    Open InfoPath 2007 on your desktop and design a new form (I'm using a modified expense report).

    image

    Click the Design Checker and then change the Compatibility Settings.  Input the URL of your SharePoint site collection (not the form library).

    image

    Under Tools, Submit Options, change the submit options to use the web service we created, as follows:

    image 

    When creating the data connection, be sure to submit the entire form data to the web service as a string:

    image

    Publishing the Form

    Publish the form using the Publish command under the File menu.  Publish to SharePoint server:

    image

    When prompted for the location use the URL of site that contains the for library you defined.

    Publish to a document library and enable browser form completion as follows:

    image

    Select the form library we created earlier:

    image

    Finally, map the fields to columns in the SharePoint list:

    image

    Testing the Form

    Before attempting to create a new form in the form document library (using the New command from the menu), make sure that the library is configured to open forms in the browser (form library settings, advanced settings).

    Presto! The form should render in the browser:

    image

    Try filling out the form and submitting.  The submitted data should flow via the web service and into SharePoint.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Groove 2007 - Disable the Annoying Popup Dialog

    Those of you using Groove 2007 are probably well aware of the annoying popup dialog that appears when the shift key is pressed more than once.  This issue is exacerbated when inside a remote desktop or terminal session.  Finally, I found a fix...

    http://support.microsoft.com/kb/940165

    To resolve this problem, follow these steps.

    1. Exit Groove 2007.

    2. Click Start, click Run, type regedit.

    3. Locate and then click the following registry subkey:

    HKEY_CURRENT_USER \SOFTWARE\Microsoft\Office\12.0\Groove

    4. If Groove does not contain an InstaGroove key, create it. To do this, point to New on the Edit menu, click Key, and then enter the name InstaGroove.

    5. Click to select InstaGroove.

    6. On the Edit menu, point to New, and then click DWORD Value.

    7. Enter the name DisableHotkey.

    8. Right-click DisableHotkey, and then click Modify.

    9. Under Value data, type 1, and then click OK.

    10. Exit Registry Editor.

    11. Start Groove 2007.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • SharePoint Training

    Need some SharePoint (MOSS 2007) training?  Want to take advantage of MOSS 2007 development under Visual Studio 2008 and SQL Server 2008?  Never been to Norway?

    Then check out Sahil Malik's training program this September 1, 2008.  Details (here).

    If Norway is a little too far to travel, I can also personally vouch for Ted Patterson training, of which Sahil is also providing a training session September 22, 2008.  Details (also here).

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Sysinternals Tools at Your Fingertips

    Check this out (I'm sure I'm not the first to blog this) - type the following UNC path into a file explorer on your pee-cee....

    \\live.sysinternals.com\

    Presto - every Sysinternals tool for you without ever having to download it.

    HTTP works too...

    http://live.sysinternals.com/

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Certified Microsoft Office SharePoint Server Developer

    It's now official, I am now certified as a MS-TS MOSS Application developer Smile

    Next hurdle:  MOSS configuration, and then .NET certification.

    Update 5/7/2008 - I took the WSS application exam today (for kicks) and passed.
     

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • SPSecurityTrimmedControl

    This is one of those blog posts that I cannot take credit, but want to keep the information handy for a later time.

    The SPSecurityTrimmedControl shipped with WSSv3 is a very powerful control. It basically allows you to conditionally display content depending on the user’s permission.

    Thanks to Waldek for his post on conditional security trimming of page layout content in SharePoint.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Vista MCE and HD - At Last

    Recently - I finally decided to take the plunge with Vista Media Center Edition and High Definition Cable TV.... 

    I've been a fan of MCE for some time, and up until February this year I'd been using Vista MCE with a standard analogue cable line into a dual receiver Hauppauge tuner card and doing relatively well.  Those of you following my rants about Comcast Cable TV of Montgomery County already know that I'd sell my grandma for a time when a better, cheaper solution to cable TV was available - and that time has finally arrived (I didn't have to sell my Grandma - besides EBay prohibits the sale of family members).

    Verizon now offer FIOS TV in my area, and with a standard premium package inclusive of HDTV on offer for $42.99 a month, it didn't take much to ditch Comcast ($68.00 a month).

    I've been keeping a close eye over the last few months on the handful of vendors offering Cable-Labs certified Vista PC's and decided on the purchase of a new Dell XPS 420 with dual ATI TV Wonder Cable Card Tuners.  My decision came down to the following rationale:

    • Dell offers the cheapest Cable-Card solution (at time of writing).
    • Unless I fork out over 4G for a machine; most Vista machines offering Cable-Card are inferior to the Dell XPS.
    • ATI is pretty much the only supplier of Cable-Card tuner for Vista and Dell sold me a pair for $350, unlike other vendors charging $280 a piece.
    • Dell would ship me a machine within a month.
    • Dell is a well known brand.
    • Internal tuners do not sell me because my machine sits out of the way in the basement.

    Two weeks after I place my order for an XPS-420 with 1TB disk, 4G RAM and the dual tuners a new box arrived on my doorstep - ahead of schedule.

    IMG_3325

    Setup of my machine was straight forward - my dell shipped with Vista Home Premium and Cable Card support and the drivers for the ATI tuners installed.  After I uninstalled the free Dell software and turned off all unnecessary services in Vista (it's a server, so no need for Aero) I was ready for the Verizon service person to come and install Cable Card TV.

    At 11am one chilly Saturday morning the Verizon guy arrived - I'd called ahead and placed the installation order for Cable-Card so he came with this expectation.  My new XPS was running in my front room, connected to an LCD monitor (so no XBOX 360 Extender to confuse the issue) and MCE running and at the cable-card configuration screen.

    The Verizon engineer had never installed Cable-Card in a computer before, but I assured him it was as easy as installing for an HD-TV.  I read somewhere ahead that each cable-card pairs with it's host tuner, so make sure you know which ATI unit is tuner #0 and tuner #1 in MCE because the engineer calls in the cable-card serial number with HQ to activate the cable signal.

    IMG_3324

    After a short wait on the phone with HQ both cable-cards were activated and receiving a signal - I was then able to tune Vista to an HD channel.  During the whole process the most difficult part was downloading the correct EPG (Guide) for my area because there are several for my zone and each has a slightly different channel number line up.  With correct EPG installed and tuners configured I was able to watch and record HDTV, the only issue I had was with some of the channels in the guide not being part of my service package, which caused Vista to pause looking for the signal when I tuned to these channels.

    After tipping the Verizon guy and wishing him a good day I preceded to move my XPS to it's resting place and hook up my XBOX 360. As with my older machine, this process was a breeze, and it didn't take long before I had HDTV on the large screen.  A tip for those hooking up a similar setup - make sure you have a nice fast network link between your XBOX and MCE, no wireless for instance, otherwise HDTV will hog the bandwidth.

    The acid test with my new setup was whether my wife would have any issues when she came home.  Lisa is familiar with Vista MCE so the new faster machine scored some brownie points, and the monthly savings on the cable bill also got me a high five.  So far we've been doing good with the new channel line up (lots more channels) and HD content.  One quirk we found with Vista MCE is that it doesn't automatically choose HD channels when scheduled recordings are set to "any channel" - you have to explicitly choose the HD channel otherwise Vista records from the first SDTV channel (since HD channels are higher numbering in the channel list).  An episode of "Dancing with the Stars" in HD was day and night compared to SD, and once I demonstrated the difference it didn't take much to convince Lisa to reprogram the list of scheduled recordings.

    I've noticed that my MCE platform is a little sluggish when recording from two HD channels and playing a recorded show simultaneously, so I would recommend a minimum 4GB RAM and a dual or quad core processor if you like uninterrupted viewing.  I'll report back as my new toy gets more usage...

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Prolific PL-2303 Driver - Vista x64

    I purchased a USB to RS232 Serial cable so I could hook up my GPS unit to my laptop and found out that installing the driver on Vista 64 was problematic. 

    Disabling driver signing verification with the following command at an elevated prompt, followed by a reboot, enabled me to install the driver.

    BCDEDIT.EXE /SET NOINTEGRITYCHECKS ON

    Download the prolific XP 64 bit driver (installs on Vista 64 after disabling driver signing verification) from:

    Link

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • SharePoint Identity

    SharePoint user identity is sometimes confusing for developers....

    • When connecting to external resources (like a SQL database via BDC) what user identity does SharePoint use? 
    • How does SharePoint impersonate when using forms-based authentication?
    • What's the difference between a Windows user and a WSS User?
    • What is SPSecurity.RunWithElevatedPrivileges?

    It's questions like those above the can often lead to confusion - throw IIS authentication settings into the mix and developers too often find themselves scratching their heads as to why BDC (Business Data Catalog) or external resource access is not working.

    My attempt at explaining impersonation within SharePoint is best summarized with the following table:

    Authentication Windows Account WSS Account
    FBA IUSR_MACHINENAME FBA User
    Elevated FBA App Pool User SHAREPOINT\System
    Windows Windows User Windows User
    Elevated Windows App Pool User SHAREPOINT\System

    Impersonation

    SharePoint keeps track of two different user account types - Windows account identity, and internal WSS account.  SharePoint uses the WSS account to grant access to secured SharePoint objects - lists, documents etc.  The ASP.NET runtime, which SharePoint sits atop, impersonates the Windows account identity when executing a SharePoint web application, and it is this impersonation that dictates whether web parts or custom code logic is able to access external secured resources (files, SQL server etc).

    Taking a closer look at the web.config for a virgin SharePoint site shows the following XML node:

    <configuration>
      <system.web>
        <identity impersonate="true"/>
      </system.web>
    </configuration>

    The above node allows the ASP.NET runtime to impersonate the windows account passed by IIS  (setting this to false restricts ASP.NET to run under the default worker process - typically the ASPNET local account).

    Windows Authentication - SharePoint is configured by default to use Windows authentication (NTLM or Kerberos).  When the user attempts to access a secured page within SharePoint an HTTP 401 status code is passed back through IIS, which then causes the familiar Windows credentials prompt to appear in the browser.  After passing successful credentials; IIS authenticates the user and passes the windows user token on to SharePoint.  The SharePoint web site executes within this new authenticated user context.  In this authentication scheme the WSS account and windows identity account are synonymous - line 3 in the table above.

    Forms Based Authentication - FBA is a completely different animal to Windows Authentication and is managed by ASP.NET rather than IIS.  By default IIS passes the standard IUSER_MACHINENAME local user account token to ASP.NET.  ASP.NET is configured to authenticate using forms by the following XML in the web.config file:

    <configuration>
      <system.web>
        <authentication mode="Forms"/>
      </system.web>
    </configuration>

    When ASP.NET detects FBA and a secured pages is requested by a user; the runtime looks for a known cookie, if the cookie is present the authentication succeeds, otherwise ASP.NET redirects the user to a login page.  Upon successful authentication the SharePoint web application runs under the IUSER_MACHINENAME user context.  The WSS account is depicted by the forms authentication identity, which is dependent on the membership provider configured in ASP.NET.  Example WSS account identities under FBA are SQL member accounts via the Local SQL Membership Provider or AD members accounts via the AD Membership Provider. 

    Note: Authenticating against Active Directory using the AD forms-based membership provider is NOT the same as authenticating via Windows NTLM or Kerberos - in the former case the user context is still IUSR_MACHINENAME, where as Windows authentication receives the user token for the authenticated user from IIS.

    Elevated Privileges

    Anyone who has played with SharePoint object model has probably used the SPSecurity.RunWithElevatedPrivileges function.  This function allows access to secured SharePoint objects from the object model by changing the WSS user account context to SHAREPOINT\System - a highly privileged user in SharePoint.  Calling this function also has the effect of changing the current windows user context to the current application pool user, configured in IIS.  In typical SharePoint farm installations, the application pool user is an AD user with restricted permissions and limited access to external resources, although typically this user has more permissions than the local IUSR_MACHINENAME user.

    Good Practice

    If you're not concerned with FBA and/or anonymous access to your SharePoint sites then the anonymous account used by IIS is of no concern to you.  All you need to remember is that the elevated privilege method switches the current authenticated windows user to the app pool user, which is probably desirable if the app pool user is configured for external resources via BDC.  Most developers use this method to gain them access to secured SharePoint objects, but it is just as useful if you need access to external resources.

    When setting up FBA with anonymous authentication scenarios it is important to be aware of the IUSR_MACHINENAME windows account in context.  For example, if you reference custom ASCX files in SharePoint page templates and these ASCX user controls live in a secured directory on the server; then you're going to see request for credentials on your anonymous site. If you have a web part that needs to access a third party system or network resource then the IUSR_MACHINENAME account will prevent your web part from working.  Generally I suggest the use of SPSecurity.RunWithElevatedPrivileges function when accessing network/external resources.  However,  if you want to avoid a potential security hole because your code can now access any SharePoint object via SHAREPOINT\System, then an alternative is to configure the IIS anonymous account as an AD domain account.

    Hopefully this blog post has distilled the common confusion surrounding SharePoint identity, I know that I'll be coming back to the above table from time to time.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Custom XML Feeds in IE7

    I often find myself writing custom XML generators in ASP.NET using Http Handlers.  To test my code I want to open my browser and render the XML - naturally. 

    image

    In the days of IE6 all was good - I could render the XML and Internet Explorer would show me a nicely formatted view of my XML with collapsible nodes (as above).  Since the inception of IE7 I've noticed this nice feature is broken (at least on the few machines I use).  I chalked this problem up to the new RSS viewer, built in to IE7, and have got along by saving my XML and opening the result in Visual Studio (or some other XML editor). 

    Today I was done with the extra effort in the XML debugging process, so I decided to see what was up IE7's butt as to why it would not render my XML.  IT seems that the RSS viewer had nothing to do with it, the problem was a result of a missing MSXML3.DLL registration (go figure), the following command issued at an elevated command line followed by a browser restart fixed all for me:

    regsvr32 msxml3

    Before all your Fire Fox fans start jumping up and down (yes, I use FF too).. I know FF always renders XML without issues, but I was tired of installing FF on each and every Virtual Server I found myself on developing dynamic XML.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • SharePoint Custom Content &amp; Structure Report

    I came across some really cool functionality in SharePoint 2007 today.... 

    One of my clients has a deep hierarchy of sites and pages maintained in SharePoint - this hierarchy drives content management for their web site.  Most of the publishing pages on their site have an embedded boolean field, called "Appear on Home Page" as part of the page content type, which controls whether elements of the data contained in the page are featured on the site home page. 

    My client wanted a roll-up view across the whole site of all pages where the "Appear on Home Page" field was set to "yes" so they could administer home page articles in one location rather than searching across the hierarchy manually.

    Those of you familiar with WCM in SharePoint 2007 may know about the various "Content and Structure Reports," available via either "Site Actions" menu or within the "Content and Structure" view under the view menu.  These reports traverse the site hierarchy looking for pages meeting certain criteria and display the matching pages as a list.  Users can then view/edit/delete these pages, like they would any other collection of pages contained within document libraries. 

    How neat it'd be to create custom reports similar to those shipped with MOSS.

     

    image

    image

    Turns out that adding your own "Content & Structure Report" into SharePoint is trivially easy:

    1. Access the "Content and Structure Reports" list at /Reports%20List/AllItems.aspx
    2. Add a new list item and set the CAML query field to the expression required, in my case:

      <Where><Eq><FieldRef Name="Appear_x0020_on_x0020_Home_x0020_Page"></FieldRef><Value Type="Integer">1</Value></Eq></Where>
    3. Presto, the new report is available.
    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • "Submit" ASP.NET and SharePoint

    One of my developers and I ran into an interesting problem today - we'd migrated a web site over to SharePoint 2007 (using a popular content migration tool) and found that all page postback calls in SharePoint were giving JavaScript errors, specifically:

    Object doesn't support property or method.

    Turns out that our master page and page layouts contained input controls (text boxes) with name/id as "submit".  Use of this reserved name sent ASP.NET's JavaScript code into a tailspin and wrecked havoc with any postback submissions.

    So, when you develop web sites in ASP.NET and/or SharePoint, be inventive with names for your buttons, text boxes and hidden fields - how about btnSubmit ;)

    I read somewhere else that naming the main ASP.NET form "default" is a no-no also.

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • Visual Studio 2008

    I finally got around to installing VS2008 RTM today - wow what a marathon!  4 hours after I started, I finally had 2008 installed and working. 

    I was running into problems installing Microsoft .NET 3.5 .NET Framework - both from VS2008 installer and when I attempted to install the framework as stand-alone.  Vista adds complication to the install because .NET 2.0 and .NET 3.0 are part of the Vista  OS, and it is when .NET 3.5 attempts to upgrade these previous framework versions; problems occur. 

    [12/30/07,12:23:51] Microsoft .NET Framework 3.5 'package': [2] Error: Installation failed for component Microsoft .NET Framework 3.5 'package'. MSI returned error code 1603
    [12/30/07,12:24:00] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.5 'package' is not installed.

    I read numerous blog posts about uninstalling hot fixes on Vista, which seemed to aggravate .NET 3.5 all the more because the installer then belly ached that .NET 2.0 SP1 was missing.  Each time I'd rerun the .NET 3.5 installer the process would run for about 40 minutes on my dual core 64-bit laptop before coughing up some error.  It is amazing how much other things you can get done if you're not watching Microsoft progress bars - I managed to prepare lunch, eat it, clean up, and have time for a short nap in the time that my machine spent chugging, apparently to a worthless end with each iteration.

    I finally resolved my problem by uninstalling IIS on Vista (I rarely use it anyway) after reading similar complaints on this forum - after a quick reboot the full installation of .NET 3.5 and Visual Studio 2008 et al went without a hitch. 

    I love MS products, when they work, but I have to wonder why each version of Visual Studio (I had the same pains with VS2005 and VS2003) requires open heart surgery on my operating system and half a day of an unusable machine before the installation finally works - and I didn't even meddle with Beta versions this time! 

    Is it just me? Am I expecting a lot from the Visual Studio team? Is this the norm and I should be quiet about it?

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • SharePoint Designer and SharePoint Out of Sync

    If you ever find yourself in a situation where SharePoint Designer insists that a master page, page layout, or CSS file is checked out and the same file in the SharePoint Gallery is shown as checked in then there is a problem with your SPD web cache.  Attempting to check the file in through SPD gives the error:

    "Cannot perform this operation. The file is no longer check out or has been deleted."

    Solution:

    Locate the WebsiteCache directory below and delete it:

    Vista: %UserProfile%\AppData\Local\Microsoft\WebsiteCache

    Windows 2003/XP: %UserProfile%\Local Settings\Application Data\Microsoft\WebsiteCache

    Share this post: Email it! | bookmark it! | digg it! | reddit!
  • MOSS - Save Publishing Site as Template

    Those of you who like to use the "Save Site as a Template" functionality in SharePoint might wonder where the option disappeared to; when the site you have in mind for your template is a Publishing Site (Web Content Management)...

    The official word from Microsoft is that this functionality is not supported for publishing sites and the option is removed from the site settings.  However, the link to the ASPX page still exists, so the following URL snippet will enable you to save a publishing site as a template - real handy if you've customized the hell out of your site with content types:

    http://myserver/mysite/_layouts/savetmpl.aspx

    Share this post: Email it! | bookmark it! | digg it! | reddit!
More Posts Next page »

Blurb


Head Shot
Rob Garrett is a British Expat living in Maryland USA. Rob is a trained software engineer and experienced in Windows .NET development.

Rob enjoys listening to Rock music, posting to blogs, driving in the country with the sunroof open, beer (not in conjunction with country driving) and spending time with his family.

This Blog

Syndication

Powered by Community Server, by Telligent Systems