Monthly Archives: Janúar 2008

Þetta er hverju mér líkar ekki að nota tæki degi núll

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

Ef tæki er að gera efni sem þú skilur ekki og þá er það ekki í takt n af óþekktum fjölda af skrefum, þú ert dauður í vatninu…

</enda>

Technorati Tags:

Lausn til BDC ADF Innflutningur Bilun: “Eftirfarandi villa kom upp:”

Ég var einu sinni föndur BDC ADF skrá af hendi (þannig að ég get byggt upp mína "fá burt grasið mitt!" Ég) og högg þetta yndislega villa:

mynd

"Application definition import failed. Eftirfarandi villa kom upp:"

Eins og þú sérð, það er villa, en … það er ekki að fara að segja mér hvað það er.

Í mínu tilfelli, 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, en ekki tekist að uppfæra <LobSystem>’s Type attribute. I switched it to "WebService" og ég flutti hamingjusamlega á að nýrri og meira spennandi innflutnings villur, sem voru meðhöndlaðir í fyllingu tímans.

Hér er rangt 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">

Þetta er rétt:

<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">

</enda>

Technorati Tags:

BDC Virðast raunhæfur skipti fyrir leit

UPDATE: Þetta MSDN staða hefur nokkrar áhugaverðar athugasemdir frá JXJ byggt á hans, aðallega neikvæð, reynslu að fara niður þessa leið: 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" sviði.

We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, three of which are:

  1. Only one column from the lookup lookup library can be linked.
  2. Performance: The source library could contain hundreds of entries. That’s too many entries in the lookup.
  3. Leita: There is no integrated search. I don’t mean in the MOSS sense of search, but there’s no way to search / filter on multiple columns from the source document library and locate the link you want.

Backed by 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.

I’ve had some preliminary success with this approach and plan to write more about it.

If you’ve worked this angle before and have any comments, please share!

</enda>

Technorati Tags:

Lausn til BDC Import Villa: “Gat ekki hlaðið lýst með TypeName TypeDescriptor er …”

Ég hef verið að vinna með BDC dag, coding ADF files by hand and generating myself some errors. One such error:

Umsókn skýring innflutningur mistókst. Eftirfarandi villa kom upp: Gat ekki hlaðið lýst með TypeName TypeDescriptor er. Viðfang nafn: typeName Villa kom upp við eða rétt fyrir Line: '35’ og afstaða: ’20’.

MOSS displayed this error when I tried to import the ADF XML file.

I researched the Internets and found that I was referencing the LOB instance name (from the <LobSystemInstance>) in my <TypeDescriptor> node when I should have referenced the LOB name itself (frá <LobSystem>).

Wrong:

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

Correct:

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

Hope this one saves someone an hour or two of time.

</enda>

Gerast áskrifandi að bloggið mitt!

Technorati Tags:

Lausn á vandamáli: “FileNotFoundException” Með Receiver eiginleiki minn.

I was working on a feature last week that would add some event receivers to a specific list instance. (Ég bloggaði aðeins um að lista móttakara hér).

Using the stjórn lína, Ég gæti sett aðgerðina án villa (en sjá hér fyrir falinn villa). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" villa. This blog entry describes how I solved it.

Þetta er villa sem MOSS sýndi mér í vafranum:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" mistókst: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ eða eitt af ósjálfstæði. The kerfi geta ekki finna the skrá sem tilgreind.
Skrá nafn: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName filename, String codebase, Sönnun assemblySecurity, Samkoma locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Sönnun assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Sönnun assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Samkoma bindandi skógarhögg er slökkt.
Til að gera samkoma binda bilun skógarhögg, stilla skrásetning gildi [HKLM Software Microsoft Fusion!EnableLog] (DWORD) að 1.
Athugaðu: Það er einhver árangur refsing tengist samkoma binda bilun skógarhögg.
Til að kveikja þennan eiginleika af, fjarlægja skrásetning gildi [HKLM Software Microsoft Fusion!EnableLog].

Leysa mál með Windows SharePoint Services.

Ég veit hvernig á að vísvitandi valda þessi villa: don’t install the assembly in the GAC. En, 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% þægilegt að gera það vegna þess að ég hélt alltaf að gacutil verið fyrir ástæðu … so I tried that. It made no difference.

Ég leitaði internets og fann þessa færslu: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

Plakat varð að nota sömu rót hluti af kóða (innan frá WSS bók frá þessum lista) so that was a hopeful sign. Hins, tillögu að skreyta söfnuðinum með að [samkoma: ] 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.

Næsta, I went to the trouble of enabling the "assembly bind failure log" (fylgja gagnlegar og nákvæmar leiðbeiningar sem kveðið) 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. En … það mun ekki leita að því í 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" fyrir lögun b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Gildi getur ekki verið tómt.
Viðfang nafn: tegund
at System.Activator.CreateInstance(Tegund gerð, Boolean eru almenn)
at System.Activator.CreateInstance(Tegund gerð)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

Leysa mál með Windows SharePoint Services.

Tími fyrir eitt síðasta ferð til Internets!

Þessi skipti sem ég fundið út, áreiðanlega nóg, that MOSS issues this error because the assembly is not in GAC.

Ég vil fá eitthvað jákvætt út úr þessu og reyna að finna smá stolt af því að ég hef búið á Landflótta af MSIL þingum, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" undir anda minn.

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" en getur ekki fundið einn).

Ég setja lögun og virkja það og … það virkar! Svo, eftir allt að, I had to basically ‘reboot’ my project. Þetta er önnur ástæðan af hverju ég hata tölvur.

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. Í þetta sinn, Ég gerði í raun, truly forget to copy this new project’s assembly into the GAC. Þar af leiðandi, I received that "FielNotFoundException" villa. Í þetta sinn, Ég fékk það frá stsadm, not when I tried to activate the feature via the web browser. Svo, -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.

</enda>

Technorati Tags: ,

