Arkivji tal-Kategorija: SharePoint Iżvilupp

Bambu Kalendarju Interazzjoni ma SharePoint Causes "żball mhux mistennija ġara"

Illum, 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 "server applikazzjoni" għal indiċjar u InfoPath u SQL back aħħar raggruppat.

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, biss li sentenza.

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, f'daqqa, dan wera lili messaġġ ta 'żball sbieħ ordnat:

image

I do not know dak li kien qed jiġri jew dak li għamilt biex jiksbu l-messaġġ ta 'żball kkontrollata li juri għajr jpoġġu l- ?contents=1 bit of the query string.

Din hija probabbilment każ tarf rari ħafna iżda jekk ikollok dak il-messaġġ, "Żball mhux mistennija ġara" jimxi 'l quddiem u żid ?kontenut = 1 sa l-sekwenza mistoqsija u ara fejn dan iwassal.

</aħħar>

Abbona għall-blog tiegħi.

Follow lili Twitter fi http://www.twitter.com/pagalvin

Bl-użu rifletturi fuq Microsoft.SharePoint.dll

Redgate .NET Reflector Michael Blumenthal ikun imqiegħed artiklu dwar allerti u l-fehmiet ("Which views can be used when Creating an Alert ?"), which is interesting on its own merits. Madankollu, 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" għal nuqqas ta 'kelma aħjar (he explains this much better than I do 🙂 ).

F'dan il-punt fl-era SharePoint, 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. Madankollu, jekk taħseb li għandek bżonn iżda ma verament jafu kif, Michael write-up tidher qisha tutorja kbira fuq dan is-suġġett.

</aħħar>

Abbona għall-blog tiegħi.

Follow lili Twitter fi http://www.twitter.com/pagalvin

Sortjar Punti Kalendarju fil-View Kalendarju

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 (sakemm I qbiżt xi ħaġa reali ovvju).

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, b'mankanza, it wants to list them in ID format. Allura, if I add "Session 02" and then "Session 01" il-kalendarju, jurihom f'dik l-ordni (I.E, Sessjoni 02 u mbagħad Sessjoni 01). To list them in Session ID order, Ħsibt li jippruvaw dawn l-affarijiet:

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

    Peress li ma ħadmux, 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, maybe calendar will as well?

  2. Edit the web part, look for an "export" function and … BZZZT! 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, that leaves 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, but it’s there: "<ListViewXml …. >encoded madness</ListViewXml>". Speċifikament, hemm dan gem:

<Mistoqsija>
<Fejn>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Xahar />
</Valur>
</DateRangesOverlap>
</Fejn>
<OrderBy><FieldRef Name="Session_x0020_ID" /></OrderBy>
</Mistoqsija>

