Download all the solutions from the centreal administration solution store

December 20th, 2009 by sharedpoint

I originally created this as a console application but later I realized that a lot of organizations do not source control there solutions packages [Hint Hint, if your not already doing this ... do it!] so they needed a way to extract there custom solution packages and redeploy or review the current production code packages. Project allows you to view additional properties from a newly created solution page on the operation page and also to download all the solutions from the centreal administration solution store. A new link is placed under the solution link which brings you to a newly created custom coded page.

here is the link to the documentation and the source code… http://spsolutiondownload.codeplex.com/

SP Error: Access Denied – when you choose to ‘Edit Properties’ on a list item

December 20th, 2009 by sharedpoint

If you create a document library, add a document, and then use the drop-down on the item to pick “edit properties” and you bounce to the SP Error: Access Denied screen even though the account is a site admin and has full access to the sub-site(s).

It almost seemed like a permission problem generating the property edit forms and there was nothing produced in the SP log files other then 401 errors, but other document libraries were letting us view and edit properties so it was funny that we could not edit some but not others. I tried to set permissions for a specific document or folder and it is not possible. In the Actions there is only “Manage Permissions of Parent” which is the list not the specific item. I also tried this with the Site collection admin account; System Account and user Account with full control on site and  sub-sites.

Even when you created new document libraries with inherieted permissions it still would not allow you to edit properties on a list item/document. It now seemed like it was only on newly created objects go forward.

We were currently are on 12.0.0.6332 for all environment servers, after investigation I seen it was an issue Microsoft was aware of and recommended to upgrade to the Februray hotfix rollup kb961756 & kb961755 contain a fix to prevent this issue from occuring problem is this does not fix existing sites though and some have indicated it still does not fix the problem. It has also been noted that SP2 fixes the problem but the community seems to disagree, I’m not sure if this happens on all lists but it did happen within document libraries.

The specific problem can be replicated by performing an export\import on any site or site collection on a farm this happens with 3rd party tools also utilizing the object model through asmx pages.

What I ended up doing was building a utility that takes the url of the site collection and list name as parameters and then changes the xml schema to reset the item attributes to true.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.Xml;

namespace Custom_ItemPerm_Hotfix
{
    class Program
    {
        static void Main(string[] args)
        {
            FixField(args);
        }

        static void FixField(string[] args)
        {
            string RenderXMLPattenAttribute = “RenderXMLUsingPattern”;

            //Console.WriteLine(“Please enter the URL of the site: (Press enter after typing):”);
            string weburl = args[0];

            //Console.WriteLine(“Please enter the Document Library Name: (Press enter after typing):”);
            string listName = args[1];
            SPSite site = new SPSite(weburl);
            SPWeb web = site.OpenWeb();
            SPList list = web.Lists[listName];
            SPField f = list.Fields.GetFieldByInternalName(“PermMask”);
            string s = f.SchemaXml;
            Console.WriteLine(“schemaXml before: ” + s);
            XmlDocument xd = new XmlDocument();
            xd.LoadXml(s);
            XmlElement xe = xd.DocumentElement;
            if (xe.Attributes[RenderXMLPattenAttribute] == null)
            {
                XmlAttribute attr = xd.CreateAttribute(RenderXMLPattenAttribute);
                attr.Value = “TRUE”;
                xe.Attributes.Append(attr);
            }
            string strXml = xe.OuterXml;
            Console.WriteLine(“schemaXml after: ” + strXml);
            f.SchemaXml = strXml;
        }

    }
}

Extending a Virtual PC HD disk

December 3rd, 2009 by sharedpoint

