in

DotNetDeveloper

Bits o this Bits o that

SharePoint

  • cryptographic failure while signing assembly

    The problem is that you cannot delete a key and you cannot add the key as you do not have access to the key to delete it and the .NET framework cannot add it because of constraints on the StrongName data store.

    The solution is to give yourself access to C:\Documents and Settings\AllUsers\ApplicationData\Microsoft\Crypto\RSA\MachineKeys\

    1. Browse to c:\Documents and Settings\AllUsers\ApplicationData\Microsoft\Crypto\RSA\MachineKeys
    2. Grant rights to Adminstrators, or whatever group you are in
    3. Take Ownership of this folder (click Advanced under Security, and then click the Ownership tab at the top)

    This worked all fine for me see how you get along. 

     

  • How to connect to MICROSOFT##SSEE

     if your struggling with this connecting to Microsoft##SSEE I followed the steps below and hey presto all working.

    • Open SQL Server Configuration Manager
    • Click on protocols for Microsoft##SSEE > Properties
    • Set Hide Instance to "No"
    • Enable Named Pipes
    • Finally Reset the SQL Server 2005 Embedded Edition (Microsoft##SSEE) service

    now all being well you will be able to access this server

  • Sharepoint Template ID's

    hope these are useful for somebody.

     

    Template ID = 0
      Desc: This template is used for initializing a new site.
      Title: Global template
      Name: GLOBAL#0


    Template ID = 1
      Desc: A site for teams to quickly organize, author, and share information. It provides a document library, and lists for managing announcements, calendar items, tasks, and discussions.
      Title: Team Site
      Name: STS#0


    Template ID = 1
      Desc: A blank site for you to customize based on your requirements.
      Title: Blank Site
      Name: STS#1


    Template ID = 1
      Desc: A site for colleagues to work together on a document. It provides a document library for storing the primary document and supporting files, a tasks list for assigning to-do items, and a links list for resources related to the document.
      Title: Document Workspace
      Name: STS#2


    Template ID = 2
      Desc: A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda, meeting attendees, and documents.
      Title: Basic Meeting Workspace
      Name: MPS#0


    Template ID = 2
      Desc: A blank meeting site for you to customize based on your requirements.
      Title: Blank Meeting Workspace
      Name: MPS#1


    Template ID = 2
      Desc: A site for meetings that track status or make decisions. It provides lists for creating tasks, storing documents, and recording decisions.
      Title: Decision Meeting Workspace
      Name: MPS#2


    Template ID = 2
      Desc: A site to plan social occasions. It provides lists for tracking attendees, providing directions, and storing pictures of the event.
      Title: Social Meeting Workspace
      Name: MPS#3


    Template ID = 2
      Desc: A site to plan, organize, and capture the results of a meeting. It provides lists for managing the agenda and meeting attendees in addition to two blank pages for you to customize based on your requirements.
      Title: Multipage Meeting Workspace
      Name: MPS#4


    Template ID = 3
      Desc: A site for central administration. It provides Web pages and links for application and operations management.
      Title: Central Admin Site
      Name: CENTRALADMIN#0


    Template ID = 4
      Desc: A site for a community to brainstorm and share ideas. It provides Web pages that can be quickly edited to record information and then linked together through keywords
      Title: Wiki Site
      Name: WIKI#0


    Template ID = 9
      Desc: A site for a person or team to post ideas, observations, and expertise that site visitors can comment on.
      Title: Blog
      Name: BLOG#0


    Template ID = 7
      Desc: A site to centrally manage documents in your enterprise.
      Title: Document Center
      Name: BDR#0


    Template ID = 14483
      Desc: This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site prevents records from being modified after they are added to the repository.
      Title: Records Center
      Name: OFFILE#0


    Template ID = 14483
      Desc: This template creates a site designed for records management. Records managers can configure the routing table to direct incoming files to specific locations. The site prevents records from being modified after they are added to the repository.
      Title: Records Center
      Name: OFFILE#1


    Template ID = 40
      Desc: This template creates a site for administering shared services
      Title: Shared Services Administration Site
      Name: OSRV#0


    Template ID = 20
      Desc: This template is obsolete.
      Title: SharePoint Portal Server Site
      Name: SPS#0


    Template ID = 21
      Desc: This web template defines a Personal Space for an individual participating on a SharePoint Portal.
      Title: SharePoint Portal Server Personal Space
      Name: SPSPERS#0


    Template ID = 22
      Desc: A site for delivering personalized views, data, and navigation from this site collection into My Site. It includes personalization specific Web Parts and navigation that is optimized for My Site sites.
      Title: Personalization Site
      Name: SPSMSITE#0


    Template ID = 30
      Desc: This template is obsolete.
      Title: Contents area Template
      Name: SPSTOC#0


    Template ID = 31
      Desc: This template is obsolete.
      Title: Topic area template
      Name: SPSTOPIC#0


    Template ID = 32
      Desc: This template is obsolete.
      Title: News Site
      Name: SPSNEWS#0


    Template ID = 39
      Desc: A blank site for expanding your Web site and quickly publishing Web pages. Contributors can work on draft versions of pages and publish them to make them visible to readers. The site includes  document and image libraries for storing Web publishing assets.
      Title: Publishing Site
      Name: CMSPUBLISHING#0


    Template ID = 53
      Desc: This template creates a site for publishing Web pages on a schedule, with workflow features enabled.  By default, only Publishing subsites can be created under this site. A Document and Picture Library are included for storing Web publishing assets.
      Title: Publishing Site
      Name: BLANKINTERNET#0


    Template ID = 53
      Desc: This template creates the Press Releases subsite for an Internet-facing corporate presence website.
      Title: Press Releases Site
      Name: BLANKINTERNET#1


    Template ID = 53
      Desc: A site for publishing Web pages on a schedule by using approval workflows. It includes document and image libraries for storing Web publishing assets. By default, only sites with this template can be created under this site.
      Title: Publishing Site with Workflow
      Name: BLANKINTERNET#2


    Template ID = 33
      Desc: A site for publishing news articles and links to news articles. It includes a sample news page and an archive for storing older news items.
      Title: News Site
      Name: SPSNHOME#0


    Template ID = 34
      Desc: A site for listing and categorizing important sites in your organization. It includes different views for categorized sites, top sites, and a site map.
      Title: Site Directory
      Name: SPSSITES#0


    Template ID = 36
      Desc: This template is obsolete.
      Title: Community area template
      Name: SPSCOMMU#0


    Template ID = 38
      Desc: A site for creating, managing, and delivering Web pages, dashboards, and key performance indicators that communicate metrics, goals, and business intelligence information.
      Title: Report Center
      Name: SPSREPORTCENTER#0


    Template ID = 47
      Desc: A starter site hierarchy for an intranet divisional portal. It includes a home page, a News site, a Site Directory, a Document Center, and a Search Center with Tabs. Typically, this site has nearly as many contributors as  readers and is used to host team sites.
      Title: Collaboration Portal
      Name: SPSPORTAL#0


    Template ID = 50
      Desc: A site for delivering the search experience. The welcome page includes a search box with two tabs: one for general searches, and another for searches for information about people. You can add and customize tabs to focus on other search scopes or result types.
      Title: Search Center with Tabs
      Name: SRCHCEN#0


    Template ID = 51
      Desc: This template creates a profile site that includes page layout with zones
      Title: Profiles
      Name: PROFILES#0


    Template ID = 52
      Desc: A starter site hierarchy for an Internet-facing site or a large intranet portal. This site can be customized easily with distinctive branding. It includes a home page, a sample press releases subsite, a Search Center, and a login page. Typically, this site has many more readers than contributors, and it is used to publish Web pages with approval workflows.
      Title: Publishing Portal
      Name: BLANKINTERNETCONTAINER#0


    Template ID = 54
      Desc: A site used for hosting personal sites (My Sites) and the public People Profile page. This template needs to be provisioned only once per Shared Service Provider, please consult the documentation for details.
      Title: My Site Host
      Name: SPSMSITEHOST#0


    Template ID = 90
      Desc: A site for delivering the search experience. The site includes pages for search results and advanced searches.
      Title: Search Center
      Name: SRCHCENTERLITE#0


    Template ID = 90
      Desc: The Search Center template creates pages dedicated to search. The main welcome page features a simple search box in the center of the page. The template includes a search results and an advanced search page. This Search Center will not appear in navigation.
      Title: Search Center
      Name: SRCHCENTERLITE#1

  • Hiding fields when not in edit mode

    I had a need to  hide several fields when I wasn't in edit mode on a page and spent an awfully long amount of time trying various methods. In the end its easy but only because i bumped into another one of Andrew Connells ancient posts.
     
    basically i added some fields which i would enter an image url to be used as a dynamic background image within a page instance.
     
    This can be achieved by using the EditModePanel control which can be found within SPD under SharePoint Controls / Server Controls
     
    simply drop the control on the page and put any fields you want to hide within the control.
     
    This only works on publishing pages.
     
    Andrews original post can be found here
  • Sharepoint Development - Tools of the trade

    I thought it might be useful to some for me to list the tools i use regularly within my SharePoint development environment and exactly what I use them for.

    In time maybe the list will shrink / expand and is no particular order.

    STSDEV - is an application which creates SharePoint solutions and projects to help with deployment and development.

    SharePoint Manager 2007 - I have tended to use this to snoop around the inner working of a site (You can view practically every property within SharePoint) . You can amend settings but in all honesty it's not recommended. A colleague insists he melted his entire site with it </me shrugs>. Use carefully :) 

    MOSS Feature Generator - I like this application so much. It doesn't do anything big or clever but its simple and does what it says on a tin. I use this to export any created Content Types / Columns / Fields (created within the SharePoint UI) and export them out to be included in my STSDEV projects. It looks like it also does lists and their templates also but I haven't used it for this.

    U2U CAML Query Builder - Great little visual CAML query tool for building CAML querys to be included in your views etc.

    Imtech List Generator - Might be useful to some. Generates list instance XML for inclusion within your projects. Useful if you can't be bothered to generate GUID's and are not so sure about list templated ID's etc.

    Hopefully this small list will be useful to some.

  • Opening list links in a new window

    There is a few posts about this on the internet.

    seems as usual with SharePoint there is a few ways to do this. This is one way which they can be done, The others are by editing a listview within SharePoint Designer right clicking on the list and select dataform XSLT or similar and editing the xsl and saving and this method by Todd Bleeker.

    have a read and see what you think.

     Editing List Schema

    This is a fairly simple process once you know how this is a quick guide on how to do it.

     Add a new boolean column to your list something along the lines of "Open In New Window".

    open up your "schema XML".

     down at the bottom of your schema file there is a <Fields> node open this up and copy paste the code below

    edit the following area's

    URLToOpen - the name of the URL field you want to use to generate the new link

    OpenInNewWindow - The name of the field you created as a the boolean value to decide if to open in a new window or not

    <Field Type="Computed" ReadOnly="TRUE" Name="NewUrlLink" DisplayName="URL" DisplayNameSrcField="URL" AuthoringInfo="open in new window" >
    <
    FieldRefs><FieldRef Name="URLToOpen"/>
    <
    FieldRef Name="OpenInNewWindow"/></FieldRefs>
    <
    DisplayPattern><HTML><![CDATA[<A HREF="]]></HTML>
    <
    Column Name="URLToOpen" HTMLEncode="TRUE"/><HTML><![CDATA["]]></HTML>
    <
    Switch><Expr>
    <
    Column Name="OpenInNewWindow"/></Expr>
    <
    Case Value="1"><HTML><![CDATA[ target="_blank"]]></HTML>
    </
    Case></Switch>
    <
    HTML><![CDATA[>]]></HTML><Switch>
    <
    Expr><Column2 Name="URLToOpen"/>
    </
    Expr><Case Value="">
    <
    Column Name="URLToOpen" HTMLEncode="TRUE"/></Case>
    <
    Default><Column2 Name="URLToOpen" HTMLEncode="TRUE"/>
    </
    Default></Switch>
    <
    HTML><![CDATA[</A>]]></HTML></DisplayPattern>
    </
    Field>

    ok with that done now you can just use that computed column within your schema xml as a valid field.

     just add that field in the <ViewFields> part of your view ie :
    <
    FieldRef Name="NewUrlLink" />

     This is a simplified rundown of the process based on my experiences with this. check out Andrew Connells blog if you need more information Andrews Connell's post can be found here and has more detail then mine.

  • Deploying Custom Lists with STSDEV

    This is only a quick and dirty post as I'm really busy atm. This is obviously the most basic tutorial explaining how to quickly and easily take your  lists from within sharepoint and make them deployable (I'm using STSDEV).

     Firstly create your list within the Sharepoint as normal.

    Open Sharepoint Solution Generator

    Enter your site details,select the list you want to deploy and save into a folder on your desktop.

    This generates a stand alone project for deploying this list if this is what you want.

    To embed in a larger project

    Copy the 4 ASPX files and the Schema.XML files into your project and place them in a listfolder (eg: "My List")

    Edit the "Elements.XML" and copy the contents from the "ListDefinition.XML" file into it.

    Open up the "Feature.XML" and add the following

    <!-- Lists -->

    <ElementFile Location="My List\schema.xml"/>

    <ElementFile Location="My List\AllItems.aspx"/>

    <ElementFile Location="My List\DispForm.aspx"/> <ElementFile Location="My List\NewForm.aspx"/>

    <ElementFile Location="My List\EditForm.aspx"/>

     finally within your "Elements.XML" add the following making sure to change the feature ID and generate a new Guid for the List Instance ID

    <ListInstance

    Id="874CE39B-0E8A-40c6-B284-36679BD5CC33"

    FeatureId="314CAAC1-7E0D-4FAE-921C-30EEC7D7302A"

    TemplateType="100"

    Title="Press Releases"

    Description="Press Releases"

    Url="Lists/Press Releases" />

    Take note of the Template Type, this should match between the template and the instance. There are a fair few different template types however Solution Generator should export the correct type for you.

    for other types have a look here if you need too. Other Template Types

    Now you should have your deployable list

    hopefully this will be useful as a starting point for somebody.

  • Symbols cannot be loaded sharepoint issues

    Seems there is a billion posts on this but not one of them helped me enough to fix this problem in the end i think it came down to blind luck and finding out the relevance of STSDev not building a pdb file unless you build your project with the debug build solution configuration selected.

     Anyhow this is how i finally managed to get my debugger working within sharepoint with STSDev.

    • Select Debug build solution configuration
    • build solution
    • Reset IIS
    • copy dll and pdb file into the gac (assembly\gac_msil\<assembly-name>\<version>\<assembly-name>)
    • deploy the feature

    ** for information i have used this gac registry tweak to enable me to see the full gac structure

    This finally worked for me and i am now able to debug.

  • The "Microsoft.Build.Tasks.Delete" task could not be loaded from the assembly

    The "Microsoft.Build.Tasks.Delete" task could not be loaded from the assembly C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll. Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Build.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, and that the assembly and all its dependencies are available. 

    just a quick post in response to this error message.

    Edit the following files....\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3.5\Workflow.Targets...\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\v3\Workflow.Targets and remove the following line if it is in there<UsingTask TaskName="Microsoft.Build.Tasks.Delete" AssemblyFile="$(MSBuildBinPath)\Microsoft.Build.Tasks.dll" />
  • Code blocks are not allowed in this file

    Parser Error Message: Code blocks are not allowed in this file.

    Recieved this error when trying to add some code blocks into my sharepoint site, obviously Asp.NET pages can use code blocks so it had to be SharePoint blocking somehow.

    Turns out SharePoint disables the ability to create server-side script by default, you have to turn it on. You do that in the web.config file, in the configuration/SharePoint/PageParserPaths configuration section add the following code making sure to amend the virtual paths as you see fit.

    As you can see below I allow access to my masterpage directory to allow page layouts to use code blocks and the pages directory.

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

     That should now enable the code blocks within your aspx page.

  • Turning off custom error messages within Sharepoint

    Its possible you will want to see the real Asp.Net error messages within Sharepoint.

    The following method will allow you to see them

     

    1) edit the web.config within your sharepoint installation directory (eg: C:\Inetpub\wwwroot\wss\VirtualDirectories\80)

    find the line which says customErrors mode="On" and change it to "Off".You can also set the value to “RemoteOnly” to troubleshoot a production issue.

    2) Also you need to enable CallStack, use find to locate the line within the web.config

    <SafeMode MaxControls="200" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false">

    and change the CallStack value to true;

  • Cannot connect to Microsoft##SSEE Database Options

    Im fairly new to Sharepoint, and was having a problem trying to connect to my Sharepoint databases and whilst looking for the solution found this information.

    If you want to manage your Sharepoint databases enter "\\.\pipe\mssql$microsoft##ssee\sql\query" as your Server name in SQL server management Studio.

    This gives you access to all the Sharepoint Databases.

    Hope this helps somebody

  • WSS 3.0 Installation Problems - System.Runtime.InteropServices.COMException (0×80070094): The path specified cannot be used at this time. (Exception from HRESULT: 0×80070094)

     

    Here we go my first encounter with Sharepoint and this is the problem I get when installing WSS 3.0, admittedly this was for me the second try at trying to install both times I recieved this error haven't a clue what the original error was.

    I found the problem related to the installation not removing itself completely, I had to go into IIS and remove the "SharePoint Central Administration v3" virtual director completely after un-install then I reinstalled without any problems.

    Hopefully this will help you out as it did me.

    I've also read an IIS reset / restart of Windows Sharepoint Services Timer service will also help though I didn't need to use this myself.

     

DotNetDeveloper.co.uk
Powered by Community Server (Non-Commercial Edition), by Telligent Systems