(Stajt decoded l- &lt;"Iu &tal gt u maqsuma minnhom għal-linji multipli f'ġieħ iċ-ċarezza).

Żid il- <OrderBy> bit u issa xorta mill Sessjoni ID, mhux l-lista ta 'loġġetti ID intern.

Ġiganteski ponta o’ il-hat biex Becky Isserman għall-kummenti tagħha biex blog post Isha Sagi tal: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <OrderBy> fil-post dritt mingħajr kumment tagħha.

Nispera li tikteb dan up aktar ċar fir screen shots malajr, iżda fil-każ I qatt ma, inqas Jien għamilt dan ħafna.

</aħħar>

Karatteristiċi SharePoint & Soluzzjonijiet ta 'Ġestjoni — Tinsiex il-U fl CRUD (jew il-D għal dik il-kwistjoni)

Aħna flimkien jonfqu ammont kbir ta 'ħin jaħsbu dwar soluzzjonijiet SharePoint — kif toħloq lilhom, li għodda għall-użu, x'jiġri meta dawn jonqsu li tuża, impjiegi timer, ambiti, eċċ. 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, minn perspettiva disinn kunċettwali, than deploying them. Deployment is basically a cookbook affair. Typically, jinstallaw karatteristika, forsi jkunu riċevitur karatteristika tagħbija xi data ġo lista, that sort of thing. Madankollu, retracting huwa potenzjalment aktar kumplessa.

Soluzzjoni mogħti jista 'joħloq artifacts bħal dawn:

  • Kontenut Tip
  • Lista Definizzjoni
  • Site Definizzjoni
  • Data fil-lista
  • Anke riċevituri
  • Forom InfoPath

Il-lista tkompli.

Filwaqt li huwa ovvjament importanti li disinn soluzzjoni li instantiates dawk artifacts korrett, 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, x'jiġri meta s-soluzzjoni tiġi miġbuda lura? 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.

Biex tgħin ma 'dan, create a matrix that lists each artifact your solution deploys to SharePoint. List three columns per artifact, waħda għall joħolqu, update and delete. For each case, jiddeterminaw ir-riżultat korrett għal dik l-operazzjoni.

This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm. Madankollu, bħat-tipjip, 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, iżda mill-inqas inti ser ikollok tpoġġi kaxxa madwar il-problema.

</aħħar>

Abbona għall-blog tiegħi.

Follow lili Twitter fi http://www.twitter.com/pagalvin

Quick jiffissaw: Web Services li jinteraġixxu ma SharePoint, InvalidOperationException

A snin miljun ilu, I helped developed a web service that was invoked via a custom action for a SharePoint Designer workflow. Din il-ġimgħa, il-klijent riedu li jitmexxa għall-produzzjoni (finalment!) hekk għamilna.

L-azzjoni custom maħduma multa, iżda s-servizz web hija qajmet ma, tagħtina dan l-iżball:

System.InvalidOperationException: This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products and Technologies Configuration Wizard, located on the Start menu in Administrative 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, maħduma multa.

This MSDN forum posting gave me the clue I needed: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2c97c004-7118-4e06-a62c-b2b0ac07ac99

</aħħar>

Abbona għall-blog tiegħi.

Follow me on twitter: http://twitter.com/pagalvin

Quick u Easy: Get SPFolder ta SPItemList

I iżommu taħdem fis din il-problema u l-Google qatt ma jidher li jifhmu dak I trid tagħmel, so I dehret I se jikteb din stabbiliti.

Stajt kont qed tagħmel ħafna ta 'debugging riċevitur avveniment fl-aħħar ġimgħa jew tnejn. The ER is defined against a document library. The individual items in the document library are tightly related to their parent folders. Allura, I am always getting the folder of the item for various manipulations. While debugging, I needed to update the metadata of a folder for a specific item whose ID I know.

Here’s a little console application (designed to run on server in the farm) that takes two arguments: the ID of an item and a value to assign to a field, "Approval Status". It hard codes a lot of stuff and has no error checking.

The code looks up a hard coded site, 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.

If anyone cares to offer a critique or suggest a better way to get the folder of an item, jekk jogħġbok leave kumment.

<code>
użu Sistema;
użu System.Collections.Generic;
użu System.Text;
użu Microsoft.SharePoint;
użu System.Collections;

namespace Conchango
{
    /// <sommarju>
 /// </sommarju>
 klassi ManualFolderUpdate
    {
        statiku null Main(string[] args)
        {
            string msh = "ManualFolderUpdate (v1.0): "; // msh = "Message Header"

 Console.WriteLine(msh + "Starting up.  I was last modified on 08/04/08.");

            string url = http://localhost/xyzzy;

            użu (SPSite oSPSite = ġdid SPSite(url))
            {

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

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

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

                    int FolderID = 0;
                    string NewStatus = "xyzzy";

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

                    SPListItem li = docLib.GetItemById(FolderID);

                    SPFolder thisItemFolder = li.File.ParentFolder;

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

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

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

                    Console.ReadLine();

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

                    Console.WriteLine(msh + "Finished updating the folder.  Exiting.");

                } // using SPWeb

            } // using SPSite

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

        } // Main

    } // class foldersync
} // namespace
</code>

</aħħar>

Abbona għall-blog tiegħi.

Ħabi Azzjonijiet Custom fil SharePoint

Diversi xhur ilu, waqt ix-xogħol fuq proġett ta 'klijent, I created a feature. Among other things, li karatteristika definit azzjoni custom (dawn jidhru taħt settings tas-sit). The only purpose for this custom action was to demonstrate to me that the feature activation was working as expected. Bażikament, I used it as a crude form of debugging.

Much to my embarrassment, this debugging artifact made its way from dev to UAT and to production before someone got around to asking, "what is this xyzzy link?"

