Failed to instantiate file “default.master” from module “DefaultMasterPage”
You probably have two site definitions with the same id. One is retracted and deleted and now the site creation fails; check the log for details.
General
%STSADMPRG% -o addsolution -filename “..Solution1.wsp”
(No files available in the 12 hive yet)
%STSADMPRG% -o deploysolution -name “Solution1” -immediate -force -allowCasPolicies -allowGacDeployment
(Now you can see the files are added to the 12 hive; features are installed NOT activated)
%STSADMPRG% -o deactivatefeature -filename Feature1feature.xml -url http://ServerName
By default WSS 3.0 runs under the .NET 2.0 framework. To change this to use the .NET 3.5 framework execute the following steps:
<add assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" /> <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<system.codedom> <compilers> <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <providerOption name="CompilerVersion" value="v3.5" /> <providerOption name="WarnAsError" value="false" /> </compiler> </compilers> </system.codedom>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %> <%@ Import Namespace="Berend.PageExtensions" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=http://www.w3.org/1999/xhtml> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <h1> <%=this.MyPageExtensionMethod()%> </h1> </div> </form> </body> </html>
namespace Berend.PageExtensions { public static class Class1 { public static string MyPageExtensionMethod(this Page p) { return "Extension method executed!"; } } }
When you want to use this technique with SharePoint 2007 you have to follow the steps in this post to run WSS under the .NET 3.5 framework!
using System; using System.Collections.Generic; using System.Text; using System.Web.UI.WebControls.WebParts; namespace SimpleWebpart { public class SimpleWebPart : WebPart { private string displayText = "Hello World!"; [WebBrowsable(true), Personalizable(true)] public string DisplayText { get { return displayText; } set { displayText = value; } } protected override void Render(System.Web.UI.HtmlTextWriter writer) { writer.Write(displayText); } } }
[assembly: AllowPartiallyTrustedCallers]
<SafeControl Assembly="SimpleWebpart,Version=1.0.0.0, Culture=neutral,PublicKeyToken=XXXXXXXXXXXXXXX" Namespace="SimpleWebpart" TypeName="*" Safe="True" />
When you have webparts on your page that are no longer available SharePoint throws an exception. To remove the webparts from the page that are no longer available navigate to the url
http://YourServer/Pages/[your page in error]?contents=1
Checkout the page; delete the webpart; and check in. Page can be loaded again!
General