maandelikse Argiewe: Januarie 2008

Dit is Hoekom het ek hou nie van die gebruik van gereedskap Dag Zero

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

As die instrument dinge doen wat jy nie verstaan ​​nie en dan is dit nie in stap n van 'n onbekende aantal stappe, jy is dood in die water…

</einde>

Technorati Tags:

Oplossing vir BDC ADF Invoer Versuim: “Die volgende fout het voorgekom:”

Ek was weer knutselen BDC ADF lêers met die hand (sodat ek kan opbou my "kry uit my grasperk!" Ek) en hierdie pragtige fout getref:

beeld

"Application definition import failed. Die volgende fout het voorgekom:"

Soos jy kan sien, daar is 'n fout, maar … dit gaan nie om my te vertel wat dit is.

In my geval, 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, maar versuim het om die werk <LobSystem>’s Type attribute. I switched it to "WebService" en ek gelukkig verskuif na nuwer en meer opwindend invoer foute, wat gehanteer is met verloop van tyd.

Hier is die verkeerde 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">

Dit is korrek:

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

</einde>

Technorati Tags:

BDC blyk 'n lewensvatbare vervanging Vir soektogte

UPDATE: Hierdie MSDN gepos het 'n paar interessante waarnemings van JXJ gebaseer op sy, hoofsaaklik negatiewe, ervarings om af te gaan hierdie pad: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2623565&SiteID=1

Ons het 'n besigheid scenario waar ons moet twee dokumente biblioteke te koppel deur 'n gemeenskaplike "dokument ID" veld.

We often use a lookup column to implements links like this. There are several drawbacks to lookup columns, waarvan drie:

  1. Only one column from the lookup lookup library can be linked.
  2. Prestasie: The source library could contain hundreds of entries. That’s too many entries in the lookup.
  3. Soek: There is no integrated search. I don’t mean in the MOSS sense of search, maar daar is geen manier om te soek / filter op verskeie kolomme van die bron dokument biblioteek en soek die skakel wat jy wil hê.

Gerugsteun deur 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.

Ek het 'n paar voorlopige sukses met hierdie benadering en beplan om meer daaroor te skryf.

As jy gewerk het hierdie hoek voor en enige kommentaar, asseblief deel!

</einde>

Technorati Tags:

Oplossing vir BDC Invoer fout: “Kon nie laai Tipe beskryf deur TypeDescriptor se Type Name …”

Ek werk met BDC vandag, coding ADF files by hand and generating myself some errors. One such error:

Aansoek definisie invoer het misluk. Die volgende fout het voorgekom: Kon nie laai Tipe beskryf deur TypeDescriptor se Type Name. Parameter naam: Type Name Daar was fout tydens of net voor Line: '35’ en posisie: ’20’.

MOSS vertoon hierdie fout toe ek probeer het om die ADF XML-lêer in te voer.

Ek het ondersoek ingestel na die Inter en gevind dat ek die lob byvoorbeeld die naam van verwysing (van die <LobSystemInstance>) in my <TypeDescriptor> node as ek moet verwys die lob naam self (uit <LobSystem>).

Verkeerd:

<TypeDescriptor Type Name = "Conchango.KeyValue, Lob aanleg Naam" Naam = "KeyValue-">

Korrigeer:

<TypeDescriptor Type Name = "Conchango.KeyValue, Lob Naam" Naam = "KeyValue-">

Hoop hierdie een slaan iemand 'n uur of twee van die tyd.

</einde>

Skryf in op my blog!

Technorati Tags:

Oplossing vir Probleem: “FileNotFoundException” Met my Feature Ontvanger.

I was working on a feature last week that would add some event receivers to a specific list instance. (Ek blog 'n bietjie oor daardie lys ontvanger hier).

Met die opdrag, Ek kon die funksie met geen fout installeer (maar sien hieronder vir die verborge fout). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" fout. This blog entry describes how I solved it.

Dit is die fout wat MOSS het vir my gewys in die webblaaier:

Feature ‘b2cb42e3-4f0a-4380-aaba-1ef9cd526f20’ could not be installed because the loading of event receiver assembly "xyzzyFeatureReceiver_0" misluk: System.IO.FileNotFoundException: Could not load file or assembly ‘xyzzyFeatureReceiver_0’ of een van sy afhanklikhede. Die stelsel kan nie vind die gekose lêer.
File name: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName lêernaam, String kodebasis, Getuienis assemblySecurity, Vergadering locationHint, StackCrawlMark& stackMark, Boole throwOnFileNotFound, Boole forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Getuienis assemblySecurity, StackCrawlMark& stackMark, Boole forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Getuienis assemblySecurity, StackCrawlMark& stackMark, Boole forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Vergadering binding registrasie is afgeskakel.
Vergadering bind mislukking versuip in staat te stel om, stel die register waarde [HKLM Software Microsoft Fusion!EnableLog] (DWORD) aan 1.
Let daarop: Daar is 'n prestasie straf wat verband hou met die vergadering bind versuim om te meld.
Om hierdie funksie af te skakel, verwyder die register waarde [HKLM Software Microsoft Fusion!EnableLog].

Oplos van probleme met kwessies met Windows SharePoint Services.

Ek weet hoe om doelbewus veroorsaak dat die fout: don’t install the assembly in the GAC. Maar, 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% gemaklik om dit te doen, want ek het nog altyd gedink dat gacutil bestaan ​​vir 'n rede … so I tried that. It made no difference.

Ek het die Inter en het gevind dat hierdie post: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2243677&SiteID=1

Die plakkaat gebeur te word met behulp van dieselfde wortel bietjie van die kode (van die binnekant van WSS boek van hierdie lys) so that was a hopeful sign. Egter, die voorstel van die versiering van die vergadering met 'n [vergadering: ] 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.

Volgende, I went to the trouble of enabling the "assembly bind failure log" (na aanleiding van die hulpvaardig en akkurate instruksies) 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. Maar … dit sal nie soek vir dit in die 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" funksie b2cb42e3-4f0a-4380-aaba-1ef9cd526f20: System.ArgumentNullException: Waarde kan nie nul wees.
Parameter naam: tipe
at System.Activator.CreateInstance(Tik, Boole nonPublic)
at System.Activator.CreateInstance(Tik)
at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()

Oplos van probleme met kwessies met Windows SharePoint Services.

Tyd vir 'n laaste reis na die Inter!

Hierdie keer het ek uitvind, voorspelbaar genoeg, that MOSS issues this error because the assembly is not in GAC.

Ek wil iets positiefs uit te kry en probeer om te voel 'n bietjie trots op die feit dat ek geskep het Die Fugitive van MSIL gemeentes, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" onder my asem.

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" maar kan nie vind een).

Ek installering van die funksie en dit aktiveer en … dit werk! So, na al, I had to basically ‘reboot’ my project. Dit is 'n ander rede waarom ek haat rekenaars.

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. Vir een of ander rede, I did not use the -force option when I installed the new project. Hierdie keer, Ek het eintlik, truly forget to copy this new project’s assembly into the GAC. As 'n gevolg, I received that "FielNotFoundException" fout. Hierdie keer, Ek het dit van stsadm, not when I tried to activate the feature via the web browser. So, -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.

</einde>

Sondag Funny: Top 10 Maniere om jou vrou te vererg

  1. Koop broccoli as jy weet daar is reeds meer as genoeg in die yskas.
  2. Go for a run. Cool off. Take off clean pillow case and replace with T-shirt. Cover with clean pillow case.
  3. Wanneer jy bestuur, vra of ons moet op die verkeerde manier gaan 'n eenrigting-straat af.
  4. Vir 15 jaar, every Sunday that you wife suggests going to a museum, express surprise that museums are open on Sunday’s.
  5. Vir 15 jaar, 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. Gebruik 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 weer!"
  15. Write "top 10" lists that don’t have 10 items.

===

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

</einde>

Technorati Tags:

Event ID 1023: “Windows kan nie laai nie extensible toonbank DLL MSSCNTRS”

UPDATE (04/08/08): I seem to have solved this problem. From the command line, Ek het "C:\windows system32 lodctr / R" soos per 'n inskrywing praat oor Install probleme en dit blyk opgelos het dit vir my.

Ek het wat die afgelope tyd opgemerk, 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 kan nie laai extensible toonbank DLL UGatherer, die eerste DWORD in data-afdeling is die Windows fout kode.

Windows kan nie laai extensible toonbank DLL UGTHRSVC, die eerste DWORD in data-afdeling is die Windows fout kode.

Windows kan nie laai nie extensible toonbank DLL MSSCNTRS, die eerste DWORD in data-afdeling is die Windows fout kode.

As ek boor in die besonderhede van een van die boodskappe, Ek kry hierdie:

Bron: Perflib

Tipe: Fout

Kategorie: Geen

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 had been nagging me about performing an update for quite some time, so I jotted down the version I had installed (apparently "1.0.1 build 29996") and did the update. This upgraded me to v1.04. Ongelukkig, it did not fix the issue.

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

The host operating system is Windows XP 64 bietjie.

Ek dink nie dit was nog altyd gebeur, maar ek kan nie onthou dat enige spesifieke gebeurtenis wat kan dit daartoe gelei het.

Dit is waarom ek haat rekenaars.

</einde>

Technorati Tags:

Vinnige & Maklik: Herbenoem Opgelaai lêer SharePoint Object Model Via 'n gebeurtenis Ontvanger

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

UPDATE 2: In my huidige projek, users always upload documents. As 'n gevolg, 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 looks for a valid value there before actually performing the rename and since then, 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()" metode. In plaas daarvan, we use "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 openbare oorheers nietig ItemAdded(SPItemEventProperties eienskappe)
        {
            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.

This is a more useful version that does the same thing, but assigns the name of the file to "Title":

 openbare oorheers nietig ItemAdded(SPItemEventProperties eienskappe)
        {
            DisableEventFiring();

            // Assign the title of this item to the name of file itself.
 // NOTA: This assignment must take place before we modify the file itself.
 // Calling update() on the SPFile seems to invalidate the properties in
 // some sense.  Updates to "Title" failed until that change (and update() call)
 // were moved in front of the change to the file name.
            properties.ListItem["Title"] = properties.ListItem.File.Name;

            properties.ListItem.Update();

            SPFile f = properties.ListItem.File;

            // Get the extension of the file.  We need that later.
 string spfileExt = nuwe FileInfo(f.Name).Extension;

            // Rename the file to the list item's ID and use the file extension to keep
 // that part of it intact.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // Commit the move.
            f.Update();

            EnableEventFiring();
        }

Discussion: Toepassing van Beste Praktyke nakoming in 'n nie-triviale mos Omgewing

'N mede, "Mark", het begin met 'n potensieel interessante nuusgroep bespreking fokus op "die stigting van 'n uitstekende SharePoint Bestuur van die begin af" vir 'n 35,000 gebruiker omgewing.

Die gesprek is hier: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6

Pop op meer as en dra!

</einde>

URL van persoonlike aksie word nie vertoon vir die Nuwe funksie

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 (Hy het gesê hy het 'n blog inskrywing met behulp van 'n instrument hy nie verstaan ​​nie).

Vandag, 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, maar toe ek dit geaktiveer (sonder foute) dit eenvoudig nie wys op die drop-down menu.

I finally realized that I misspelled "SharePoint" in die area kenmerk van die <CustomAction> node. This is the bad elements.xml file:

<?xml weergawe="1.0" encoding="UTF-8" ?>
<Elemente xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolbar"
 Groepid="SiteActions"
 Plek="Microsoft.Sharepoint.StandardMenu"
 Volgorde="100"
 Titel="Hallo!"
 Description="Custom menu aksie bygevoeg via 'n funksie."
 ImageUrl="_layouts / images / menuprofile.gif">

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

  </CustomAction>
</Elemente>

Goeie:

<?xml weergawe="1.0" encoding="UTF-8" ?>
<Elemente xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolBar"
 Groepid="SiteActions"
 Plek="Microsoft.SharePoint.StandardMenu"
 Volgorde="100"
 Titel="Hallo!"
 Description="Custom menu aksie bygevoeg via 'n funksie."
    >
    <UrlAction Url="http://www.xyzzy.com"/>
  </CustomAction>
</Elemente>

Daardie een het my 'n goeie twee uur geneem om uit te vind 🙂

Ek troos in die feit dat 'n dag in die toekoms, Ek sal in staat wees om te sê met oortuiging, "back in the day, Ek het drie myl te loop heuwel in die sneeu (kaalvoet!) in order to deploy a custom feature to MOSS. You kids, jy weet nie hoe maklik jy dit! Get off my lawn!"

Kan nie wag.

</einde>

Technorati Tags: ,