I have been using the Virtual PC more then usual lately instead of VMWare, I created a 30 Gig vm for development and testing for 2010 and found that my assumption that 30 gig would be enough was later quashed when I brought the test contentdb into the mix and it blew out the vm with 100mb left on the hard disk. I have found that when you first create the disk its quite difficult in my investigation to increase the hard disk space, people I asked were quoted as not being able to accomplish this… but I’m a disbeliever that Microsoft would make such a product that would not upscale auto-magically. I was wrong again [I know "how could this be, say it isn't true'], there is a utility and a blog on how to accomplish this so here is the solution Enjoy!

Software -> http://vmtoolkit.com/files/folders/converters/entry87.aspx

Diskpart Utility description -> http://support.microsoft.com/kb/300415

Blog -> http://kb.dutchalps.com/microsoftvirtualpc.htm

Passed 70-630 & 70-631 MOSS 2007 Exams!

June 28th, 2007 by sharedpoint

I'm offically a MCTS using SharePoint and Window Shared Services, wrote them both the same day not sure if they were easy or I'm just that lucky, I've been going hardcore admin mode for the last 5 months doing the Architecture Design and planning for the implementation. I showed a recent trainer from Datacogs and he was sure we used Microsoft for our infrastructure but in reality is was myself and a couple of other bright guys that figured it out, it wasn't till later that we seen design diagrams from the Microsoft team and it was brought to out attention that our design was exactly how Microsoft invisioned there software to be implemented.

We have a 9 server implementation for Development env – 1 Certifiacate Server, 1 Report server, 1 Services server, 2 App servers, Index server, 2005 Sql Server, Active direcory, File server.

AAM, Vanity URL workarounds

June 26th, 2007 by sharedpoint

I have had numerous problems getting SSL, Kerberos working throughout the SharePoint project I'm on, the requirements were for secure sites built on SharePoint 2007 technology with various DSN entries pointing towards individual sites. Example [Workgroups, Project Center, Employee Profiles, Search Center]. The problem was that each had to have their own site and not become extensions of just one site like most Microsoft examples [see fake company topology for Fabrikam] , on that note if anyone disagrees with my example or has a better way please ping me and let me know. I have to give kutos to Martin Kearn [see http://blogs.msdn.com/martinkearn/archive/2007/04/23/configuring-kerberos-for-sharepoint-2007-part-1-base-configuration-for-sharepoint.aspx] for leading me in the right direction.

Prerequisites:

No sites are on port 80 except the default website.

Create your DNS entries for your sites.

Assumptions:

You have read Martin Kearns blog posts

You already have a certificate server or 3rd party certificate and know how to use and apply it

Steps:

Step 1 – Create a new site with the central administration page.

        I.            Application Management -> Create or Extend Web Application -> Create a new Web application

      II.            Enter the following:

a.       Description:  change default to whatever in my example I change it to `Workgroups'

b.      Port: optional to change the port unless its 80 [later this will be your SSL port]

c.       Host Header:  this is your DNS entry for the site your creating in my example it will be  `workgroups.devsharepoint'  

d.      Authentication Provider:  Kerberos

e.      Allow Anonymous: No

f.        User Secure Socket Layer(SSL): Yes

g.       Load Balancer: Leave default or choose some other site

h.      Application Pool: Ensure you use an application pool that has SPN assigned to it, refer to the Martin Kearn blog

i.         Restart Manually

j.        Database Name: WSS_CONTENT_[SITENAME], e.g. WSS_Content_workgroups

k.       Database authentication: However you access your data.

    III.            Click OK, a warning will appear ensure you read it and do have the necessary requirements the site will be created.

    IV.            Create your site collection , and click OK.

Issue a Certificate for the Web Site

Perform the following steps to install the current certificate from the CA authority:

1. On the Web site (the Wrokgroups site in this example), click the Start and point to Administrative Tools. Click Internet Information Services (IIS) Manager.
2. In the Internet Information Services (IIS) Manager console, expand the Web sites node and click on the Default Web Site. Right click the Default Web Site and click Properties.
3. In the Default Web Site Properties dialog box, click the Directory Security tab. On the Directory Security tab, click the Server Certificate button.
4. Click Next on the Welcome to the Web Server Certificate Wizard page.
5. On the Server Certificate Assignment page, select the Assign an existing Certificate option and click Next
6. Select your server Certification you assigned the server.
7. Ensure the SSL port is the same as your SharePoint site SSL port, click finish, and you site should be available.

 

Now here is where the vanity happens cause the port number is awful to look at and even harder for users to remember. Here is what you need to do next in order for the site to be viewed by its DNS entry.

First create a new web site on the web server with the same name of the site you created but prefixed with AAM_[sitename] e.g. AAM_workgroups

Here are the steps:

1.       Create the folder structure where your site are created the usual placement is `C:Inetpubwwwroot' but I'm not usual so I place mine here on a larger drive 'E:Inetpubwwwroot' so under this directory you would create new folders named after your SharePoint sites, e.g. workgroups

See photo for structure

In this folder you want to create a file called `default.aspx' in the file you want to place this code in order to redirect the request to the appropriate SSL page that corresponds to you're newly created SharePoint site.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

    protected void Page_Load(object sender, EventArgs e)

    {Response.Redirect("https://workgroups.devsharepoint:10530/default.aspx"); }

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

    <title>Untitled Page</title>

</head>

<body>

    <form id="form1" runat="server">

    <div>   

    </div>

    </form>

</body>

</html>

2.       On the Web site (the Workgroups site in this example), click the Start and point to Administrative Tools. Click Internet Information Services (IIS) Manager.

3.       Right click on the Default website and choose New -> Website then click next

4.       Type your description AAM_[sitename] e.g. AAM_workgroups, click next

5.       Keep the IP unassigned, keep the default port 80, Place your DNS entry as the host header. Eg workgroups.devsharepoint

6.       Browse to the path where you created the new folders with the default.aspx file click next

7.       Ensure you check off `Run Scripts' then click next and finish.

8.       Right click on the new website and choose properties, ensure authentication mode is Integrated windows authentication.

Now when you browse to the DNS entry you will be redirected to the SSL url internally.

 

Post Installation Tasks for MOSS 2007 and WSS 3.0

June 1st, 2007 by sharedpoint

Add Command Line Shortcut to "12 Hive" Don't just create a shortcut to the 12 Hive (the directory where just about everything WSS v3 is installed) on your desktop/Quick Launch. At first I created a mapped network to the “12″ directory location [not very secure]. When you're in a command prompt, sometimes you need to navigate to the 12 Hive directory. But no one wants to type the directory path to c:Program FilesCommon FilesMicrosoft Sharedweb server extensions12 . Wouldn't it be easier if you…(read more)