Posts

Showing posts from 2006

Programmatically adding pages to a MOSS Publishing site

Another posting from Andy http://www.andrewconnell.com/blog/archive/2006/11/15/5168.aspx

Dual Authentication on a site - Lovely

I had been waiting for this stuff for a while and Andy posted a beautiful article on how to go about it. Take a look at this link http://www.andrewconnell.com/blog/articles/HowToConfigPublishingSiteWithDualAuthProvidersAndAnonAccess.aspx It's of great help to me! Vin

Features - "You are not authorized to view this page" - Error 403

Features are the new way to add functionalities to WSS 3.0 or MOSS 2007. If you are working with features a lot there is good chance you occasionally get a "You are not authorized to view this page" - Error 403 - when you try to manage your features - either site or web scoped. To manage features in the user interface you navigate to ManageFeatures.aspx. This can be very frustrating and may have you scratching your head. The fix is actually simple. Chances are you manually added a new feature to the FEATURES directory and did not inherit the FEATURES permissions. The error is slightly misleading. You are most likely authorized to view the page but the account is not authorized to access one or more of the files contained inside of the new feature. The most common reason the new directory and files do not inherit the correct permissions is because you cut and pasted one or more of the files to the new location. Cutting and pasting will bring along it's permissions while co

The configured Role Provider (WindowsTokenRoleProvider) relies upon Windows authentication to determine the groups that the user is allowed to be a me

when I try to create a user I get the following An error was encountered. Please return to the previous page and try again. The following message may help in diagnosing the problem: The configured Role Provider (WindowsTokenRoleProvider) relies upon Windows authentication to determine the groups that the user is allowed to be a member of. ASP.NET Role Manager cannot be used to manage Windows users and groups. Please use the SQLRoleProvider if you would like to support custom user/role assignment. at System.Web.Administration.WebAdminPage.CallWebAdminHelperMethod(Boolean isMembership, String methodName, Object[] parameters, Type[] paramTypes) at ASP.addUser_aspx.PopulateCheckboxes() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 28 at ASP.addUser_aspx.Page_Load() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\ASP.NETWebAdminFiles\Security\Users\addUser.aspx:line 22 at System.Web.Util.CalliHelper.ArglessFunctionCaller(IntPtr fp, O

The trial period for this product has expired

I upgraded MOSS 2007 beta 2 to B2TR as per the MS doc but when I try to open the SharePoint central administration I got this message "The trial period for this product has expired". And you can use a workaround given by MS to solve this. And it's working for me......the official download link is http://download.microsoft.com/download/b/1/a/b1a6dceb-92a3-4808-8dac-b4e40c90ce00/StandaloneDCWorkaround.msi Thanks!

Copying Page From One Site to Another

Code Snippet that copies a page from one site to another : // Fetch event data RadTreeNode sourceNode = NodeEvent.SourceDragNode; RadTreeNode destNode = NodeEvent.DestDragNode; // Swap nodes in tree. if (sourceNode != destNode.Parent)// && sourceNode.Category == "PAGE" && destNode.Category != "PAGE") { SPSite DestSite = new SPSite(destNode.ID); SPWeb DestWeb = DestSite.OpenWeb(); SPSite SourceSite = new SPSite(sourceNode.Attributes["SPWEB"]); SPWeb SourceWeb = SourceSite.OpenWeb(); SourceWeb.AllowUnsafeUpdates = true; DestWeb.AllowUnsafeUpdates = true; SPFile spFileOriginal = SourceWeb.GetFile(sourceNode.ID); Byte[] binFileOriginal = spFileOriginal.OpenBinary(); string fileNameTarget = "CopyOf" + spFileOriginal.Name; SPFolder destPagesFolder = DestWeb.GetFolder("Pages"); if (destPagesFolder != null) { if (spFileOriginal.CheckOutStatus == SPFile.SPCheckOutStatus.None) { spFileOriginal.CheckOut(); } SPFile spDestFile = des

This form cannot be opened. It is not workflow enabled.

I'll try these things first: 1. I wont add the forms (xsn's) through central admin. 2. if i have added already, i'll will be removing it from there. 3. I'll check the install.bat and check for the form path wherever I have specified (Important): for ex, ::"%programfiles%\common files\microsoft shared\web server extensions\12\bin\stsadm" -o verifyformtemplate -filename AssignForm.xsn The above form "AssignForm" should be in my sharepoint workflow libraray project location. 4. I'll check for the feature.xml, the feature id should be a unique GUID & will ensure that i have these lines under the properties tag Remember, it's *.xsn 5. I'll open the workflow.xml and check for Guid which should be unique and more importantly will check for the form urn's 6. Once i am done with all these things, i'll run the install.bat from the command prompt, Will ensure that a folder with my project library name is created under this path "C:

The form cannot be displayed because session state is not available

Try doing the following : If you have a release version, try this Open the web.config file for the site, search for the word "SessionStateModule" and uncomment that line. Example: should be: > if you are still using the Beta version, try this 1. Check http://officebeta.iponet.net/en-us/help/HA101530311033.aspx 2. a. Install office server search manually from \OSRCHAPP\osrchapp.msi and re-run the configuration wizard again I got the Sharepoint Server Search role in central administration. b.You could create the SSP (shared service provider) now c.Crawl should work now. Try configuring your workflow, you should get rid of the bug.

Reading Pages Under a Site

Use the foll code snippet to read the pages under a site (Postings under a channel in CMS 2002 terminology): if (PublishingWeb.IsPublishingWeb(web)){ PublishingWeb publishingWeb = PublishingWeb.GetPublishingWeb(web); // Postings under this Channels PublishingPageCollection pages = publishingWeb.GetPublishingPages(); foreach (PublishingPage page in pages) { //page.Name //page.Title; //page.Url; } }

The security validation for this page is invalid. Click Back in your Web

If you are getting the following error, while renaming the page title using publishingpage object " The security validation for this page is invalid. Click Back in your Webbrowser, refresh the page, and try your operation again ." Code Snippet: PublishingWeb publishingweb = PublishingWeb.GetPublishingWeb(newUri(" http://YourPortal/Plans/ ")); PublishingPage pp =publishingweb.GetPublishingPages()["Pages/TestArticle.aspx"]; pp.Title = e.Node.Text; pp.Update(); You should check for this : Navigate thru the followwing and turn the security validation Off Central Administration--->application management---->web application settings-->"turn security validation off"