By now, we’re in production and I really don’t want to uninstall the feature, fix elements.xml and then reinstall.

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

"CustomActions are not copied into the database, huma jinqara direttament mill-fajl Elements.xml u ikkopjata fil stat applikazzjoni fil runtime. Allura, inti m'għandekx bżonn li deattivat, uninstall, jerġa, u jattiva l-karatteristika li tneħħi l-CustomAction. Just tneħħiha mill-fajl Elements.xml u jirriċiklaw l-pool applikazzjoni(i) effettwata. Il-ħin li jmiss il-karatteristika hija fl-ambitu, inti mhux ser tara l-CustomAction aktar."

I segwita l-istruzzjonijiet tiegħu u, tal-kors, jaħdmu.

Fil-każ tiegħi, 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, Nemmen li inti ser ikollhom jagħmlu l-bidla f'kull.

</aħħar>

Abbona għall-blog tiegħi.

Quick jiffissaw: Aċċess Site SharePoint throws [HttpException (0x80004005): Talba puntwali out.]

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" sit mhux relatati sar bil-mod ħafna u spiss ttajmjati out ma 'dan l-iżball:

[HttpException (0x80004005): Talba puntwali out.]

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 l trusty ?kontenut = 1 teknika debug, I sabet effettivament 11 web partijiet fuq il-paġna, only two of which were visible. Even better (minn-'I-isibu-ikrah--hawn' li-I-can jiffissaw xi ħaġa tama let's perspettiva), three of those closed web parts had a name of "Error".

I imħassar dawk il-partijiet tal-web (li fih innifsu ħadet żmien twil sorprendenti) and that solved the problem. For today 🙂

</aħħar>

Abbona għall-blog tiegħi.

Tags:

Invokazzjoni SSRS Web Services Mill WSS / MOSS fl FBA Ambjent

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: Mhux awtorizzat
  • Għan Ittrasferit

The "object moved" message was most interesting because it was saying that the "object" (SSRS servizz tagħna) 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 (bħala ta ' 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".

Hawn il-kodiċi li ħadmu għalina:

ReportingService2006 rs = null; 
// Authenticate Authentication auth = ġdid Authentication(); 
auth.Url = "http://URL/_vti_bin/Authentication.asmx";
auth.CookieContainer =
ġdid CookieContainer();
LoginResult result = auth.Login("userid", "password");
jekk (result.ErrorCode == LoginErrorCode.NoError) 
{
// No error, so get the cookies.
CookieCollection cookies = auth.CookieContainer.GetCookies(ġdid Uri(auth.Url));
Cookie authCookie = cookies[result.CookieName];
rs =
ġdid ReportingService2006();
rs.Url =
"http://server/_vti_bin/ReportServer/ReportService2006.asmx";
rs.CookieContainer =
ġdid CookieContainer();
rs.CookieContainer.Add(authCookie);
}
jippruvaw
{
  rs.CreateSubscription(report, extSettings, desc, eventType, matchData, parameters1);
}
qabda (Eċċezzjoni ex)
{
  WriteLine(ex.Message.ToString());
}

I interpret things to work like this:

  • Parti web tagħna jeħtieġ li dial up-servizz awtentikazzjoni u jgħidu, "Hey, Tony, huwa me!".
  • Jirrispondi Awtentikazzjoni qal, "Hey, I know you. How are the kids? Here’s a token."
  • Aħna nsejħu l-servizz SSRS u jgħidu, "Tony sent me, hawn l-token."

</aħħar>

Abbona għall-blog tiegħi.

Quick u sempliċi: Dispożizzjoni Sit Web Uża Object Model SharePoint Fil 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.

Dan il-kodiċi joħloq sit Wiki ġdida:

 SPSite siteCollection;

    siteCollection = ġdid SPSite("http://conchang-o9l8qi");

    SPWeb w = siteCollection.OpenWeb();

    w.Webs.Add("xyzzy", "xyzzy Title",
        "xyzzy description", 1033, SPWebTemplate.WebTemplateWIKI, falza, falza);

My initial searches failed because I was looking for phrases like "provision a web site using sharepoint object model" and the like.

Jekk inti tfittxija for "Webs.Add()", inti ser issib numru ta 'daħliet blog utli ħafna, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend dan is-sit.

</aħħar>

Abbona għall-blog tiegħi.