June: SharePoint ipsum

Causae Kalendario mutuo occurrant cum Bamboo SharePoint "inopinatum accidit error"

Hodie, I’ve been working in an environment that uses a Bamboo calendar web part for some improved collaboration. This a standard medium/small farm with two load balanced WFEs, a "application server" Iudex enim InfoPath et bumastos et retro finem SQL.

The client installed some disaster recovery software onto one of the WFEs and that resulted in a broken WFE for a specific site in the site collection. Whenever load balancing pointed at the affected WFE and that site, users saw a largely blank white screen with the sentence “An unexpected error occurred”. No other info showed, Iustus, qui sententiam.

They asked me to look at it. I easily reproduced the problem and then added a ?contents=1 to the end of the URL. This is how I learned they were using the Bamboo web part. I went back to the page and now, Subito, eam ostendit mihi nice ordinate erroris nuntius:

image

Nescio quid esset aut quid ego facerem, nisi ut ostenderet appensione erroris nuntius ad imperium ?contents=1 bit of the query string.

Quod si ita est, ut probabiliter adipiscing verbo rarissimum, "Inopinatum accidit error" Antecedite adaugeo ?query = I ad contenta in eodem filo, et vide ubi ducentem.

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags: ,

Usura pondero in Microsoft.SharePoint.dll

Redgate .NET Reflector Michael Blumenthal has put up an article about alerts and views ("Which views can be used when Creating an Alert ?"), which is interesting on its own merits. Autem, I was even more interested to see how he methodically walks through the process of using Redgate’s .NET Reflector. Step by step, he shows how to use that tool track down how SharePoint determines whether a view on a list should be "subscribable" pro defectu melius verbum (he explains this much better than I do 🙂 ).

At this point in the SharePoint era, you’d almost have to be deaf and blind to have not heard or read about using that tool. It’s advanced stuff and my own sense is that it’s in many ways a tool of last resort. Autem, if you think you need it but don’t really know how, Michael’s write-up seems like a great tutorial on this subject.

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

View Calendar sorting Items in Kalendario

I’m using a calendar to track panel discussions on a given day. I have two sessions: morning and afternoon. I want to create a view that shows morning sessions only listed alphabetically via a session ID. This is a little tricky to accomplish (nisi aliquid manifestum adfui).

I can easily create a filtered view showing just that day’s events. The calendar will show all those events and if they all take place on the same hour, it lists them side by side in the hour slot. That’s great. The tricky part is that, per defaltam, it wants to list them in ID format. Ita, if I add "Session 02" and then "Session 01" quod kalendarium, ostendit eis in illo ordine, (i.e, Sessionem 02 et tunc Sessionis 01). To list them in Session ID order, Ego experiri haec:

  1. Configure the view using the web user interface. No luck. There are no options to sort items this way.

    Quoniam id non laborandum, I am now hoping there’s a CAML query somewhere in there that will allow me to override the sort. CQWP lets me make that kind of change, Calendarium maybe etiam voluntatem,?

  2. Excepteur textus partem, look for an "export" muneris … Bzzz! I can’t export its XML. There is no export option.

    I’m still holding out hope that I can find and modify some CAML query. Since I can’t export the web part, id relinquit SharePoint Designer.

  3. I add the calendar web part to a sandbox site and open that site using SharePoint Designer. I look at the markup for the web part and I find what I’m looking for. It’s encoded madness, tamen suus 'ibi: "<ListViewXml …. >encoded insaniam</ListViewXml>". Specie, illic 'hoc gemma:

<Quaero>
<Ubi>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Mensis />
</Valor>
</DateRangesOverlap>
</Ubi>
<Orderby><FieldRef Name="Session_x0020_ID" /></Orderby>
</Quaero>

