Cartlanna míosúla: Eanáir 2008

Tá sé seo Cén fáth nach féidir liom Cosúil Ag baint úsáide as Uirlisí nialais Lá

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

Má tá an uirlis ag déanamh rudaí nach dtuigeann tú agus ansin go mainneoidh sé i chéim n ar líon anaithnid na céimeanna, go bhfuil tú marbh san uisce…

</deireadh>

Clibeanna Technorati:

Réiteach a theipeann Iompórtáil BDC ADF: “An earráid seo a leanas a tharla:”

Bhí mé arís crafting BDC comhaid ADF de láimh (ionas gur féidir liom a thógáil suas mo "a fháil as mo Lawn!" Mé) agus bhuail an earráid seo álainn:

íomhá

"Application definition import failed. An earráid seo a leanas a tharla:"

Mar a fheiceann tú, níl earráid, ach … Ní sé ag dul a insint dom cad é.

I mo chás, 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, ach theip chun cothrom le dáta an <LobSystem>’s Type attribute. I switched it to "WebService" agus bhog mé sona sásta ar earráidí allmhairithe níos nuaí agus níos spreagúla, Láimhseáladh in am trátha.

Seo é an LobSystem mícheart:

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

Tá sé seo ceart:

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

</deireadh>

Clibeanna Technorati:

Dealraíonn BDC ar Athsholáthar Inmharthana Chun lookups

Suas chun dáta: Tá an MSDN phost roinnt tuairimí suimiúla ó JXJ bunaithe ar a, den chuid is mó diúltach, taithí ag dul síos an cosán: 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" réimse.

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. Cuardaigh: 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!

</deireadh>

Clibeanna Technorati:

Réiteach a Earráid Iompórtáil BDC: “Níorbh fhéidir luchtú Cineál cur síos TypeName TypeDescriptor ar …”

Tá mé ag obair leis inniu BDC, coding ADF files by hand and generating myself some errors. One such error:

Allmhairiú sainmhíniú Iarratais theip ar. An earráid seo a leanas a tharla: Níorbh fhéidir luchtú Cineál cur síos TypeName TypeDescriptor ar. Ainm Paraiméadar: Thángthas Earráid typeName ag nó díreach roimh an Líne: '35’ agus Seasamh ó: ’20’.

MOSS taispeáint earráid seo nuair a rinne mé a allmhairiú an comhad XML ADF.

Rinne mé taighde ar an Internets agus fuarthas amach go raibh mé ag tagairt don ainm mar shampla LOB (ó na <LobSystemInstance>) i mo <TypeDescriptor> nód nuair ba chóir dom a bheith tagairt an t-ainm LOB féin (ó <LobSystem>).

Mícheart:

<TypeDescriptor TypeName="Conchango.KeyValue, LOB Ainm Cúirte Céadchéime" Name="KeyValue">

Correct:

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

Tá súil agam go Sábhálann an ceann duine éigin uair an chloig nó dhá cheann de ama.

</deireadh>

Liostáil le mo bhlag!

Clibeanna Technorati:

Réiteach ar Fadhb: “FileNotFoundException” Le Mo Gné Glacadóir.

I was working on a feature last week that would add some event receivers to a specific list instance. (Blogged mé beagán faoi go glacadóir liosta anseo).

Ag baint úsáide as an líne ordaithe, Raibh mé in ann a shuiteáil an gné gan aon earráid (ach féach thíos le haghaidh an earráid i bhfolach). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" earráid. 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’ nó ceann dá spleáchais. The system cannot find the file specified.
File name: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName ainm comhaid, Codebase Teaghrán, AssemblySecurity Fianaise, Tionól locationHint, StackCrawlMark& ithir Stack, Boole throwOnFileNotFound, ForIntrospection Boole)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, AssemblySecurity Fianaise, StackCrawlMark& ithir Stack, ForIntrospection Boole)
at System.Reflection.Assembly.InternalLoad(String assemblyString, AssemblySecurity Fianaise, StackCrawlMark& ithir Stack, ForIntrospection Boole)
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) go 1.
Tabhair faoi deara: 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. Ach, 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. Mar sin féin, 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.

Ar Aghaidh, 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. Ach … 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: Ní féidir luach a bheith ar neamhní.
Ainm Paraiméadar: cineál
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.

Ba mhaith liom a fháil ar rud éigin as dhearfach seo agus iarracht a bhraitheann ar beag bródúil go chruthaigh mé an Teifeacha de tionóil MSIL, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" faoi ​​mo anáil.

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" ach ní féidir teacht ar aon).

Shuiteáil mé an gné agus a ghníomhachtú é agus … oibríonn sé! Mar sin,, tar éis an tsaoil go, 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. Ar chúis éigin, I did not use the -force option when I installed the new project. An uair seo, Rinne mé i ndáiríre, truly forget to copy this new project’s assembly into the GAC. Mar thoradh air sin, I received that "FielNotFoundException" earráid. An uair seo, Fuair ​​mé é ó stsadm, not when I tried to activate the feature via the web browser. Mar sin,, -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.

</deireadh>

Clibeanna Technorati: ,

Dé Domhnaigh greannmhar: Barr 10 Bealaí a cur as do Bhanchéile

  1. Ceannaigh brocailí nuair a fhios agat go bhfuil cheana féin níos mó ná go leor sa chuisneoir.
  2. Go for a run. Cool off. Take off clean pillow case and replace with T-shirt. Cover with clean pillow case.
  3. Agus iad ag tiomáint, a iarraidh má ba chóir dúinn dul an bealach mícheart síos sráid aontreo.
  4. Chun 15 bliana, gach Domhnach a thugann le fios duit bhean ag dul le músaem, iontas in iúl go bhfuil músaeim oscailte ar an Domhnach ar.
  5. Chun 15 bliana, occasionally suggest going to the local book store on Sunday. Express surprise that they are not open on Sunday’s (buíochas a lán Dlíthe Blue!).
  6. Úsáid 20 pointí a dhéanamh 3 point turn.
  7. Ar tráthnóna Fall fionnuar luath, 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, amaideach" agus faigheann suas chun dul sé amach, grab the warm spot she had on the couch. Bonus points if she does not realize you did it until much later.
  8. Oscail suas CAN de delicious bán tuinnín colgach agus é a ithe go díreach ó féidir leis an, i leaba, ar an oíche.
  9. Téigh isteach sa chistin cé go bhfuil bean ag ithe dinnéar, oscailt suas ar an tarraiceán sceanra agus gréithe bhrú timpeall go dtí go screams bhean chéile, "what are you looking for!"
  10. Ar fháil cártaí gnó nua, rúnda ar siúl iad go léir ar fud an tí: Faoin leaba, i gcásanna pillow, taobh istigh cupáin caife, ina sparán, i pócaí cóta, urranna glove carr, an pantry — anywhere you can think of.
  11. Scríobh iontrálacha blag faoi do bhean chéile.
  12. Wake suas.
  13. Nuair ag siúl na sráideanna na Nua-Eabhrac, be on the alert for "crusty" objects on the ground. Coimeád i gcuimhne do bhean chéile ar eagla speisialta, bhaint amach síos amhail is dá mba chun pioc ceann suas suas agus a iarraidh, "hmm, N'fheadar cad é go?" (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! Tá sé ag déanamh air arís!"
  15. Write "top 10" liostaí nach bhfuil 10 míreanna.

===

Bhean chéile joke Bónas:

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, nuair a chríochnaigh muid ag ithe, an fhreastalaí a tháinig ag agus d'iarr conas a thaitin againn ár béilí. I gceist agam a rá, ‘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, ach ina ionad sin Screamed mé ar a, ‘You ruined my life!'"

</deireadh>

Clibeanna Technorati:

Event ID 1023: “Ní féidir Windows luchtú MSSCNTRS dll extensible gcuntar”

Suas chun dáta (04/08/08): I seem to have solved this problem. From the command line, I ran "c:\fuinneoga system32 lodctr / R" de réir iontráil ag caint faoi fhadhbanna InstallShield agus gur dealraitheach go bhfuil réiteach sé dom.

Tá mé faoi deara go bhfuil le déanaí, 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:

Ní féidir Windows luchtú extensible UGatherer dll gcuntar, Is é an chéad DWORD in alt sonraí ar an cód earráid Windows.

Ní féidir Windows luchtú extensible UGTHRSVC dll gcuntar, Is é an chéad DWORD in alt sonraí ar an cód earráid Windows.

Ní féidir Windows luchtú MSSCNTRS dll extensible gcuntar, Is é an chéad DWORD in alt sonraí ar an cód earráid Windows.

Má mé druilire isteach na sonraí ar cheann de na teachtaireachtaí, Faighim seo:

Foinse: Perflib

Cineál: Earráid

Catagóir: Dada

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.

Bhí VMware nagging dom faoi chomhlíonadh cothrom le dáta do leor ama a roinnt, mar sin jotted mé síos an leagan a bhí suiteáilte mé (apparently "1.0.1 build 29996") and did the update. This upgraded me to v1.04. Faraor, Ní raibh sé a shocrú an tsaincheist.

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

Is é an córas oibriúcháin óstach Windows XP 64 giotán.

I don’t think this has always happened, but I don’t recall any particular event that might have led to it.

This is why I hate computers.

</deireadh>

Clibeanna Technorati:

Cuardaigh & Éasca: Athainmnigh Comhad Uasluchtaithe Ag baint úsáide as Samhail Oibiachta SharePoint Via ar Glacadóir Imeacht

Suas chun dáta: This works but there are significant limitations which are described in the comments. This may still be useful in some cirumstances.

Suas chun dáta 2: I mo tionscadal reatha, users always upload documents. Mar thoradh air sin, 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() Breathnaíonn an glacadóir le haghaidh luach bailí ann roimh iarbhír ag comhlíonadh a athainmniú agus ó shin, 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()" modh. Ina áit sin, úsáidimid "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 poiblí shárú neamhní ItemAdded(SPItemEventProperties airíonna)
        {
            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.

Is é seo an leagan níos úsáidí a dhéanann an rud céanna, but assigns the name of the file to "Title":

 poiblí shárú neamhní ItemAdded(SPItemEventProperties airíonna)
        {
            DisableEventFiring();

            // An teideal na míre seo a shannadh do ainm an chomhaid féin.
 // NÓTA: Ní mór an tasc a chur i bhfeidhm roimh linn a mhodhnú an comhad féin.
 // Ag glaoch ar thabhairt cothrom le dáta() ar an SPFile is cosúil a dhéanamh neamhbhailí na maoine i
 // ciall éigin.  Updates to "Title" Theip ar go dtí an t-athrú (agus nuashonrú() glaoch)
 // Bhí ar athraíodh a ionad i os comhair an t-athrú ar ainm an chomhaid.
            properties.ListItem["Title"] = Properties.ListItem.File.Name;

            properties.ListItem.Update();

            SPFile f = properties.ListItem.File;

            // Faigh an síneadh ar an gcomhad.  Ní mór dúinn go déanaí.
 teaghrán spfileExt = nua Eolas Comhad(f.Name).Síneadh;

            // Athainmnigh an comhad leis an mír den liosta ID agus úsáid a bhaint as an síneadh comhad a choinneáil
 // an chuid sin de sé slán.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // Tiomantas an t-aistriú.
            f.Update();

            EnableEventFiring();
        }

Fóram Plé: Forfheidhmiú Comhlíonta Cleachtais is Fearr i Comhshaoil ​​MOSS Neamh-fánach

A fear, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" le haghaidh 35,000 timpeallacht úsáideora.

Is é an plé anseo: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6

Pop ar níos mó agus cur!

</deireadh>

Nach mbeidh an Chustaim URL Gnímh Taispeáin do Feature Nua

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 (a dúirt sé mar a scríobh sé ar iontráil bhlag ag baint úsáide as uirlis nach dtuigeann sé).

Sa lá atá inniu, 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, ach nuair a ngníomh liom é (gan earráid) Ní bheadh ​​sé a thaispeáint ach suas ar an roghchlár anuas-.

I finally realized that I misspelled "SharePoint" i tréith Suíomh an <CustomAction> nód. This is the bad elements.xml file:

<?xml leagan="1.0" ionchódú="utf-8" ?>
<Eilimintí xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolbar"
 GroupId="SiteActions"
 Suíomh="Microsoft.Sharepoint.StandardMenu"
 Seicheamh="100"
 Teideal="Dia duit!"
 Cur Síos="Gníomh roghchlár saincheaptha leanas isteach i trí ghné."
 ImageUrl="_layouts / images / menuprofile.gif">

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

  </CustomAction>
</Eilimintí>

Dea-:

<?xml leagan="1.0" ionchódú="utf-8" ?>
<Eilimintí xmlns="http://schemas.microsoft.com / SharePoint /">
  <CustomAction
 Id="SiteActionsToolBar"
 GroupId="SiteActions"
 Suíomh="Microsoft.SharePoint.StandardMenu"
 Seicheamh="100"
 Teideal="Dia duit!"
 Cur Síos="Gníomh roghchlár saincheaptha leanas isteach i trí ghné."
    >
    <UrlAction Url="http://www.xyzzy.com"/>
  </CustomAction>
</Eilimintí>

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

Mé sólás a ghlacadh i ar an bhfíric go lá éigin sa todhchaí, Beidh mé in ann a rá le ciontú, "back in the day, Bhí mé ag siúl trí mhíle suas cnoc sa sneachta (cosnochta!) in order to deploy a custom feature to MOSS. You kids, nach bhfuil a fhios agat conas éasca go bhfuil tú é! Get off my lawn!"

Nach féidir fanacht.

</deireadh>

Clibeanna Technorati: ,