Sunnudagur Fyndið: Top 10 Leiðir til að ónáða konuna þína

  1. Kaupa spergilkál þegar þú veist að það er þegar meira en nóg í ísskápnum.
  2. Go for a run. Cool off. Take off clean pillow case and replace with T-shirt. Cover with clean pillow case.
  3. Við akstur, spyrja hvort við ættum að fara á rangan hátt niður einn-vegur götu.
  4. Fyrir 15 ár, every Sunday that you wife suggests going to a museum, express surprise that museums are open on Sunday’s.
  5. Fyrir 15 ár, occasionally suggest going to the local book store on Sunday. Express surprise that they are not open on Sunday’s (thanks a lot Blue Laws!).
  6. Nota 20 points to do a 3 point turn.
  7. On a cool early Fall afternoon, 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" and gets up to turn it off, grab the warm spot she had on the couch. Bonus points if she does not realize you did it until much later.
  8. Open up a can of delicious white albacore tuna and eat it straight from the can, in bed, at night.
  9. Go into the kitchen while wife is eating dinner, open up the cutlery drawer and push utensils around until wife screams, "what are you looking for!"
  10. On receipt of new business cards, secretly place them all around the house: Under the bed, in pillow cases, inside coffee cups, in her purse, in coat pockets, car glove compartments, the pantry — anywhere you can think of.
  11. Write blog entries about your wife.
  12. Wake up.
  13. When walking the streets of New York City, be on the alert for "crusty" objects on the ground. Keeping in mind your wife’s special fears, reach down as if to pick one up up and ask, "hmm, I wonder what that is?" (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! He’s doing it aftur!"
  15. Write "top 10" lists that don’t have 10 atriði.

===

Bonus wife joke:

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, when we finished eating, the waitress came by and asked how we liked our meals. I meant say, ‘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, but instead I screamed at her, ‘You ruined my life!""

</enda>

Technorati Tags:

Event ID 1023: “Windows getur ekki hlaða teygjanlegur gegn MSSCNTRS DLL”

UPDATE (04/08/08): I seem to have solved this problem. From the command line, I ran "c:\Windows system32 lodctr / R" eins og á færslu tala um InstallShield vandamál og það virðist hafa leyst það fyrir mig.

Ég hef tekið eftir því að undanfarið, 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 getur ekki hlaða extensible counter DLL UGatherer, fyrsta DWORD í gögnum kafla er Windows villa.

Windows getur ekki hlaða extensible counter DLL UGTHRSVC, fyrsta DWORD í gögnum kafla er Windows villa.

Windows getur ekki hlaða teygjanlegur gegn MSSCNTRS DLL, fyrsta DWORD í gögnum kafla er Windows villa.

Ef ég bora inn upplýsingar um einn af þeim skilaboðum, Ég fæ þetta:

Heimild: Perflib

Tegund: Villa

Flokkur: Ekkert

Event 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 hafði verið nöldrari mig um að framkvæma uppfærslu fyrir alveg sumir tími, svo ég jotted niður útgáfu ég hafði sett (apparently "1.0.1 build 29996") and did the update. This upgraded me to v1.04. Því miður, það var ekki festa the tölublað.

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

The gestgjafi stýrikerfi er Windows XP 64 hluti.

Ég held ekki að þetta hefur alltaf gerst, en ég man ekki neina sérstaka atburði sem gæti hafa leitt til þess.

Þetta er ástæða þess að ég hata tölvur.

</enda>

Technorati Tags:

Quick & Easy: Endurnefna skrá innsend nota SharePoint Object Model gegnum Event Receiver

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

UPDATE 2: Í núverandi verkefni mitt, users always upload documents. Þar af leiðandi, 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() móttökutæki útlit fyrir gilt gildi þar áður en þeir framkvæma endurnefna og síðan þá, 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()" aðferð. Staðinn, við notum "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 almennings forgang ógilt ItemAdded(SPItemEventProperties eignir)
        {
            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.

Þetta er meira gagni útgáfa þessi hjartarskinn the sami hlutur, but assigns the name of the file to "Title":

 almennings forgang ógilt ItemAdded(SPItemEventProperties eignir)
        {
            DisableEventFiring();

            // Úthluta titilinn á þessu atriði á nafni skrá sig.
 // ATHUGIÐ: Þessi verkefni þarf að fara fram áður en við breytt skránni sjálfri.
 // Starf uppfærslu() á SPFile virðist ógilda eiginleika í
 // sumir skilningarvit.  Updates to "Title" ekki fyrr en þessi breyting (og uppfæra() hringja)
 // voru flutt í framan the breyting til the skrá nafn.
            properties.ListItem["Title"] = Properties.ListItem.File.Name;

            properties.ListItem.Update();

            SPFile f = properties.ListItem.File;

            // Fá framlengingu á skrá.  Við þurfum að síðar.
 band spfileExt =  FileInfo(f.Name).Framlenging;

            // Endurnefna skrána til ID á lista yfir atriði og nota skrá eftirnafn til að halda
 // að hluti af því ósnortinn.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // Skuldbinda færa.
            f.Update();

            EnableEventFiring();
        }

Forum Umræður: Framfylgja Best Practices Fylgni á ekki léttvæg mosa Umhverfi

A náungi, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" fyrir 35,000 notandi umhverfi.

Umfjöllunin er hér: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6

Skjóta á yfir og stuðla!

</enda>

Custom Action URL mun ekki birta fyrir nýr lögun

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 (sagði hann eins og hann skrifaði bloggfærslu nota tól Hann skilur ekki).

Í dag, 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, en þegar ég virkja það (án villa) það einfaldlega myndi ekki mæta á the falla-dúnn matseðill.

I finally realized that I misspelled "SharePoint" í stað eigindi <CustomAction> hnút. This is the bad elements.xml file:

<?XML útgáfa="1.0" Kóðun="UTF-8" ?>
<Elements xmlns="HTTP://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolbar"
 GroupId="SiteActions"
 Staðsetning="Microsoft.Sharepoint.StandardMenu"
 Sequence="100"
 Titill="Halló!"
 Lýsing="Custom matseðill aðgerð bætt við með lögun."
 ImageUrl="_layouts / images / menuprofile.gif">

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

  </CustomAction>
</Elements>

Good:

<?XML útgáfa="1.0" Kóðun="UTF-8" ?>
<Elements xmlns="HTTP://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolBar"
 GroupId="SiteActions"
 Staðsetning="Microsoft.SharePoint.StandardMenu"
 Sequence="100"
 Titill="Halló!"
 Lýsing="Custom matseðill aðgerð bætt við með lögun."
    >
    <UrlAction Url="HTTP://www.xyzzy.com"/>
  </CustomAction>
</Elements>

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

Ég tek huggun í þeirri staðreynd að einn daginn í framtíðinni, Ég skal vera fær um að segja með sannfæringu, "back in the day, Ég þurfti að ganga þrjá kílómetra upp hæð í snjónum (berfættur!) in order to deploy a custom feature to MOSS. You kids, þú veist ekki hversu auðvelt þú hefur það! Get off my lawn!"

Get ekki beðið.

</enda>

Technorati Tags: ,