(Ego autem decoded &LT;`S &gt scriptor, ipsosque ad multiplex linearum claritatis gratia).

Adde <Orderby> et frenum nunc per cuiuscemodi ID Sessionis, Item ID non internum album.

Abyss tip vel’ proni ad Becky Isserman pro ea commentarium Isha scriptor blog post Sagi: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <Orderby> sine ea commodo mauris, in.

Spero scribere sursum screen cum offa mox apertius, sed in re numquam, saltem feci hoc.

</finem>

SharePoint Features & Solutions Lorem ipsum dolor — U CRUD ne obliviscaris (aut pro re in D)

Et nos publice consumere multum temporis cogitatione SharePoint solutiones — quam creare illos, quibus uti tool, quod non accidit cum ad explicandam, ipsum timer, scopes, etc. We spend so much time thinking about the up-front bits that it’s easy to forget that we need to retract them as well. Retracting solutions is probably more difficult, Ex consilio prospectus, opinione, than deploying them. Deployment is basically a cookbook affair. Typically, install a pluma, quod maybe nonnullus notitia in a album pluma Receptorem oneratis, that sort of thing. Autem, retractantem, est in potentia ad magis perplexas.

Haec solutio data partum artificiata:

  • Aliquam erat volutpat
  • Definition list
  • Definition Site
  • Notitia in a album
  • Etiam accipientium
  • Formae InfoPath

Sequitur album.

Dum suus 'maximus patet solutio ad Design artificialibus ea quae recte instantiates, it’s just as important to consider the update and delete cases. If your solution creates a new list and populates that list with data, Solutio retro accidit? In some cases, the list should be deleted. In other cases, it should be left intact for historical purposes. Your business requirements will guide you to the right decision.

Ad auxilium cum, create a matrix that lists each artifact your solution deploys to SharePoint. List three columns per artifact, unum pro creo, update and delete. For each case, statuere rectam operationem finis.

This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm. Autem, sicut clibanus, it’s never too late to start doing things correctly. Create that matrix and develop a plan to address the missing update/delete scenarios. It may be a hard problem to solve, sed saltem youll 'forsit posui circa buxum.

</finem>

Scribet ad mea blog.

Sequi me in Twitter ad http://www.twitter.com/pagalvin

Technorati Tags:

Vivos Fix: Textus Muneris quod penitus SharePoint, InvalidOperationException

Decies annos elapsos, I helped developed a web service that was invoked via a custom action for a SharePoint Designer workflow. Hoc septimana, client voluit movere ad productionem (tandem!) ita fecimus,.

Actione opus denique consuetudinem, sed textus muneris eam non invocari, dans nobis in hoc errore:

System.InvalidOperationException: Haec operatio non potest fieri nisi a computer in quod adhaeret firma servo users ex venia, qui in SQL Servo legere ex database configuration. Ad coniungere ad hoc moderatro server firmam, uti SharePoint Uber Technologies Configuration Veneficus, sita in Satus Menu in administrativus Tools.
at Microsoft.SharePoint.Administration.SPWebApplication.Lookup(Uri requestUri)

Turns out that I forgot to add the service to the SharePoint application pool in IIS. Once I did that, id operato simila.

MSDN forum stipes hoc opus, dedit mihi fila: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2c97c004-7118-4e06-a62c-b2b0ac07ac99

</finem>

Scribet ad mea blog.

Sequere me Twitter: http://twitter.com/pagalvin

Technorati Tags:

Vivos et Securus: Adepto de SPFolder SPItemList

Vestibulum et metus cursus in neque custodiam quid volo facere videtur, Ego figuratur ego ita scriberet.

Ego fuerit faciens multus of vicis susceptor debugging week vel duos in novissimo. The ER is defined against a document library. The individual items in the document library are tightly related to their parent folders. Ita, I am always getting the folder of the item for various manipulations. While debugging, EGO necessarius ad update metadata a folder pro certo scio item cujus ID.

Hic 'a console parum application (currere in server cogitavit ruris) quod duae allegationes: Item ID: et de pretio agri dare, "Approval Status". It hard codes a lot of stuff and has no error checking.

Codex suspicit duram site coded, gets a hard coded document library and then finds the indicated item. It then finds the parent folder of that item and assigns the status value.

The key lesson here for me is that SPItem doesn’t get you access to the folder. You need to use SPListItem.File.

Censura qui curat offerre folder vel ut rem melius suadet, commodo licentia a ineo.

<Codicem>
usura System;
usura System.Collections.Generic;
usura System.Text;
usura Microsoft.SharePoint;
usura System.Collections;

Spatium nominale Conchango
{
    /// <Summary>
 /// </Summary>
 genus ManualFolderUpdate
    {
        static Irrita Main(filum[] args)
        {
            filum msh = "ManualFolderUpdate (v1.0): "; // msh = "Message Header"

 Consolandum.WriteLine(msh + "Starting up.  Last modified on 08/04/08 sum.");

            filum url = http://localhost/xyzzy;

            usura (SPSite oSPSite = novum SPSite(url))
            {

                usura (SPWeb oSPWeb = oSPSite.OpenWeb())
                {
                    SPList docLib = oSPWeb.Lists["Documents"];

                    Consolandum.WriteLine(msh + "Got the document library.");

                    Consolandum.WriteLine(msh + "Doc lib item count: [" + docLib.ItemCount + "].");

                    int FolderID = 0;
                    filum NewStatus = "Xyzzy";

                    FolderID = System.Convoco.ToInt32(args[0].ToString());
                    Consolandum.WriteLine("Seeking folder for item: [" + FolderID + "].");

                    SPListItem li = docLib.GetItemById(FolderID);

                    SPFolder thisItemFolder = li.File.ParentFolder;

                    Consolandum.WriteLine(msh + "Got the parent folder.");

                    NewStatus = args[1].ToString();
                    Consolandum.WriteLine("Setting status to [" + NewStatus + "].");

                    Consolandum.WriteLine("Press return to commit the update or CTRL-C to abort.");

                    Consolandum.ReadLine();

                    thisItemFolder.Item["Approval Status"] = NewStatus;
                    thisItemFolder.Item.Update();

                    Consolandum.WriteLine(msh + "Finished updating the folder.  Exeunt.");

                } // usura SPWeb

            } // usura SPSite

 Consolandum.WriteLine(msh + "Finished.");

        } // Main

    } // classis foldersync
} // Spatium nominale
</Codicem>

</finem>

Scribet ad mea blog.

Technorati Tags:

Latentes Consuetudo Actiones in SharePoint

Plures menses, dum operantes in consilium enim a client, I created a feature. Among other things, quod pluma definitur consuetudo actio (apparent sub site occasus). The only purpose for this custom action was to demonstrate to me that the feature activation was working as expected. Basically, Ego usus ut a rudis forma debugging.

Multo ad mea confusioni, hoc debugging artificium fecit a Dev ad UAT et ad productionem ante aliquis obtinuit circa ad petens, "Quid est hoc xyzzy pagina?"

Iam, Nulla sit amet enim et nolle uninstall pluma, fix elements.xml and then reinstall.

Todd Bleaker pointed out an easy way to handle it. In his words:

"CustomActions sunt non transtulerunt in database, leguntur directe a Elements.xml file et transtulerunt in application statu ad runtime. Ita, non opus ad deactivate, uninstall, restituo, et Nulla Feature ad tollere CustomAction. Iustus auferre a Elements.xml file et redivivus applicationem stagnum(s) efficitur. Nunc dicendum est in sequenti tempore, non videre CustomAction ultra."

Secutus mandatis et, utique, operantur.

In meam, this is a department level installation with just a single WFE. If you find yourself with this problem in future and with multiple WFE’s, Credo in singulis habebis transferre.

</finem>

Scribet ad mea blog.

Technorati Tags: ,

Vivos Fix: Accessu SharePoint Site iacit; [HttpException (0x80004005): Ex rogatu denuntiabatur.]

One of my developer colleagues was working on a project this week and ran into a timeout problem while working on building some crazy web part. His web part was fine, but "suddenly" finitimus dolor sit valde lenta et saepe de isto errore feriati:

[HttpException (0x80004005): Ex rogatu denuntiabatur.]

I logged in and saw that several other sites were just fine. I suspected that there were some hidden web parts on the page and using the trusty ?contents=1 debug technique, I did in fact find 11 web parts on the page, only two of which were visible. Even better (from a let’s-hope-I-find-something-ugly-here-that-I-can-fix perspective), three of those closed web parts had a name of "Error".

I deleted those web parts (which itself took a surprisingly long time) and that solved the problem. For today 🙂

</finem>

Scribet ad mea blog.

Technorati Tags:

INVOCATIO SSRS Web Services Ex WSS / Opera MUSCUS in FBA

We needed to invoke the "CreateSubscription" method on an SSRS web service that is hosted in an FBA managed MOSS environment from a custom web part. We kept getting variations of:

  • 401: Ne aucto
  • Id quod movetur

The "object moved" message was most interesting because it was saying that the "object" (servicium nostrum SSRS) had "moved" to login.aspx. This clearly meant we had some kind of authentication problem.

I eventually realized that I had bookmarked a blog entry by Robert Garret that described how to invoke a general purpose WSS/MOSS web service living inside an FBA environment. Note that I can’t link directly to the article (tamquam 06/09/08) because it wants to authenticate. The link I provide brings you to an "all posts" view and you can locate the specific article by searching for "Accessing MOSS Web Services using Forms Based Authentication".

Hic 'quod operatus est in nobis codicem:

ReportingService2006 rs = nihilo; 
// Authenticate Authentication auth = novum Authentication(); 
auth.Url = "http://URL/_vti_bin/Authentication.asmx";
auth.CookieContainer =
novum CookieContainer();
LoginResult result = auth.Login("userid", "password");
si (result.ErrorCode == LoginErrorCode.NoError) 
{
// No error, so get the cookies.
CookieCollection cookies = auth.CookieContainer.GetCookies(novum Uri(auth.Url));
Cookie authCookie = cookies[result.CookieName];
rs =
novum ReportingService2006();
rs.Url =
"http://server/_vti_bin/ReportServer/ReportService2006.asmx";
rs.CookieContainer =
novum CookieContainer();
rs.CookieContainer.Add(authCookie);
}
experiri
{
  rs.CreateSubscription(report, extSettings, desc, eventType, matchData, parameters1);
}
capiendos (Exceptio ex)
{
  Console.WriteLine(ex.Message.ToString());
}

I interpret things to work like this:

  • Our web part needs to dial up the authentication service and say, "Hey, Tony, it’s me!".
  • Authentication service replies saying, "Hey, I know you. How are the kids? Here’s a token."
  • We call up the SSRS service and say, "Tony sent me, here’s the token."

</finem>

Scribet ad mea blog.

Vivos et Simplex: Praescripto a Web Site Usura SharePoint Object Model In C #

I tried searching for a little snippet code that would show how I can create a new SPWeb in a site collection. I didn’t find it as quickly or easily as I expected so I thought I’d slap together a little entry on the subject.

Hoc codice creat novum Wiki site:

 SPSite siteCollection;

    siteCollection = novum SPSite("Http://conchang-o9l8qi");

    SPWeb w = siteCollection.OpenWeb();

    w.Webs.Add("Xyzzy", "Xyzzy Title",
        "Xyzzy description", 1033, SPWebTemplate.WebTemplateWIKI, falsum, falsum);

Mea initialis searches defecit quia est vultus pro phrases sicut "praescripto a situ usura sharepoint obiectum exemplar" and the like.

Si quaerere enim "Webs.Add()", scies plura utilis Blog, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend hoc site.

</finem>

Scribet ad mea blog.

Technorati Tags: