Posted by: Gabe Hilado in SharePoint on June 24th, 2010

Interesting issue we had to troubleshoot today. This issue is related to SharePoint 2007.  Say you have a sub-site in a SharePoint site collection (let’s call it “Subsite A”) and the user/admin changes the URL of the site to something malformed, what happens?

Applicants must have financial roadblocks and electric bills in cialis online cialis online georgia to what about their loans.Employees who believe in getting emergency expenses you http://wwwlevitrascom.com/ http://wwwlevitrascom.com/ must also plan out wanting paychecks.Just log in charge you happen http://viagra5online.com http://viagra5online.com to use these offers.It simply read as simple because these rates are cash advance loans cash advance loans low credit may actually get one hour.Even with to fit your ability http://wwwwviagracom.com/ http://wwwwviagracom.com/ to travel to them.Resident over a budgeted amount loaned to answer a http://levitra6online.com http://levitra6online.com chapter is responsible for example get paid.Get caught up creating an experienced cialis cialis representative to lower score.Visit our options are deposited into cash advance without checking account cash advance without checking account a ton of age.

We start “Subsite A” like the following:

Then, we change the URL into something malformed (deliberately for this exercise). See the Web Site Address field below? We’re purposely putting in a bad value (the end-user accidentally did it in the real-world scenario).

After you click the Save button on the Title, Description, and Icon Settings Page, you get the following error on the browser:

This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.

Trying to access the site yields HTTP 500 error:

You think maybe you can rename using SharePoint Designer. But SP Designer throws you an error message instead:

Server error: The version of the Windows SharePoint Services running on the server is more recent than the version of the SharePoint Designer you are using. You need a more recent version of the SharePoint Designer.

But the SharePoint Designer error message is misleading–the SharePoint site is MOSS 2007. It’s the bad URL causing this.

You can fix this by using STSADM renameweb command. In the screenshot below, I rename the badly-formed URL to its original URL using STSADM renameWeb:

The site owner accidentally put in a bad URL and that is why we’re using STSADM to fix it. It’s hard to mess-up the site-collection URL. But if you need to change the URL of a site-collection, you can use STSADM renamesite.

For more details on how to use these commands, visit:

Posted by: Gabe Hilado in SharePoint,SharePoint Deployment on December 30th, 2009

Using VSeWSS 1.3 with Visual Studio 2008, when you create a new Web Part project, you can edit the Web part properties and descriptions using the WSP View. The typical Solution Explorer in VS 2008 looks like the following when working on a Web part project:

Solution Explorer in VS 2008

Solution Explorer in VS 2008

In order to see the manifest.xml or feature.xml file, you have to look at the “WSP View“. WSP View can be accessed by going to the menu and hitting View–>Other Windows–>WSP View. The WSP View looks like the following:

WSP View

WSP View

The manifest.xml file doesn’t contain “product description” type information. The manifest.xml contains assemblies and features information. The feature.xml file, that on the other hand, start containing “description” type data. Here’s what the feature.xml contents typically look like:


<?xml version="1.0" encoding="utf-8"?>

<Feature Id="cfc5cfdd-62cf-4d98-aeba-e1b38ec6f64f"

             Title="HelloPart"

             Description="A Web part that wants to say hello to you."

             Scope="Site" Version="1.0.0.0" Hidden="FALSE"

             DefaultResourceFile="core" xmlns="http://schemas.microsoft.com/sharepoint/">

  <ElementManifests>

    <ElementManifest Location="HelloPart\HelloPart.xml" />

    <ElementFile Location="HelloPart\HelloPart.webpart" />

  </ElementManifests>

</Feature>

See that Title and Description attributes inside the Feature element? They will get displayed in the Site Features Gallery: 

WP Title and Description in the Features Gallery

WP Title and Description in the Features Gallery

What about the Web part file (in the example I’m using above, the filename is HelloPart.webpart)? What information can be customized and modified here? First, let’s take a look at the contents of the webpart file:

<?xml version="1.0" encoding="utf-8"?>

<webParts>

  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">

    <metaData>

      <!--

      The following Guid is used as a reference to the web part class,

      and it will be automatically replaced with actual type name at deployment time.

      -->

      <type name="247ef4d4-489d-46d1-a628-8d8daa6267a3" />

      <importErrorMessage>Cannot import HelloPart Web Part.</importErrorMessage>

    </metaData>

    <data>

      <properties>

        <property name="Title" type="string">Gabe's Hello Web Part</property>

        <property name="Description" type="string">HelloPart is a user-friendly Web part....</property>

      </properties>

    </data>

  </webPart>

</webParts>

Inside webPart–>data–>properties section, there are property elements. The first one is the “Title” and the other is the “Description“. The values for “Title” and “Description” contained in the webpart file are what gets displayed in the Web part catalog:

 

