Nyaraka za kila mwezi: Januari 2008

Ufumbuzi wa Kushindwa BDC ADF Import: “makosa yafuatayo ilitokea:”

Mimi mara kwa mara nyingine tena kuandika BDC files ADF kwa mkono (so that I can build up my "get off my lawn!" Mimi) na kugonga kosa hili lovely:

picha

"Application definition import failed. makosa yafuatayo ilitokea:"

Kama unaweza kuona, kuna makosa, lakini … si kwenda kuwaambia mimi ni nini.

Katika kesi yangu, the issue turned out that I had started off with a functional ADF for a different project that connected to a database and executed a SQL query against a view. In this new project, I am calling a method on a web service. I had stripped out the DB specific stuff and added my web service stuff, but failed to update the <LobSystem>’s Type attribute. I switched it to "WebService" and I happily moved on to newer and more exciting import errors, which were handled in due course.

Here is the wrong LobSystem:

<LobSystem
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=http://schemas.microsoft.com/office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Type="Database"
Version="1.0.0.0" Name="xyzzy"
xmlns="
http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

This is correct:

<LobSystem
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=http://schemas.microsoft.com/office/2006/03/BusinessDataCatalogBDCMetadata.xsd
Type="WebService"
Version="1.0.0.0" Name="xyzzy"
xmlns="
http://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">

</mwisho>

Tags technorati:

BDC Inaonekana Badala ya faida kwa ajili ya lookups

UPDATE: Hii MSDN posting ina baadhi ya uchunguzi ya kuvutia kutoka JXJ msingi wake, hasa hasi, uzoefu kwenda chini njia hii: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2623565&SiteID=1

We have a business scenario where we need to link two documents libraries via a common "document ID" shamba.

We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, tatu ambayo ni:

  1. Only one column from the lookup lookup library can be linked.
  2. Utendaji: The source library could contain hundreds of entries. That’s too many entries in the lookup.
  3. Kutafuta: There is no integrated search. I don’t mean in the MOSS sense of search, lakini hakuna njia ya kutafuta / kuchuja na nguzo nyingi kutoka maktaba hati chanzo na Machapisho kiungo unataka.

Yanayoambatana na BDC, we can use a "business data" column type and it provides a superior search and even allows multiple columns of data to appear in list views.

Nimepata baadhi ya mafanikio ya awali na mbinu hii na mpango wa kuandika zaidi kuhusu hilo.

Kama umefanya kazi hii kabla ya angle na kuwa na maoni yoyote, tafadhali kushiriki!

</mwisho>

Tags technorati:

Ufumbuzi wa Hitilafu BDC Import: “Haikuweza kupakia Aina ilivyoelezwa na TypeName TypeDescriptor ya …”

Nimekuwa kazi na leo BDC, coding ADF files by hand and generating myself some errors. One such error:

Maombi ufafanuzi kuagiza wameshindwa. makosa yafuatayo ilitokea: Haikuweza kupakia Aina ilivyoelezwa na TypeName TypeDescriptor ya. Parameter jina: Hitilafu typeName lilipatikana katika au kabla tu Line: '35’ na Msimamo: ’20’.

MOSS kuonyeshwa kosa hili wakati nilijaribu kuagiza ADF XML faili.

Mimi utafiti Internets na kukuta kwamba nilikuwa referencing mfano LOB jina (kutoka <LobSystemInstance>) katika wangu <TypeDescriptor> nodi wakati mimi wanapaswa inatazamwa jina LOB yenyewe (kutoka <LobSystem>).

Vibaya:

<TypeDescriptor TypeName="Conchango.KeyValue, LOB tukio la" Name="KeyValue">

Kusahihisha:

<TypeDescriptor TypeName="Conchango.KeyValue, LOB Jina" Name="KeyValue">

Matumaini hii moja anaokoa mtu saa moja au mbili ya muda.

</mwisho>

Kujiunga na blog yangu!

Tags technorati:

Ufumbuzi wa tatizo: “FileNotFoundException” Pamoja na kupokea Makala yangu.

I was working on a feature last week that would add some event receivers to a specific list instance. (Mimi blogged kidogo kuhusu receiver kwamba orodha hapa).

Kutumia mstari amri, Mimi naweza kufunga kipengele na hakuna kosa (lakini angalia chini kwa ajili ya kosa ya siri). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" kosa. This blog entry describes how I solved it.

