Mjesečni arhiv: Siječanj 2008

Rješenje za BDC ADF-Import neuspjeh: “Sljedeća greška:”

Bio sam jednom lukavost BDC ADF datoteke rukom (tako da mogu izgraditi my "Silazim moj travnjak!" Ja) i pogodio ovu lijepu pogreške:

slika

"Application definition import failed. Sljedeća greška:"

Kao što možete vidjeti, postoji greška, ali … to ne ide mi reći što je to.

U mom slučaju, 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, , ali nije uspio ažurirati <LobSystem>’s Type attribute. I switched it to "WebService" i ja rado preselio na novije i uzbudljivije uvoznih pogrešaka, koje su obrađene u dogledno vrijeme.

Ovdje je u krivu LobSystem:

<LobSystem
xmlns:Rebel =http://www.w3.org/2001/XMLSchema-instance
Rebel: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">

To je ispravan:

<LobSystem
xmlns:Rebel =http://www.w3.org/2001/XMLSchema-instance
Rebel: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">

</kraj>

Technorati Tags:

BDC Čini Održive zamjena za lookups

UPDATE: Ovaj MSDN objavljivanja ima neke zanimljive primjedbe iz JXJ na temelju njegove, uglavnom negativno, Iskustva ide dolje ovaj put: 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" polje.

We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, od kojih su tri:

  1. Only one column from the lookup lookup library can be linked.
  2. Performanse: The source library could contain hundreds of entries. That’s too many entries in the lookup.
  3. Traži: There is no integrated search. I don’t mean in the MOSS sense of search, ali ne postoji način da se traži / filtrirati po više stupaca iz knjižnice izvorni dokument i pronađite link koji želite.

Potpomognuti 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.

Ja sam imao neke preliminarne uspjeh s ovom pristupu, a planiramo pisati više o tome.

Ako ste radili ovaj kut prije i imate bilo kakve komentare, molimo udjela!

</kraj>

Technorati Tags:

Rješenje za BDC Pogreška pri uvozu: “Ne mogu učitati Vrsta opisao TypeDescriptor je TypeName …”

Radio sam s BDC danas, coding ADF files by hand and generating myself some errors. One such error:

Primjena definicija uvoz nije uspio. Sljedeća greška: Ne mogu učitati Vrsta opisao TypeDescriptor je TypeName. Naziv parametra: typeName Greška je naišao na ili neposredno prije Line: '35’ i pozicija: ’20’.

MOSS prikazuju ovu pogrešku kada sam pokušao uvesti datoteku ADF XML.

Ja istraživao internets i utvrdili da sam bio s pozivom na ime LOB instance (od <LobSystemInstance>) u mom <TypeDescriptor> čvora kad sam trebala upućuje uspijeva samo ime (od <LobSystem>).

Pogrešno:

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

Ispravite:

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

Nadam se da ovo netko štedi sat ili dva vremena.

</kraj>

Pretplatite se na moj blog!

Technorati Tags:

Rješenje problema: “FileNotFoundException” With My igrani prijemnik.

I was working on a feature last week that would add some event receivers to a specific list instance. (I blogged nešto o tom popisu primatelja ovdje).

Korištenje naredbenog retka, Sam mogao instalirati tu značajku bez pogreške (ali vidi dolje za skrivene greške). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" pogreška. This blog entry describes how I solved it.

