Category Archives: SharePoint garapena

Banbu Egutegia SharePoint elkarreragina sortzeko "ustekabeko errorea gertatu da"

Gaur egun, 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, bat "Aplikazio zerbitzaria" indexatzeko eta InfoPath eta taldekatuta SQL atzera amaierako.

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, besterik ez duen esaldia.

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, Bat-batean, Niri erakutsi du polit bat ordenatu errore mezua:

image

Ez dakit zer gertatzen ari zen, edo zer kontrolatu errore mezua iritsi erantsi baino beste erakutsi nuen ?contents=1 bit of the query string.

Hau da, ziurrenik oso arraroa ertzean kasuan, baina lortuko duzu mezu hori bada,, "Ustekabeko errorea gertatu da" aurrera eta gehitu ?edukia = 1 kontsulta katea ikusi eta non doan.

</amaiera>

Nire blog Harpidetu.

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

Technorati Tags: ,

REFLECTOR erabiliz Microsoft.SharePoint.dll an

Redgate .NET Reflector Michael Blumenthal jartzea izan da alertak eta ikusia buruzko artikulu ("Which views can be used when Creating an Alert ?"), which is interesting on its own merits. Hala eta guztiz ere, 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" hobea hitza eza (he explains this much better than I do 🙂 ).

SharePoint aroan puntu honetan, 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. Hala eta guztiz ere, uste duzu, behar izanez gero, baina ez benetan jakin nola, Michael en idazteko-up gai honetan tutoretza handi bat bezala dirudi.

</amaiera>

Nire blog Harpidetu.

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

Egutegia elementuak ordenatzeko Egutegia ikuspegian

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 (galdu dut zerbait erreala, begi-bistakoa ez bada behintzat).

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, lehenetsi, it wants to list them in ID format. Beraz,, if I add "Session 02" and then "Session 01" egutegian, horiek erakusten ditu, ordena horretan (I.E, Session 02 eta, ondoren, Session 01). To list them in Session ID order, Gauza horiek saiatu pentsatu nuen:

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

    Ez zuen lan noiztik, 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, agian egutegia izango baita?

  2. Editatu web zatia, look for an "export" funtzioa eta … 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, uzten 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, baina ez da: "<ListViewXml …. >kodetuta eromena</ListViewXml>". Zehazki, altxor hau ez da:

<Kontsulta>
<Non>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Hileko />
</Balio>
</DateRangesOverlap>
</Non>
<OrderBy><FieldRef Name="Session_x0020_ID" /></OrderBy>
</Kontsulta>