This is the error that MOSS showed me in the web browser:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" failed: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ au mmoja wa beroendet yake. The system cannot find the file specified.
File name: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName Filename, Kamba codebase, Ushahidi assemblySecurity, Bunge locationHint, StackCrawlMark& stack udongo, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Ushahidi assemblySecurity, StackCrawlMark& stack udongo, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Ushahidi assemblySecurity, StackCrawlMark& stack udongo, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) kwa 1.
Kumbuka: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Troubleshoot issues with Windows SharePoint Services.

I know how to deliberately cause that error: don’t install the assembly in the GAC. Lakini, it was in the GAC. I normally install assemblies into the GAC by dragging them into the c:\windows\assembly folder using windows explorer. I’ve never felt 100% comfortable doing that because I always thought that gacutil existed for a reason … so I tried that. It made no difference.

I searched the Internets and found this post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

The poster happened to be using the same root bit of code (from the Inside WSS book from this list) so that was a hopeful sign. Hata hivyo, the suggestion of decorating the assembly with an [assembly: ] directive didn’t make sense to me. I tried it anyway and I was right. It made no difference.

Then I noticed that my class definition was not public. I made it public and that made no difference.

Ijayo, I went to the trouble of enabling the "assembly bind failure log" (following the helpful and accurate instructions provided) and this is where things started to get interesting. That log shows me that the runtime is searching everywhere on that server for my assembly. It even appears to be searching for it in my medicine cabinet. Lakini … it won’t search for it in the GAC.

I put on my winter jacket and go searching the Internets again and find that someone has had this problem too. The lengthy discussion in that posting peters off into nothing and I can’t find a solution.

I move my assembly into one of the places the log claims it’s searching and I make a little more progress. I’m rewarded with a new error in the browser when I try to activate the feature:

Failed to create feature receiver object from assembly "xyzzyFeatureReceiver_0", type "Conchango.xyzzyFeatureReceiver" for feature b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Value cannot be null.
Parameter jina: aina
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

Troubleshoot issues with Windows SharePoint Services.

Time for one last trip to the Internets!

This time I find out, predictably enough, that MOSS issues this error because the assembly is not in GAC.

I want to get something positive out of this and try to feel a little proud that I’ve created the Fugitive of MSIL assemblies, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" under my breath.

I finally decide to punt. I create an entirely new project and copy/paste the code from the incredible-cloaked-from-the-GAC-assembly non-working project over to this new project. (I look for a build flag called something like "hide from assembly binding if installed in the GAC" but can’t find one).

I install the feature and activate it and … it works! Hivyo, after all that, I had to basically ‘reboot’ my project. This is another reason why I hate computers.

I did learn something useful from this. I had been installing features using the stsadm command line all day long and been using the "-force" option out of habit. Kwa sababu baadhi ya, I did not use the -force option when I installed the new project. Wakati huu, I did actually, truly forget to copy this new project’s assembly into the GAC. Kama matokeo, I received that "FielNotFoundException" kosa. Wakati huu, I got it from stsadm, not when I tried to activate the feature via the web browser. Hivyo, -force actually plays two roles. It allows you to re-install an existing feature. It also allows you to install a buggy feature that cannot work at runtime by suppressing the error. It probably says as much in the help somewhere but I never noticed it.

</mwisho>

Tags technorati: ,

Jumapili Mapenzi: Juu 10 Njia ya waudhi Mke wako

  1. Kununua broccoli wakati unajua tayari kuna zaidi ya kutosha katika friji.
  2. Go for a run. Cool off. Take off clean pillow case and replace with T-shirt. Cover with clean pillow case.
  3. Wakati wa kuendesha gari, kuuliza kama tunaweza kwenda njia sahihi chini ya mitaani njia moja.
  4. Kwa 15 miaka, kila Jumapili kwamba wewe mke unaonyesha kwenda makumbusho, kueleza mshangao kwamba makumbusho ni wazi juu ya Jumapili.
  5. Kwa 15 miaka, occasionally suggest going to the local book store on Sunday. Express surprise that they are not open on Sunday’s (shukrani sana Blue Sheria!).
  6. Kutumia 20 pointi ya kufanya 3 point turn.
  7. Juu ya baridi mchana mapema Fall, walk into the room and turn on the A/C. Complain that it’s cold. When wife says, "then why did you turn that on, silly" na anapata hadi kugeuka kuwa mbali, grab the warm spot she had on the couch. Bonus points if she does not realize you did it until much later.
  8. Kufungua unaweza wa tonfisk ladha nyeupe ALBACORE na kula moja kwa moja kutoka unaweza, katika kitanda, usiku.
  9. Kwenda katika jikoni wakati mke ni kula chakula cha jioni, kufungua droo cutlery na vyombo kushinikiza kuzunguka mpaka mke mayowe, "what are you looking for!"
  10. Baada ya kupokea kadi mpya ya biashara, siri kuwaweka wote kuzunguka nyumba: Chini ya kitanda, katika kesi ya mto, ndani ya kahawa vikombe, katika mfuko wake, katika kanzu ya mifuko, gari glove compartments, pantry — anywhere you can think of.
  11. Kuandika blog entries kuhusu mke wako.
  12. Kuamka.
  13. Wakati kutembea mitaa ya New York City, be on the alert for "crusty" objects on the ground. Kuweka katika akili ya mke wako hofu maalum, kufikia chini kama kuchukua moja hadi juu na kuuliza, "hmm, Nashangaa kile kwamba ni?" (Be prepared for wife to body slam you as if she’s a secret service agent protecting the President from a sniper or you’ll find yourself laying on your back on the sidewalk).
  14. Drive twice around a parking lot looking for space. You know you’ve really hit pay dirt when your son in the back seat yells, "Oh no! Yeye kufanya hivyo tena!"
  15. Write "top 10" orodha ya kwamba hawana 10 vitu.