To je pogreška koja MOSS mi je pokazao u web pregledniku:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" Neuspjela: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ ili jedan od njegovih ovisnosti. Sustav ne može pronaći navedenu datoteku.
Naziv datoteke: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName filename, Gudački codebase, Dokazi assemblySecurity, Skupština locationHint, StackCrawlMark& stog tlo, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Dokazi assemblySecurity, StackCrawlMark& stog tlo, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(Gudački assemblyString, Dokazi assemblySecurity, StackCrawlMark& stog tlo, Boolean forIntrospection)
at System.Reflection.Assembly.Load(Gudački assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Skupština obvezujuća bilježenje isključeno.
Da biste omogućili sastavljanje prijave kvara vezanja, postavite vrijednost registra [HKLM Software Microsoft Fusion!EnableLog] (DWORD) na 1.
Primijetiti: Tu je neke performanse kazna povezana s montažnim prijave vezanje neuspjeh.
Da biste isključili tu značajku, izvadite vrijednost registra [HKLM Software Microsoft Fusion!EnableLog].

Rješavanje problema s Windows SharePoint Services.

Znam kako namjerno izazvati tu pogrešku: don’t install the assembly in the GAC. Ali, 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% ugodno, jer sam uvijek mislio da je postojala gacutil s razlogom … so I tried that. It made no difference.

Tražila sam internets i pronašao ovaj post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

Plakat se dogodilo da se koristi isti korijen malo koda (iznutra WSS knjige iz ovog popisa) so that was a hopeful sign. Međutim, Prijedlog o ukrašavanju skupštine s [montaža: ] 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.

Sljedeći, I went to the trouble of enabling the "assembly bind failure log" (nakon korisne i točne upute koje) 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. Ali … neće ga potražiti u 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" za lice b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Vrijednost ne može biti nula.
Naziv parametra: tip
at System.Activator.CreateInstance(Tip putovanja, Boolean nisu za javnost)
at System.Activator.CreateInstance(Tip putovanja)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

Rješavanje problema s Windows SharePoint Services.

Vrijeme je za jedan posljednji izlet na internets!

Ovaj put saznam, predvidivo dovoljno, that MOSS issues this error because the assembly is not in GAC.

Želim da se nešto pozitivno iz ovog i pokušajte osjetiti malo ponosan što sam stvorio Bjegunac od MSIL skupštinama, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" ispod glasa.

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" ali ne mogu naći jedan).

Ja instalirajte značajku i aktivirali i … to radi! Tako, nakon svega što, I had to basically ‘reboot’ my project. To je još jedan razlog zašto mrzim računala.

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. Iz nekog razloga, I did not use the -force option when I installed the new project. Ovaj puta, Ja sam zapravo, truly forget to copy this new project’s assembly into the GAC. Kao rezultat toga, I received that "FielNotFoundException" pogreška. Ovaj puta, Dobio sam to od stsadm, not when I tried to activate the feature via the web browser. Tako, -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.

</kraj>

Technorati Tags: ,

Nedjelja Zabavno: Vrh 10 Načini smetati tvoja žena

  1. Kupi brokulu kad bi znao da je već više nego dovoljno u hladnjaku.
  2. Go for a run. Cool off. Take off clean pillow case and replace with T-shirt. Cover with clean pillow case.
  3. Pri vožnji, pitati ako smo trebali ići na krivi put prema dolje jednosmjernoj ulici.
  4. Za 15 godina, svake nedjelje da žena sugerira ide u muzej, express čudi da muzeji su otvoreni u nedjelju.
  5. Za 15 godina, occasionally suggest going to the local book store on Sunday. Express surprise that they are not open on Sunday’s (puno hvala Blue Zakoni!).
  6. Koristiti 20 Točke koje treba uraditi 3 point turn.
  7. Na hladnom i ranu jesen poslijepodne, 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, glup" i dobiva se da ga isključite, grab the warm spot she had on the couch. Bonus points if she does not realize you did it until much later.
  8. Otvorite konzervu tune ukusna bijele manje tune i jesti ravno iz limenke, u krevetu, noću.
  9. Idi u kuhinju dok je žena jede večeru, otvoriti ladicu pribor za jelo i posuđe gurati okolo dok supruga vrišti, "what are you looking for!"
  10. Po primitku novih poslovnih kartica, potajno staviti ih po cijeloj kući: Ispod kreveta, u jastučnice, unutar šalica za kavu, u torbici, u džepove kaputa, auto rukavica odjeljaka, ostava — anywhere you can think of.
  11. Napišite blog unose podatke o svom suprugu.
  12. Probuditi se.
  13. Prilikom šetnje ulicama New Yorka, be on the alert for "crusty" objects on the ground. Imajući u vidu svoje supruge posebne strahove, do dolje, kao da bi jedan pokupiti i pitati, "hmm, Pitam se što je to?" (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 opet!"
  15. Write "top 10" lists that don’t have 10 predmeti.

===

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

</kraj>

Technorati Tags:

Event ID 1023: “Windows ne može učitati brojač extensible MSSCNTRS DLL”

UPDATE (04/08/08): I seem to have solved this problem. From the command line, I ran "c:\windows system32 lodctr / R" po upis InstallShield govori o problemima i da se čini da su to riješiti za mene.

Primjetio sam da u zadnje vrijeme, 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 ne može učitati Extensible Counter UGatherer DLL, Prvi DWORD u odjeljku podataka je kod Windows pogreške.

Windows ne može učitati Extensible Counter UGTHRSVC DLL, Prvi DWORD u odjeljku podataka je kod Windows pogreške.

Windows ne može učitati brojač extensible MSSCNTRS DLL, Prvi DWORD u odjeljku podataka je kod Windows pogreške.

Ako sam izbušiti u detalje jednom od tih poruka, JA dobiti to:

Izvor: Perflib

Tip: Pogreška

Kategorija: Nijedan

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 su me prigovaralo o obavljanju update za neko vrijeme, pa sam upisao verziju sam instaliran (apparently "1.0.1 build 29996") and did the update. This upgraded me to v1.04. Nažalost, to nije riješila problem.

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

Domaćin operativni sustav Windows XP 64 bit.

Ja ne mislim da je ovo oduvijek bilo, , ali ne sjećam se da je bilo koji određeni događaj mogao dovesti do toga.

To je razlog zašto mrzim računala.

</kraj>

Technorati Tags:

Brz & Lako: Preimenovanje učitanu datoteku pomoću SharePoint Object Model putem Event prijemnik

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

UPDATE 2: U mom trenutnom projektu, users always upload documents. Kao rezultat toga, 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() prijemnik traži valjane vrijednosti tamo prije nego što zapravo obavljanje preimenovati i od tada, 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()" način. Umjesto toga, koristimo "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 javni nadjačati poništiti ItemAdded(SPItemEventProperties Svojstva)
        {
            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.

To je više koristan verzija koja čini istu stvar, but assigns the name of the file to "Title":

 javni nadjačati poništiti ItemAdded(SPItemEventProperties Svojstva)
        {
            DisableEventFiring();

            // Dodjela naslov ove točke na naziv datoteke sama.
 // NAPOMENA: Ovaj zadatak se mora dogoditi prije izmijeniti datoteku.
 // Pozivanje ažuriranje() na SPFile čini se izgubiti u svojstvima
 // neki osjećaj.  Updates to "Title" nije do tog promjene (i ažuriranje() pozvati)
 // su se preselili ispred promjenu naziva datoteke.
            properties.ListItem["Title"] = Properties.ListItem.File.Name;

            properties.ListItem.Update();

            SPFile f = properties.ListItem.File;

            // Uzmite produljenje datoteke.  Trebamo kasnije.
 niz spfileExt = novi FileInfo(f.Name).Produžetak;

            // Promijenite naziv datoteke u popisu stavke ID i koristiti ekstenziju zadržati
 // da je dio njega netaknuti.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // Obvezati na potez.
            f.Update();

            EnableEventFiring();
        }

Rasprava forum: Provođenje Best Practices Usklađenost u Non-Trivial Moss okoliša

Kolega, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" za 35,000 upute za okoliš.

Rasprava je ovdje: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6

Pop na više i doprinose!

</kraj>

Custom URL akcija neće prikazati u novom značajkom

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 (kazao je kako je napisao blog zapis koristeći alat on ne razumije).

Danas, 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, ali kad sam ga aktivirati (bez greške) to jednostavno ne bi se pojaviti na padajućem izborniku.

I finally realized that I misspelled "SharePoint" Mjesto u atribut <CustomAction> čvor. This is the bad elements.xml file:

<?xml verzija="1.0" kodiranje="UTF-8" ?>
<Elementi xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolbar"
 GroupId="SiteActions"
 Lokacija="Microsoft.Sharepoint.StandardMenu"
 Slijed="100"
 Naslov="Bok!"
 Opis="Custom izborniku Akcija dodao putem značajke."
 ImageUrl="_izgledi / slike / menuprofile.gif">

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

  </CustomAction>
</Elementi>

Dobro:

<?xml verzija="1.0" kodiranje="UTF-8" ?>
<Elementi xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolBar"
 GroupId="SiteActions"
 Lokacija="Microsoft.SharePoint.StandardMenu"
 Slijed="100"
 Naslov="Bok!"
 Opis="Custom izborniku Akcija dodao putem značajke."
    >
    <UrlAction Url="http://www.xyzzy.com"/>
  </CustomAction>
</Elementi>

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

Ja utjehu u činjenici da su neki dan u budućnosti, Ja ću biti u mogućnosti reći s uvjerenjem, "back in the day, Morao sam hodati tri milje do brda u snijegu (bos!) in order to deploy a custom feature to MOSS. You kids, ne znam kako se lako ga imate! Get off my lawn!"

Jedva čekam.

</kraj>

Technorati Tags: ,