(Dekodetu dut &lt;'S eta &GT eta zatitu itzazu hainbat lerro argitasun horrek onerako).

Gehitu <OrderBy> pixka bat, eta, gaur egun, mota Session ID arabera, Ez barneko zerrendako elementu ID.

Erraldoi punta o’ a kapela Becky Isserman bere Isha Sagi-ren blog post iruzkina: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <OrderBy> iruzkin gabe bere lekuan.

Hau argiago idazteko pantaila plano batekin, laster espero dut, baina kasu horretan ez dut sekula egin, gutxienez, askoz ere hau egin nuen.

</amaiera>

SharePoint Ezaugarriak & Management Solutions — Ez ahaztu CRUD en U (edo materia horren D)

Gastatzen dugu, kolektiboki pentsatzeko denbora asko SharePoint irtenbide buruzko — Nola hartu, zein tresna erabili, zer gertatzen den zabaldu badute, tenporizadorea lanpostu, esparru, 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, diseinu kontzeptuala ikuspegitik, than deploying them. Deployment is basically a cookbook affair. Typically, instalatu ezaugarri bat, Agian Ezaugarri hartzailea kargatu datu batzuk zerrenda batean sartu, that sort of thing. Hala eta guztiz ere, atzera botatzea da potentzialki konplexuagoa.

Eman konponbidea horrelako artifacts sor ditzake:

  • Eduki mota
  • Zerrenda definizioa
  • Gune definizioa
  • Zerrenda bat datu
  • Nahiz eta hargailuak
  • InfoPath inprimakiak

Zerrendan doa.

Da, jakina, garrantzitsua irtenbide bat instantiates artifacts horiek behar bezala diseinatzeko, 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, zer gertatzen den irtenbidea da atzera? 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.

Hau laguntzeko, create a matrix that lists each artifact your solution deploys to SharePoint. List three columns per artifact, bat sortu, eguneratu eta ezabatu. For each case, zehazteko, eragiketa horren emaitza zuzena.

This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm. Hala eta guztiz ere, erretzea bezalako, 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, baina, gutxienez, jarri beharko duzu kaxa bat arazoaren inguruan.

</amaiera>

Nire blog Harpidetu.

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

Technorati Tags:

Quick Fix: Web Zerbitzuak SharePoint elkarreragin, InvalidOperationException

Milioi urte, I helped developed a web service that was invoked via a custom action for a SharePoint Designer workflow. Aste honetan, bezeroak nahi izan mugitu ekoizpen (azkenik!) beraz, egin genuen.

Ohiko ekintza egin zuen lan fina, baina web zerbitzua da deitu ez, emango digu error honetan:

System.InvalidOperationException: Eragiketa hau bakarrik ordenagailu batean egin daiteke hori zerbitzaria baserri batean sartu duten erabiltzaileek SQL Server baimenak konfigurazio datu-basetik irakurtzea arabera. Zerbitzariak hau konektatzeko zerbitzari baserria, erabili SharePoint produktu eta teknologia konfigurazio morroia, tresnak Administrazio menu Start gainean dago.
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, fina lan egin ezazu.

Posting MSDN foro honetan eman zidan pista I beharrezko: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2c97c004-7118-4e06-a62c-b2b0ac07ac99

</amaiera>

Nire blog Harpidetu.

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

Technorati Tags:

Azkarra eta erraza: Talde SPItemList de SPFolder

Arazo hau sartu jarraitzen dut martxan eta Google inoiz badirudi ulertzen zer egin nahi dut, beraz, behera hau idazten nuke figured dut.

Izan dut gertaera hartzailea arazketa asko egiten ari da azken aste edo bi. The ER is defined against a document library. The individual items in the document library are tightly related to their parent folders. Beraz,, I am always getting the folder of the item for various manipulations. While debugging, Karpeta bat metadatuak eguneratu elementu zehatz bat eta haren identifikazio dut jakin behar nuen.

Hemen pixka bat kontsola aplikazio bat da (diseinatutako zerbitzari exekutatzen etxalde batean) hartzen duten bi argumentu: elementu bati identifikazio eta balio bat behar eremu bat esleitu, "Approval Status". It hard codes a lot of stuff and has no error checking.

Kodearen begiratuko gogor kodetuak gune, 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.

Edozeinek zaintzen kritika bat eskaintzeko, edo hobeto elementu bat karpeta lortzeko iradokitzen bada, Mesedez, utzi iruzkin bat.

<kodea>
erabiliz Sistema;
erabiliz System.Collections.Generic;
erabiliz System.Text;
erabiliz Microsoft.SharePoint;
erabiliz System.Collections;

namespace Conchango
{
    /// <laburpena>
 /// </laburpena>
 klasean ManualFolderUpdate
    {
        estatiko gal Nagusia(katea[] argumentuak)
        {
            katea msh = "ManualFolderUpdate (v1.0): "; // msh = "Message Header"

 Kontsolara.WriteLine(msh + "Starting up.  Nintzen azken aldaketa: 08/04/08.");

            katea url = http://localhost/xyzzy;

            erabiliz (SPSite oSPSite = berria SPSite(url))
            {

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

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

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

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

                    FolderID = Sistema.Bihurtu.ToInt32(argumentuak[0].ToString());
                    Kontsolara.WriteLine("Seeking folder for item: [" + FolderID + "].");

                    SPListItem li = docLib.GetItemById(FolderID);

                    SPFolder thisItemFolder = li.File.ParentFolder;

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

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

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

                    Kontsolara.ReadLine();

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

                    Kontsolara.WriteLine(msh + "Finished updating the folder.  Irteten.");

                } // SPWeb erabiliz

            } // SPSite erabiliz

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

        } // Nagusia

    } // klase foldersync
} // namespace
</kodea>

</amaiera>

Nire blog Harpidetu.

Technorati Tags:

Ekintza pertsonalizatuak ezkutatzea SharePoint en

Duela hilabete batzuk, Proiektu bat bezero bat lanean, I created a feature. Among other things, eginbide definitu Ekintza pertsonalizatu bat (gune horien ezarpenak pean agertzen). The only purpose for this custom action was to demonstrate to me that the feature activation was working as expected. Funtsean,, 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, they are read directly from the Elements.xml file and copied into application state at runtime. Beraz,, you don’t need to deactivate, uninstall, reinstall, and reactivate the Feature to remove the CustomAction. Just remove it from the Elements.xml file and recycle the application pool(s) effected. The next time the Feature is in scope, you won’t see the CustomAction anymore."

I followed his instructions and, jakina, they work.

Nire kasuan, 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, I believe you’ll have to make the change in each.

</amaiera>

Nire blog Harpidetu.

Quick Fix: SharePoint Web sartzean botatzen [HttpException (0x80004005): Eskaera denboraz kanpo.]

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" zerikusirik gune bihurtu zen, oso motela eta, sarritan, denboraz kanpo errore hau:

[HttpException (0x80004005): Eskaera denboraz kanpo.]

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 trusty du ?edukia = 1 arazketa-teknika, Izan ere, ez dut aurkitu 11 web orriaren zati, only two of which were visible. Even better (bat let's-itxaropena-I-aurki-zerbait-itsusi-hemen-ditudan-ahal-konpondu ikuspegitik), three of those closed web parts had a name of "Error".

Web zati horiek ezabatu dut (berez hartu harrigarriro denbora luzea) and that solved the problem. For today 🙂

</amaiera>

Nire blog Harpidetu.

Technorati Tags:

Zerbitzuak SSRS Web deitzean WSS From / FBA Ingurumena MOSS

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: Baimenik ez
  • Objektua lekuz aldatu

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

Izan dut azkenean konturatu I laster blog-sarrera 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 (gisa 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".

Hona hemen kodea Gurekin lan egin:

ReportingService2006 RS = zero; 
// Autentifikatu Autentifikazio auth = berria Autentifikazio(); 
auth.Url = "http://URL / _vti_bin / Authentication.asmx";
auth.CookieContainer =
berria CookieContainer();
LoginResult emaitza = auth.Login("userid", "password");
bada (result.ErrorCode == LoginErrorCode.NoError) 
{
// Error No, beraz, lortu cookies.
CookieCollection cookies = auth.CookieContainer.GetCookies(berria Uri(auth.Url));
Cookie authCookie = cookies[result.CookieName];
RS =
berria ReportingService2006();
rs.Url =
"http://server/_vti_bin/ReportServer/ReportService2006.asmx";
rs.CookieContainer =
berria CookieContainer();
rs.CookieContainer.Add(authCookie);
}
saiatu
{
  rs.CreateSubscription(berri, extSettings, desc, eventType, Jokoaren datuak, parameters1);
}
harrapatzeko (Exception ex)
{
  Console.WriteLine(ex.Message.ToString());
}

Gauzak horrela interpretatu dut:

  • Autentifikazio-zerbitzua sortu markatu eta esan behar da gure web parte, "Hey, Tony, me da!".
  • Autentifikazio zerbitzua erantzunak esaten, "Hey, I know you. How are the kids? Here’s a token."
  • SSRS deitzen diogu, zerbitzu eta esatea, "Tony sent me, Hemen token."

</amaiera>

Nire blog Harpidetu.

Azkarra eta sinplea: Xedapen SharePoint Object Model erabiliz C web gune bat #

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.

Kode hau berria Wiki gune sortzen:

 SPSite siteCollection;

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

    SPWeb w = siteCollection.OpenWeb();

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

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

Baduzu bilatu for "Webs.Add()", blog oso erabilgarria da sarrera kopuru bat aurkituko duzu:, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend gune honetan.

</amaiera>

Nire blog Harpidetu.

Technorati Tags: