jamii Archives: SharePoint Maendeleo

Mianzi kalenda Kushirikiana na SharePoint Sababu "Hitilafu isiyotarajiwa ilitokea"

Leo, 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, "Maombi server" kwa Indexing na InfoPath na mashada SQL mwisho ya nyuma.

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, just that sentence.

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, suddenly, it showed me a nice orderly error message:

image

I don’t know what was happening or what I did to get the controlled error message to display other than appending the ?contents=1 bit of the query string.

This is probably a very rare edge case but if you get that message, “An unexpected error occurred” go ahead and add ?contents=1 to the query string and see where that leads.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati: ,

Kutumia reflector juu Microsoft.SharePoint.dll

Redgate .NET Reflector Michael Blumenthal ameweka hadi makala kuhusu alerts na maoni ("Which views can be used when Creating an Alert ?"), which is interesting on its own merits. Hata hivyo, 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" kwa kukosa neno bora (he explains this much better than I do 🙂 ).

Katika hatua hii katika zama 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. Hata hivyo, kama unadhani unahitaji yake lakini si kweli kujua jinsi, Michael kuandika-up inaonekana kama mafunzo kubwa juu ya somo hili.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Uamuzi Items kalenda katika View kalenda

Ninatumia kalenda kufuatilia majadiliano ya vikundi kwenye siku husika,,en,Nina vikao viwili,,en,asubuhi na mchana,,en,Nataka kujenga mtazamo kwamba inaonyesha vikao asubuhi tu waliotajwa alphabetically kupitia ID kikao,,en,Hii ni suala gumu kidogo wa kukamilisha,,en,Mimi urahisi kuunda maoni kuchujwa kuonyesha tu matukio ya siku hiyo ya,,en,kalenda itaonyesha matukio hayo yote na kama kila itafanyika katika muda wa saa moja,,en,ni orodha yao kwa upande upande katika saa yanayopangwa,,en,Hiyo ni kubwa,,en,sehemu gumu ni kwamba,,en,inataka orodha yao katika format ID,,en,kama mimi kuongeza "Kikao 02,,en,na kisha "Kikao 01,,en,Kuorodhesha yao katika Kikao ID ili,,en,Sanidi mtazamo kutumia wavuti user interface,,en,Hakuna bahati,,en,Hakuna njia ya kutatua vitu hivi,,en. 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 (isipokuwa mimi amekosa kitu halisi dhahiri).

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, na default, it wants to list them in ID format. Hivyo, if I add "Session 02" and then "Session 01" wa kalenda ya, inaonyesha yao ili (i.e, Kikao 02 na kisha Kikao 01). To list them in Session ID order, Nilidhani kujaribu mambo haya:

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

    Tangu kwamba hakuwa na kazi, 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, labda kalenda mapenzi pamoja?

  2. Hariri sehemu ya mtandao, look for an "export" kazi na … 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, kwamba majani 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, lakini ni huko: "<ListViewXml …. >encoded wazimu</ListViewXml>". Hasa, kuna gem hii:

<Swala>
<Ambapo>
<DateRangesOverlap>
<FieldRef Name="EventDate"/>
<FieldRef Name="EndDate"/>
<FieldRef Name="RecurrenceID"/>
<Value Type="DateTime">
<Mwezi />
</Thamani>
</DateRangesOverlap>
</Ambapo>
<Orderby><FieldRef Name="Session_x0020_ID" /></Orderby>
</Swala>

