Buwanang Archive: Enero 2008

Ito ay Bakit hindi ko Nagustuhan Paggamit ng Tool Araw ng Zero

http://groups.google.com/group/microsoft.public.sharepoint.portalserver.development/browse_thread/thread/41e8cbe4f15e8b4c/76506ea401403e35?#76506ea401403e35

Kung ang tool ay paggawa bagay na hindi mo maintindihan at pagkatapos ito nabigo sa hakbang n ng isang hindi kilalang bilang ng mga hakbang, ikaw ay patay sa tubig…

</dulo>

Technorati Tags:

Solusyon sa BDC Pagkabigo ADF-import: “Ang mga sumusunod na error na naganap:”

Ako ay isang beses muli crafting BDC ADF mga file sa pamamagitan ng kamay (so that I can build up my "get off my lawn!" cred) at pindutin ang kaibig-ibig na error:

imahen

"Application definition import failed. Ang mga sumusunod na error na naganap:"

Tulad ng iyong nakikita, mayroong isang error, pero … ito ay hindi pagpunta sa sabihin sa akin kung ano ito ay.

Sa aking kaso, 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">

</dulo>

Technorati Tags:

BDC tila isang praktikal Kapalit Para lookup

I-UPDATE: Ito MSDN pag-post ay may ilang mga kagiliw-giliw na mga obserbasyon mula JXJ batay sa kanyang, higit sa lahat ng mga negatibong, mga karanasan lapag ng path na ito: 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" patlang.

We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, tatlong ng na kung saan ay:

  1. Only one column from the lookup lookup library can be linked.
  2. Pagganap: The source library could contain hundreds of entries. That’s too many entries in the lookup.
  3. Hanapin: There is no integrated search. I don’t mean in the MOSS sense of search, ngunit walang paraan upang maghanap / i-filter sa maramihang mga hanay mula sa library ng pinagmulan ng dokumento at hanapin ang link na gusto mo.

Nai-back sa pamamagitan ng 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.

Nagkaroon na ako ng ilang paunang tagumpay gamit ang diskarteng ito at plano upang isulat ang higit pa tungkol dito.

Kung nag-nagtrabaho anggulo ito bago at mayroon ng anumang mga komento, mangyaring ibahagi!

</dulo>

Technorati Tags:

Solusyon sa BDC Import Error: “Hindi ma-load Uri ng inilarawan sa pamamagitan ng TypeDescriptor ni TypeName …”

Ako nagtatrabaho sa BDC ngayon, coding ADF files by hand and generating myself some errors. One such error:

Application kahulugan Nabigo ang pag-import. Ang mga sumusunod na error na naganap: Hindi ma-load Uri ng inilarawan sa pamamagitan ng TypeDescriptor ni TypeName. Pangalan ng parameter: typeName Error naranasang sa o bago lang Linya: '35’ at Posisyon: ’20’.

Moss ipinapakita ang error na ito kapag sinubukan kong i-import ang file na XML ADF.

Sinaliksik ko ang Internets at nalaman na ako ay tumutukoy sa mga pangalan palobo halimbawa (mula sa <LobSystemInstance>) sa aking <TypeDescriptor> node kailan ko dapat na-reference ang palobo pangalan mismo (mula sa <LobSystem>).

Mali:

<TypeDescriptor TypeName="Conchango.KeyValue, Palobo Halimbawa Pangalan" Name="KeyValue">

Itama:

<TypeDescriptor TypeName="Conchango.KeyValue, Palobo Pangalan" Name="KeyValue">

Sana isa ito sine-save ng isang tao ng isang oras o dalawang oras ng.

</dulo>

Mag-subscribe sa aking blog!

Technorati Tags:

Solusyon sa Problema: “FileNotFoundException” Sa My Tampok Tatanggap.

I was working on a feature last week that would add some event receivers to a specific list instance. (I-blog nang kaunti tungkol sa receiver na listahan dito).

Gamit ang command line, Maaari ko bang i-install ang tampok na walang error (ngunit tingnan sa ibaba para sa mga nakatagong error). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" mali. This blog entry describes how I solved it.

Ito ang error na Moss ay nagpakita sa akin sa web browser:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" Nabigo ang pag-: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ o isa sa mga dependency. Ang sistema ay hindi maaaring mahanap ang tinukoy na file.
Ang pangalan ng file: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName filename, String codebase, Katibayan assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Katibayan assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Katibayan assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Assembly nagbubuklod na pag-log ay naka-OFF.
Upang paganahin ang assembly magbigkis pagkabigo na pag-log, itakda ang mga registry value [HKLM Software Microsoft Fusion!EnableLog] (DWORD) upang 1.
Nota: Mayroong ilang mga pagganap ng multa na nauugnay sa assembly na pag-log magbigkis pagkabigo.
Upang i-on ang tampok na ito off, alisin ang mga registry value [HKLM Software Microsoft Fusion!EnableLog].

I-troubleshoot ang mga isyu sa Windows SharePoint Serbisyo.

Alam ko kung paano i-sadya maging sanhi ang error na iyon: don’t install the assembly in the GAC. Pero, 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% komportable paggawa na dahil ako palaging naisip gacutil na umiral para sa isang dahilan … so I tried that. It made no difference.

Hinanap ko ang Internets at nahanap ang post na ito: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

Ang poster na nangyari sa ma-gamit ang parehong bit root ng code (mula sa Inside WSS aklat mula sa listahang ito) so that was a hopeful sign. Gayunman, ang mungkahi ng dekorasyon ang assembly na may isang [pagtitipon: ] 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.

Susunod, I went to the trouble of enabling the "assembly bind failure log" (ng pagsunod sa mga kapaki-pakinabang at tumpak na mga tagubilin na ibinigay) 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. Pero … hindi ito maghanap ng mga ito sa 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" para sa tampok b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Halaga ay hindi maaaring maging null.
Pangalan ng parameter: uri
at System.Activator.CreateInstance(Uri ng uri, Boolean nonPublic)
at System.Activator.CreateInstance(Uri ng uri)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

I-troubleshoot ang mga isyu sa Windows SharePoint Serbisyo.

Oras para sa isang huling biyahe sa Internets!

Oras na ito mahanap ko out, predictably sapat, that MOSS issues this error because the assembly is not in GAC.

Gusto kong makakuha ng isang bagay na positibo out sa ito at subukan sa pakiramdam ng kaunti mapagmataas na aking nilikha ang Takas ng MSIL pagtitipon, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" sa ilalim ng aking hininga.

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" ngunit hindi mahanap ang isa).

I-install ko ang mga tampok at i-activate ito at … ito gumagana! Kaya, pagkatapos ng lahat na, I had to basically ‘reboot’ my project. Ito ay isa pang dahilan kung bakit ako mapoot mga computer.

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. For some reason, I did not use the -force option when I installed the new project. Oras na ito, Ginawa ko talaga, truly forget to copy this new project’s assembly into the GAC. Bilang isang resulta, I received that "FielNotFoundException" mali. Oras na ito, Ang nakuha ko ito mula sa stsadm, not when I tried to activate the feature via the web browser. Kaya, -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.

</dulo>

Technorati Tags: ,

Linggo ng nakakatawang: Tuktok 10 Mga paraan Upang inisin ang iyong Asawa

  1. Bumili ng brokuli kapag alam mong mayroon nang higit sa sapat sa refrigerator.
  2. Go for a run. Cool off. Take off clean pillow case and replace with T-shirt. Cover with clean pillow case.
  3. Kapag sa pagmamaneho, magtanong kung dapat naming pumunta sa maling paraan pababa sa isang one-way na kalye.
  4. Para 15 taon, tuwing Linggo na iyong asawa ay nagmumungkahi ng pagpunta sa isang museo, express sorpresa na museo ay bukas sa Linggo ni.
  5. Para 15 taon, occasionally suggest going to the local book store on Sunday. Express surprise that they are not open on Sunday’s (Salamat ng maraming Blue Batas!).
  6. Gamitin 20 mga punto upang gawin ang isang 3 point turn.
  7. Sa isang cool na maagang Taglagas hapon, 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, gago" at nakakakuha ng hanggang sa i-off ito, grab the warm spot she had on the couch. Bonus points if she does not realize you did it until much later.
  8. Buksan up ng lata ng masarap na tuna puti albakora at kumain ito tuwid mula sa makakaya, sa kama, sa gabi.
  9. Pumunta sa kusina habang asawa ay kumakain ng hapunan, buksan ang kubyertos dibuhista at push kagamitan sa paligid hanggang asawa screams, "what are you looking for!"
  10. Sa pagtanggap ng bagong mga business card, lihim ilagay ang mga ito lahat sa paligid ng bahay: Sa ilalim ng kama, sa pillow kaso, sa loob ng tasa ng kape, sa kanyang pitaka, pahiran sa bulsa, kotse glab compartments, ang pantry — anywhere you can think of.
  11. Sumulat ng entry sa blog tungkol sa iyong asawa.
  12. Gumising.
  13. Kapag paglalakad sa mga kalye ng New York City, be on the alert for "crusty" objects on the ground. Pagpapanatiling sa isip ang mga espesyal na takot ang iyong asawa ni, maabot down na bilang kung upang pumili ng isa up up at hilingin, "hmm, Siguro kung ano na ang?" (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! Siya'y paggawa ito muli!"
  15. Write "top 10" mga listahan na walang 10 mga item.

===

Bonus asawa magtawa:

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, kapag tapos na kami sa pagkain, tagapagsilbi ang dumating sa pamamagitan ng at tinanong kung paano namin nagustuhan ang aming pagkain. Ako nilalayong sabihin, ‘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, ngunit sa halip ko screamed sa kanya, ‘You ruined my life!'"

</dulo>

Technorati Tags:

ID ng Kaganapan 1023: “Windows ay hindi maaaring-load ang extensible counter MSSCNTRS DLL”

I-UPDATE (04/08/08): I seem to have solved this problem. From the command line, I ran "c:\windows system32 lodctr / R" bilang sa bawat isang entry ng pakikipag-usap tungkol sa InstallShield problema at na Lumilitaw na malulutas ito para sa akin.

Ako napansin na kanina lamang, 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:

Windows ay hindi maaaring-load ang extensible counter DLL UGatherer, ang unang DWORD sa data seksyon ay ang code Windows error.

Windows ay hindi maaaring-load ang extensible counter DLL UGTHRSVC, ang unang DWORD sa data seksyon ay ang code Windows error.

Windows ay hindi maaaring-load ang extensible counter MSSCNTRS DLL, ang unang DWORD sa data seksyon ay ang code Windows error.

Kung ako mag-drill sa mga detalye ng isa sa mga mensaheng iyon, Nakukuha ko ito:

Pinagmulan: Perflib

Uri: Mali

Kategorya: Wala

ID ng Kaganapan 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 ay mapag-angil sa akin tungkol sa pagsasagawa ng isang update para sa lubos ng ilang oras, kaya ako jotted down na ang bersyon ko ay naka-install (apparently "1.0.1 build 29996") and did the update. This upgraded me to v1.04. Sadly, hindi ito maayos ang isyu.

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, kaya … not such a great option.

Ang host na operating system ay Windows XP 64 kaunti.

Hindi sa tingin ko ito ay palaging nangyari, ngunit hindi ko isipin ang anumang partikular na kaganapan na maaaring humantong sa ito.

Ito ang dahilan kung bakit ako mapoot mga computer.

</dulo>

Technorati Tags:

Mabilis & Madali: Palitan ang pangalan ng In-upload ng File Paggamit ng SharePoint Bagay Model Via isang Tatanggap ng Kaganapan

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

I-UPDATE 2: Sa aking kasalukuyang proyekto, users always upload documents. Bilang isang resulta, 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 maghahanap ng isang wastong halaga doon bago aktwal na gumaganap ang palitan ang pangalan at mula noon, 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()" pamamaraan. Sa halip, ginagamit namin "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 publiko magpawalang-bisa walang bisa ItemAdded(SPItemEventProperties katangian)
        {
            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.

Ito ay isang mas kapaki-pakinabang bersyon na gumagana ang parehong bagay, but assigns the name of the file to "Title":

 publiko magpawalang-bisa walang bisa ItemAdded(SPItemEventProperties katangian)
        {
            DisableEventFiring();

            // Magtalaga ng pamagat ng item na ito upang ang pangalan ng mismong file.
 // Tandaan: Pagtatalaga na ito ay kailangang maganap bago naming baguhin ang mismong file.
 // Pagtawag update() sa SPFile Mukhang magpawalang-bisa ang mga katangian sa
 // ilang mga kahulugan.  Updates to "Title" Nabigo ang hanggang sa pagbabagong iyon (at mag-update() tumawag)
 // ay inilipat sa harap ng mga pagbabago sa mga pangalan ng file.
            properties.ListItem["Title"] = Properties.ListItem.File.Name;

            properties.ListItem.Update();

            SPFile f = properties.ListItem.File;

            // Kumuha ng mga extension ng file.  Kailangan namin na mamaya.
 pisi spfileExt = bago File Info(f.Name).Karugtong;

            // Palitan ng pangalan ang file sa ID sa listahan ng item at gamitin ang file extension upang panatilihing
 // na bahagi nito buo.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // Commit ang paglipat.
            f.Update();

            EnableEventFiring();
        }

Forum ng Talakayan: Pagpapatupad ng Pinakamahusay na Kasanayan Pagsunod sa mga non-walang halaga Moss Kapaligiran

Ang isang kapwa, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" para sa isang 35,000 gumagamit kapaligiran.

Ang mga talakayan ay dito: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6

Pop sa ibabaw at mag-ambag!

</dulo>

Custom Action URL ay hindi Makakaapekto ba ang Ipakita para sa Bagong Tampok

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 (sinabi niya bilang siya ay nagsulat ng isang blog entry gamit ang isang tool na wala siyang maintindihan).

Ngayon, 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, ngunit kapag ako ay nag-activate ito (ganap) ito lamang ay hindi lalabas sa mga drop-down na menu.

I finally realized that I misspelled "SharePoint" sa Lokasyon ng katangian ng <CustomAction> buko. This is the bad elements.xml file:

<?xml salin="1.0" pag-encode="utf-8" ?>
<Mga Sangkap xmlns="http://schemas.microsoft.com / sharepoint /">
  <CustomAction
 ID="SiteActionsToolbar"
 GroupId="SiteActions"
 Kinalalagyan="Microsoft.Sharepoint.StandardMenu"
 Pagkakasunud-sunod="100"
 Pamagat="Hello!"
 Paglalarawan="Custom menu action na idinagdag sa pamamagitan ng isang tampok."
 ImageUrl="_layouts / images / menuprofile.gif">

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

  </CustomAction>
</Mga Sangkap>

Mabuti:

<?xml salin="1.0" pag-encode="utf-8" ?>
<Mga Sangkap xmlns="http://schemas.microsoft.com / sharepoint /">
  <CustomAction
 ID="SiteActionsToolBar"
 GroupId="SiteActions"
 Kinalalagyan="Microsoft.SharePoint.StandardMenu"
 Pagkakasunud-sunod="100"
 Pamagat="Hello!"
 Paglalarawan="Custom menu action na idinagdag sa pamamagitan ng isang tampok."
    >
    <UrlAction Url="http://www.xyzzy.com"/>
  </CustomAction>
</Mga Sangkap>

That one took me a good two hours to figure out 🙂

Ako ng mga mag-aliw sa ang katunayan na ang ilang mga araw sa hinaharap, Kukunin ko magagawang sabihin na may matibay na paniniwala, "back in the day, Mayroon akong maglakad sa tatlong milya up burol sa niyebe (walang sapin ang paa!) in order to deploy a custom feature to MOSS. You kids, Hindi mo alam kung paano madaling mayroon ka nito! Get off my lawn!"

Hindi na makahintay.

</dulo>

Technorati Tags: ,