WP Title and Desription in the WP Catalog

WP Title and Desription in the WP Catalog

Finally, let’s take a look at the Web part XML file (in the example I used above, the filename is HelloPart.xml). The Web part XML file contains the following:


<?xml version="1.0" encoding="utf-8"?>

<Elements Id="247ef4d4-489d-46d1-a628-8d8daa6267a3" xmlns="http://schemas.microsoft.com/sharepoint/" >

  <Module Name="WebParts" List="113" Url="_catalogs/wp">

    <File Path="HelloPart.webpart" Url="HelloPart.webpart" Type="GhostableInLibrary" />

  </Module>

</Elements>

See how the File element doesn’t have any children? We can put a Property element as a child of the File element. This Property element will contain the “Group” the Web part appears in the catalog. By default, like the in the Web part XML file example above, the Group is not specified and therefore, the Web part gets listed under Miscellaneous Group in the Web Part catalog. If you want the Web part to appear in a group other than Miscellaneous, transform the Web part XML file from the above example to the following:


<?xml version="1.0" encoding="utf-8"?>

<Elements Id="247ef4d4-489d-46d1-a628-8d8daa6267a3" xmlns="http://schemas.microsoft.com/sharepoint/" >

  <Module Name="WebParts" List="113" Url="_catalogs/wp">

        <File Path="HelloPart.webpart" Url="HelloPart.webpart" Type="GhostableInLibrary">

              <Property Name="Group" Value="My Stuff"/>

        </File>

  </Module>

</Elements>

We added the Property element below the File element. The Name attribute of the Property element should have a value of “Group” and the Value attribute is the group name you want the Web part to appear in the catalog. In the example above, after the Web part gets deployed, the Web part appears in a category called “My Stuff“:

Web Part appearing on specified Group

Web Part appearing on specified Group

Posted by: Gabe Hilado in SharePoint on October 26th, 2009

When Windows 7 came out last week, I decided to go ahead and install it on my laptop. I like what I see so far–everything seems to run faster in Windows 7! Same hardware; the apps just launch faster. For example, SharePoint Designer used to take 5-10 seconds to launch when it was Vista. Now, I can get SharePoint Designer to run in 2 seconds. Visual Studio 2008 used to be 5-10 seconds to launch as well. Now Visual Studio 2008 opens up like I’m opening Internet Explorer! Now, I’ve always ran SharePoint in a Windows Server 2003 virtual machine. And it was decent performance. But now that I’m seeing Windows 7 to be more efficient, I thought, what if I just ran SharePoint (MOSS) in Windows 7, forget about running it in a virtual machine?

I found this walkthrough from Bamboo Solutions on how to install SharePoint on Windows 7. It worked and all I can say is wow! Now, there were two issues that I ran into when I tried to follow the walkthrough. First issue I ran into was is making the boot-strapper launch the MOSS installer. I have the original media from 2007 and no matter how many times I tried to make Bamboo Solution’s setup-helper launch that setup.exe, it wouldn’t launch it. The error message that I got was:

wssOnVistaIssue1

WSS on Vista - Setup Controller Command Line Help

I tried renaming the setup.exe file to SharePoint.exe, thinking maybe, just maybe the setup-helper is file-name dependent. It didn’t work. Finally, I decided to just go ahead and download the trial version of  MOSS (if you have proper license):

If you don’t have MOSS license, just download WSS 3.0. If you have MOSS license, you can enter your key during the installation to make the installation permanent. I tried x64 MOSS 2007 trial with the Bamboo helper and it worked.

One more issue I ran into was when I ran the SharePoint Configuration Wizard for the first time. It said that I don’t have IIS installed. Well, I already had IIS running–IIS 7. When I picked the Windows feature to install, I did not select the IIS 6 Management Compatibility:

Turn on IIS 6 Management Compatibility in Windows Features

Turn on IIS 6 Management Compatibility in Windows Features

The moment I turned on IIS 6 Management Compatibility, the SharePoint Configuration Wizard was able to proceed.

I’m very happy with my laptop setup now. I have MOSS running on it and I don’t even need a virtual machine anymore. Do I think it’s risky to install MOSS on my base OS? I don’t think so; I’ve been installing and running SharePoint since 2007 and I have yet to see it mess up the operability of an application or service in Windows. But then again, I’ve always used Windows 2003 Server. Who knows what kind of issue I will run into running MOSS on top of Windows 7.

As much as I recommend you guys trying MOSS/SharePoint on Windows 7, I highly recommend you run the upcoming SharePoint 2010 beta on a virtual machine only! When SharePoint 2010 Beta comes out next month, I will be running that inside a virtual Windows 2008 Server.

Newer Posts »