===

Ziada mke utani:

Two male co-workers go out to lunch. One of them tells the other, "I let loose an embarrassing Freudian slip the other night."

"A Freudian slip? What’s that?"

"Well, wakati sisi kumaliza kula, Waitress akaja na aliuliza jinsi sisi walipenda milo yetu. Mimi maana ya kusema, ‘I loved the chicken breast’ but instead I said ‘I loved your breasts’. I was so embarrassed."

"Ah," his co-worker replied. "I had the same thing happen to me this weekend with my wife. We were eating breakfast I meant to ask her to pass the butter, lakini badala yake mimi kupiga kelele saa yake, ‘You ruined my life!'"

</mwisho>

Tags technorati:

Tukio ID 1023: “Madirisha haiwezi kupakia MSSCNTRS extensible DLL kukabiliana”

UPDATE (04/08/08): I seem to have solved this problem. From the command line, I ran "c:\madirisha system32 lodctr / A" kama kwa kuingia kuzungumza juu ya matatizo InstallShield na kwamba inaonekana kuwa kutatuliwa kwa ajili yangu.

Mimi niliona kuwa siku za hivi karibuni, my desktop/server fan never turns off. I know it used to turn off. I took a moment to check it out noticed that the a VMware process was running a consistent 20% utilization on one of the CPU’s. I checked the event log and saw these errors in the application log happening dozens of times per minute:

Madirisha haiwezi kupakia extensible kukabiliana DLL UGatherer, DWORD kwanza katika sehemu ya data ni kosa Windows kanuni.

Madirisha haiwezi kupakia extensible kukabiliana DLL UGTHRSVC, DWORD kwanza katika sehemu ya data ni kosa Windows kanuni.

Madirisha haiwezi kupakia MSSCNTRS extensible DLL kukabiliana, DWORD kwanza katika sehemu ya data ni kosa Windows kanuni.

Kama mimi kuchimba katika maelezo ya mmoja wa ujumbe wale, Mimi kupata hii:

Chanzo: Perflib

Aina: Kosa

Jamii: Hakuna

Tukio ID 1023

I did some research and there was some indication it could be a permission problem in terms of access to the DLLs in question. I played around with that stuff but could not affect things in a positive way so I gave up on that.

VMware alikuwa nagging yangu kuhusu kufanya update kwa muda kabisa, hivyo mimi jotted chini toleo nilikuwa imewekwa (apparently "1.0.1 build 29996") and did the update. This upgraded me to v1.04. Cha kusikitisha, hakuwa na kurekebisha suala.

I can stop the insane number of messages going to my application log if I shut down a service named "VMware Authorization Service". This prevents me from using the VMware software, hivyo … not such a great option.

uendeshaji jeshi mfumo ni Windows XP 64 bit.

Sidhani hii daima kilichotokea, lakini mimi wala kukumbuka yoyote ya tukio fulani kwamba ili kuwa na kuongozwa na ni.

Hii ni kwa nini mimi chuki kompyuta.

</mwisho>

Tags technorati:

Haraka & Rahisi: Rename Uploaded Picha Kutumia SharePoint Object Model Via kupokea Tukio

UPDATE: This works but there are significant limitations which are described in the comments. This may still be useful in some cirumstances.

UPDATE 2: Katika mradi wangu wa sasa, users always upload documents. Kama matokeo, I don’t run into a problem where MS Word is running and thinks that the file was renamed on it. I did run into a problem, "the file was modified by someone else" and solved this via a simple semaphore type flag. Users need to change a meta data field from its default value to something else. The itemupdated() receiver inaonekana kwa thamani halali ya hapo kabla ya kufanya kweli rename na tangu wakati huo, I have not had any problems. Your mileage may vary.

I have a client requirement to change the name of files uploaded to a specific document library to conform with a particular naming convention. The API does not provide a "rename()" njia. Badala yake, sisi kutumia "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 umma override utupu ItemAdded(SPItemEventProperties mali)
        {
            SPFile f = properties.ListItem.File;

            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url + "/xyzzy.doc");
            f.Update();

        }

The only tricky bit is the "properties.ListItem.ParentList.RootFolder.Url". The MoveTo() method requires a URL. That mashed up string points me to the root folder of my current document library. This allows me to avoid any hard coding in my event receiver.

Hili ni toleo la muhimu zaidi kwamba haina kitu kimoja, but assigns the name of the file to "Title":

 umma override utupu ItemAdded(SPItemEventProperties mali)
        {
            DisableEventFiring();

            // Hawawajui ilani ya bidhaa hii kwa jina la faili yenyewe.
 // NOTE: Zoezi hili lazima kuchukua nafasi kabla ya sisi kurekebisha faili yenyewe.
 // Wito update() juu ya SPFile inaonekana kubatilisha mali katika
 // baadhi ya hisia.  Updates to "Title" alishindwa mpaka mabadiliko ambayo (na update() wito)
 // walikuwa wakiongozwa mbele ya mabadiliko ya jina la faili.
            properties.ListItem["Title"] = Properties.ListItem.File.Name;

            properties.ListItem.Update();

            SPFile f = properties.ListItem.File;

            // Kupata ugani ya faili.  Tunahitaji kwamba baadaye.
 string spfileExt = mpya Picha Info(f.Name).Ugani;

            // Rename faili ID bidhaa orodha na kutumia faili ugani kuweka
 // kwamba sehemu yake intact.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // Kufanya hoja.
            f.Update();

            EnableEventFiring();
        }

Forum Majadiliano: Utekelezaji Best Practices Mwafaka katika Non-Trivial Mazingira MOSS

wenzake, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" kwa 35,000 user mazingira.

mjadala ni hapa: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6

Pop juu juu na kuchangia!

</mwisho>

Desturi Action URL Je, si Kuonyesha kwa Makala Mpya

I’m still in the habit of crafting my feature XML files by hand since it’s all quite new to me. I don’t want to rely on a front-end tool that does stuff I don’t understand (alisema kama yeye aliandika kuingia blog kutumia chombo hawezi kuelewa).

Leo, I was trying to add a custom action to the site settings but it just wouldn’t show up. I could install the feature and see it in the site features, lakini wakati mimi ni ulioamilishwa (bila makosa) yake tu bila kuonyesha juu drop-down menu.

I finally realized that I misspelled "SharePoint" katika sifa Eneo la <CustomAction> nodi. This is the bad elements.xml file:

<?xml toleo="1.0" encoding="UTF-8" ?>
<Vipengele xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolbar"
 GroupId="SiteActions"
 Mahali="Microsoft.Sharepoint.StandardMenu"
 Mlolongo="100"
 Title="Hujambo!"
 Description="Desturi orodha action aliongeza kupitia kipengele."
 ImageUrl="_layouts / images / menuprofile.gif">

    <UrlAction Url="http://www.xyzzy.com"/>

  </CustomAction>
</Vipengele>

Nzuri:

<?xml toleo="1.0" encoding="UTF-8" ?>
<Vipengele xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolBar"
 GroupId="SiteActions"
 Mahali="Microsoft.SharePoint.StandardMenu"
 Mlolongo="100"
 Title="Hujambo!"
 Description="Desturi orodha action aliongeza kupitia kipengele."
    >
    <UrlAction Url="http://www.xyzzy.com"/>
  </CustomAction>
</Vipengele>

Hiyo ilinichukua saa mbili nzuri kujua 🙂

Mimi kuchukua faraja katika ukweli kwamba baadhi ya siku katika siku zijazo, Mimi itakuwa na uwezo wa kusema na hatia, "back in the day, Mimi nilikuwa na kutembea umbali wa kilomita tatu juu ya kilima katika theluji (hana viatu!) in order to deploy a custom feature to MOSS. You kids, huwezi kujua jinsi rahisi una hiyo! Get off my lawn!"

Hawezi kusubiri.

</mwisho>

Tags technorati: ,