(Nimekuwa Decoded &lt;'S na &gt na kupasuliwa yao nje ya mistari kadhaa kwa ajili ya ufafanuzi).

Kuongeza <Orderby> kidogo na sasa aina hiyo kwa ID Kikao, si ndani ya orodha ya bidhaa ID.

Gigantic ncha au’ kofia Becky Isserman kwa maoni yake kwa blog post Isha Sagi ya: http://www.sharepoint-tips.com/2008/07/caml-sorting-by-file-name.html. I wouldn’t have put the <Orderby> katika nafasi ya haki bila maoni yake.

Natumaini kuandika hii hadi wazi zaidi na shots screen hivi karibuni, lakini katika kesi mimi kamwe kufanya, angalau mimi sana hii.

</mwisho>

Tags technorati: , , ,

SharePoint Sifa & Ufumbuzi Usimamizi — Usisahau U katika CRUD (au D kwa jambo hilo)

Sisi kwa pamoja kutumia mpango mkubwa wa kufikiri kuhusu wakati SharePoint ufumbuzi — jinsi ya kujenga yao, zana ipi ya kutumia, kile kinachotokea wakati wao kushindwa kupeleka, timer ajira, scopes, nk. 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, kutoka katika mtazamo wa dhana kubuni, than deploying them. Deployment is basically a cookbook affair. Typically, kufunga kipengele, labda kuwa receiver kipengele mzigo data baadhi katika orodha, that sort of thing. Hata hivyo, retracting ni uwezekano ngumu zaidi.

ufumbuzi kutokana na inaweza kujenga mabaki kama haya:

  • Aina ya maudhui
  • Orodha ya Ufafanuzi
  • Ufafanuzi tovuti
  • Data katika orodha
  • Hata kupokea
  • InfoPath aina

orodha inaendelea.

Wakati ni wazi muhimu kwa kubuni ufumbuzi kwamba instantiates mabaki ya wale usahihi, 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, kile kinachotokea wakati ufumbuzi ni retracted? 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.

Kwa msaada na hii, create a matrix that lists each artifact your solution deploys to SharePoint. List three columns per artifact, moja kwa ajili ya kujenga, update and delete. For each case, kuamua matokeo sahihi kwa ajili ya operesheni ambayo.

This sort of analysis is obviously best done before the solution is ever deployed to a SharePoint farm. Hata hivyo, kama sigara, 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, lakini angalau wewe utakuwa na kuweka sanduku kuzunguka tatizo.

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin

Tags technorati:

Quick Fix: Huduma za Mtandao kwamba kiutendaji na SharePoint, InvalidOperationException

miaka milioni iliyopita, I helped developed a web service that was invoked via a custom action for a SharePoint Designer workflow. Wiki hii, mteja alitaka hoja hiyo kwa uzalishaji (hatimaye!) hivyo sisi alifanya.

hatua desturi kazi nzuri, lakini huduma ya mtandao ni kutenguliwa hakuwa, anatupa kosa hili:

System.InvalidOperationException: Operesheni hii unaweza kufanywa tu kwenye kompyuta hiyo ni alijiunga na shamba server kwa watumiaji ambao wana ruhusa katika SQL Server ya kusoma kutoka orodha Configuration. Kuungana hii server shambani server, kutumia Bidhaa SharePoint na Teknolojia Upangiaji mchawi, iko kwenye orodha ya Mwanzo katika Vyombo vya Utawala.
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, ni kazi nzuri.

Jukwaa hili MSDN posting alinipa kidokezo mimi zinahitajika: http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/2c97c004-7118-4e06-a62c-b2b0ac07ac99

</mwisho>

Kujiunga na blog yangu.

Kufuata yangu juu ya Twitter: http://twitter.com/pagalvin

Tags technorati:

Haraka na Easy: Kupata SPFolder ya SPItemList

Naendelea mbio katika tatizo hili na Google kamwe inaonekana kuelewa nini nataka kufanya, hivyo mimi figured napenda kuandika hii chini.

Nimekuwa kufanya mengi ya tukio debugging receiver katika wiki ya mwisho au mbili. The ER is defined against a document library. The individual items in the document library are tightly related to their parent folders. Hivyo, I am always getting the folder of the item for various manipulations. While debugging, Mimi zinahitajika update metadata ya folder kwa bidhaa maalum ambao ID najua.

Hapa ni kidogo console maombi (iliyoundwa na kukimbia katika server katika kilimo) kwamba inachukua hoja mbili: ID ya bidhaa na thamani hawawajui shamba, "Approval Status". It hard codes a lot of stuff and has no error checking.

kanuni inaonekana hadi ngumu coded tovuti, 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.

Kama mtu yeyote anayejali kutoa kukosoa au kupendekeza njia bora ya kupata folder ya bidhaa, tafadhali acha maoni.

<kanuni>
kutumia Mfumo;
kutumia System.Collections.Generic;
kutumia System.Text;
kutumia Microsoft.SharePoint;
kutumia System.Collections;

namespace Conchango
{
    /// <muhtasari>
 /// </muhtasari>
 darasani ManualFolderUpdate
    {
        tuli utupu Kuu(string[] args)
        {
            string msh = "ManualFolderUpdate (v1.0): "; // msh = "Message Header"

 Kuwafariji.WriteLine(msh + "Starting up.  Mimi mara ya mwisho tarehe 08/04/08.");

            string url = http://localhost/xyzzy;

            kutumia (SPSite oSPSite = mpya SPSite(url))
            {

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

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

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

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

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

                    SPListItem li = docLib.GetItemById(FolderID);

                    SPFolder thisItemFolder = li.File.ParentFolder;

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

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

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

                    Kuwafariji.ReadLine();

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

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

                } // kutumia SPWeb

            } // kutumia SPSite

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

        } // Kuu

    } // darasani foldersync
} // namespace
</kanuni>

</mwisho>

Kujiunga na blog yangu.

Tags technorati:

Mafichoni Vitendo Desturi katika SharePoint

Several months ago, while working on a project for a client, I created a feature. Among other things, that feature defined a custom action (these appear under site settings). The only purpose for this custom action was to demonstrate to me that the feature activation was working as expected. Kimsingi, 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. Hivyo, 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, bila shaka, they work.

Katika kesi yangu, 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.

</mwisho>

Kujiunga na blog yangu.

Quick Fix: Kupata SharePoint Site imeutupa [HttpException (0x80004005): Ombi umepita.]

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, lakini "ghafla" tovuti unrelated akawa polepole sana na mara nyingi umepita na kosa hili:

[HttpException (0x80004005): Ombi umepita.]

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 muaminifu ?yaliyomo = 1 Ondoa Hitialfu mbinu, Mimi kwa kweli kupata 11 mtandao sehemu katika ukurasa wa, only two of which were visible. Even better (kutoka let's-matumaini, I-kupata-kitu-ugly-hapa-kwamba-I-wanaweza-kurekebisha mtazamo), tatu ya sehemu hizo funge mtandao alikuwa na jina la "Hitilafu".

Mimi ilifutwa sehemu hizo mtandao (ambayo yenyewe alichukua muda mrefu ya kushangaza) and that solved the problem. Kwa leo 🙂

</mwisho>

Kujiunga na blog yangu.

Tags technorati:

Kuliungama Huduma Mtandao SSRS Kutoka WSS / MOSS katika Mazingira 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: Hana mamlaka ya
  • Kitu Moved

The "object moved" message was most interesting because it was saying that the "object" (yetu SSRS huduma) 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 (kama ya 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".

Here’s the code that worked for us:

ReportingService2006 rs = null; 
// Authenticate Authentication auth = mpya Authentication(); 
auth.Url = "http://URL / _vti_bin / Authentication.asmx";
auth.CookieContainer =
mpya CookieContainer();
LoginResult matokeo = auth.Login("userid", "password");
kama (result.ErrorCode == LoginErrorCode.NoError) 
{
// Hakuna makosa, hivyo kupata biskuti.
CookieCollection cookies = auth.CookieContainer.GetCookies(mpya Uri(auth.Url));
Kuki authCookie = kuki[result.CookieName];
rs =
mpya ReportingService2006();
rs.Url =
"http://server/_vti_bin/ReportServer/ReportService2006.asmx";
rs.CookieContainer =
mpya CookieContainer();
rs.CookieContainer.Add(authCookie);
}
kujaribu
{
  rs.CreateSubscription(kuripoti, extSettings, desc, eventType, matchData, parameters1);
}
kukamata (Ubaguzi wa zamani)
{
  Console.WriteLine(ex.Message.ToString());
}

Mimi kutafsiri mambo ya kufanya kazi kama hii:

  • Mtandao wetu sehemu inahitaji piga juu ya huduma ya kujitambulisha na kusema, "Hey, Tony, ni mimi!".
  • Uthibitishaji huduma majibu akisema, "Hey, I know you. How are the kids? Here’s a token."
  • Tunatoa wito up huduma SSRS na kusema, "Tony sent me, hapa ni ishara."

</mwisho>

Kujiunga na blog yangu.

Haraka na rahisi: Utoaji Web Site Kutumia SharePoint Object Mfano Katika 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.

Kanuni hii inajenga mpya Wiki tovuti:

 SPSite siteCollection;

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

    SPWeb w = siteCollection.OpenWeb();

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

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

Kama wewe kutafuta for "Webs.Add()", utapata idadi ya washiriki muhimu sana blog, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend tovuti hii.

</mwisho>

Kujiunga na blog yangu.

Tags technorati: