بایگانی ماهانه: ژانویه 2008

این است که چرا من دوست ندارم با استفاده از ابزار روز صفر

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

اگر این ابزار در حال انجام مسائل شما را درک نمی کنند و سپس آن را در مرحله نفر تعداد نامعلومی از مراحل با شکست مواجه, شما مرده در آب…

</پایان>

راه حل برای عدم واردات ADF BDC: “خطای زیر رخ داده است:”

من یک بار دیگر تهیه شد و BDC فایل ADF با دست (so that I can build up my "get off my lawn!" من) و ضربه زدن به این خطا دوست داشتنی:

تصویر

"Application definition import failed. خطای زیر رخ داده است:"

همانطور که می بینید, یک خطا وجود دارد, اما … آن را نمی خواهید به من بگویید که آنچه در آن است.

در مورد من, 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">

</پایان>

برچسب ها:

BDC یک جایگزین مناسب رشد و ترقی را برای این متغیر به نظر می رسد

تکمیلی: این MSDN ارسال برخی از مشاهدات جالب از JXJ بر اساس آن, عمدتا منفی, تجارب پایین رفتن این مسیر: 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" میدان.

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. جستجو: 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!

</پایان>

برچسب ها:

راه حل به خطا واردات BDC: “می تواند نوع شرح داده شده توسط TypeName TypeDescriptor بار نیست …”

من کار با امروز BDC, coding ADF files by hand and generating myself some errors. One such error:

برنامه واردات تعریف شکست خورد. خطای زیر رخ داده است: می تواند نوع شرح داده شده توسط TypeName TypeDescriptor بار نیست. نام پارامتر: typeName خطا یا درست قبل از خط مواجه شد: '35’ و موقعیت: ’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 (از <LobSystem>).

اشتباه:

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

</پایان>

مشترک شدن در وبلاگ من!

برچسب ها:

راه حلی برای مشکل: “FileNotFoundException” با استفاده از گیرنده بلند من.

I was working on a feature last week that would add some event receivers to a specific list instance. (من یک کمی در مورد آن گیرنده لیست بلاگ).

با استفاده از خط فرمان, من می توانم با قابلیت نصب بدون خطا (اما زیر را برای خطا مخفی). When I tried to deploy the feature on the site, MOSS complained of a "FileNotFoundException" خطا. 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’ و یا یکی از وابستگیهای آن بسته نیز. The system cannot find the file specified.
File name: ‘xyzzyFeatureReceiver_0’
at System.Reflection.Assembly.nLoad(AssemblyName نام فایل, کدهای رشته, assemblySecurity مدارک و شواهد, مجمع locationHint, StackCrawlMark& stackMark, بولی throwOnFileNotFound, forIntrospection بولی)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, assemblySecurity مدارک و شواهد, StackCrawlMark& stackMark, forIntrospection بولی)
at System.Reflection.Assembly.InternalLoad(String assemblyString, assemblySecurity مدارک و شواهد, StackCrawlMark& stackMark, forIntrospection بولی)
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) به 1.
یادداشت: 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. اما, 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. اما, 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.

بعد, 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. اما … 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: ارزش نمی تواند تهی.
نام پارامتر: نوع
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.

I want to get something positive out of this and try to feel a little proud that I’ve created the Fugitive of MSIL assemblies, but it’s not working. I’m just plain annoyed. I find myself muttering "chicken or the egg" under my breath.

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" but can’t find one).

I install the feature and activate it and … it works! پس, after all that, 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. For some reason, I did not use the -force option when I installed the new project. این بار, I did actually, truly forget to copy this new project’s assembly into the GAC. به عنوان یک نتیجه, I received that "FielNotFoundException" خطا. این بار, I got it from stsadm, not when I tried to activate the feature via the web browser. پس, -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.

</پایان>

یکشنبه های خنده دار: بالا 10 راه برای آزار همسر خود را

  1. فروش کلم بروکلی زمانی که شما در حال حاضر وجود دارد بیش از اندازه کافی در یخچال.
  2. Go for a run. Cool off. Take off clean pillow case and replace with T-shirt. Cover with clean pillow case.
  3. در حین رانندگی, بپرسید که آیا ما باید راه را اشتباه پایین یک خیابان یک طرفه.
  4. برای 15 سال, every Sunday that you wife suggests going to a museum, express surprise that museums are open on Sunday’s.
  5. برای 15 سال, 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. استفاده 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 دوباره!"
  15. Write "top 10" lists that don’t have 10 اقلام.

=

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

</پایان>

برچسب ها:

ID رویداد 1023: “ویندوز می تواند MSSCNTRS DLL ضد توسعه را بار نیست”

تکمیلی (04/08/08): I seem to have solved this problem. From the command line, I ran "c:\WINDOWS SYSTEM32 lodctr / R" در صحبت کردن در مورد مشکلات InstallShield یا ورود و که به نظر می رسد که آن را برای من حل شده.

من متوجه شدم که به تازگی, 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 cannot load extensible counter DLL UGatherer, the first DWORD in data section is the Windows error code.

Windows cannot load extensible counter DLL UGTHRSVC, the first DWORD in data section is the Windows error code.

ویندوز می تواند MSSCNTRS DLL ضد توسعه را بار نیست, the first DWORD in data section is the Windows error code.

If I drill into the details of one of those messages, من این را دریافت کنید:

منبع: Perflib

نوع: خطا

دسته: هیچ یک

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. متاسفانه, 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, پس … not such a great option.

The host operating system is Windows XP 64 ذره.

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.

</پایان>

برچسب ها:

سریع & ساده: تغییر نام فایل آپلود شده با استفاده از شیرپوینت مدل شیء از طریق یک گیرنده رویداد

تکمیلی: This works but there are significant limitations which are described in the comments. This may still be useful in some cirumstances.

تکمیلی 2: در پروژه کنونی من, users always upload documents. به عنوان یک نتیجه, 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() گیرنده به نظر می رسد برای یک مقدار معتبر وجود دارد در واقع قبل از انجام تغییر نام دهید و پس از آن, 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()" روش. در عوض, استفاده می کنیم "MoveTo(…)". Here is a minimal bit of code to accomplish this:

 عمومی نادیده گرفتن از درجه اعتبار ساقط ItemAdded(SPItemEventProperties خواص)
        {
            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.

این یک نسخه مفید تر است که می کند همان چیزی است, but assigns the name of the file to "Title":

 عمومی نادیده گرفتن از درجه اعتبار ساقط ItemAdded(SPItemEventProperties خواص)
        {
            DisableEventFiring();

            // اختصاص عنوان این آیتم به نام خود فایل.
 // توجه: این وظیفه باید قبل از فایل خود را تغییر.
 // تلفن به روز رسانی() در SPFile به نظر می رسد به ابطال خواص در
 // از بعضی جهات.  Updates to "Title" تا که تغییر شکست خورده (و به روز رسانی() صدا)
 // در مقابل تغییر را به نام فایل منتقل شدند.
            properties.ListItem["Title"] = properties.ListItem.File.Name،;

            properties.ListItem.Update();

            SPFile F = properties.ListItem.File;

            // دریافت پسوند فایل.  ما نیاز داریم که بعد از.
 رشته spfileExt = جدید FileInfo(f.Name).گسترش;

            // تغییر نام فایل به ID قلم دوم از اقلام لیست و استفاده از پسوند فایل را به نگه داشتن
 // که بخشی از آن دست نخورده.
            f.MoveTo(properties.ListItem.ParentList.RootFolder.Url +
                "/" + properties.ListItem["ID"] + spfileExt);

            // مرتکب حرکت.
            f.Update();

            EnableEventFiring();
        }

انجمن: اجرای پیروی از بهترین روش ها در محیط زیست خزه غیر بدیهی

همکار, "Mark", has started up a potentially interesting newsgroup discussion focusing on "establishing excellent SharePoint Governance from the start" برای 35,000 محیط کاربر.

بحث اینجا است: http://groups.google.com/group/microsoft.public.sharepoint.portalserver/browse_thread/thread/6d9a738d981af772/1c390b15c5407db6?#1c390b15c5407db6

بر روی بیش از پاپ و کمک!

</پایان>

URL اقدام سفارشی نیست برای ویژگی های جدید نمایش داده خواهد شد

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 (او گفت: او به عنوان نوشت: یک وبلاگ با استفاده از یک ابزار را درک نمی کنند).

امروز, 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, اما زمانی که من آن را به فعال (بدون خطا) آن را به سادگی می دهد تا در منوی کشویی.

I finally realized that I misspelled "SharePoint" در صفت محل <CustomAction> گره. This is the bad elements.xml file:

<?XML نسخه="1.0" پشتیبانی می کند="UTF-8" ?>
<عناصر xmlns="HTTP://schemas.microsoft.com / شیرپوینت /">
  <CustomAction
 شناسایی="SiteActionsToolbar"
 GroupId="SiteActions"
 محل="Microsoft.Sharepoint.StandardMenu"
 دنباله="100"
 عنوان="سلام!"
 شرح="اقدام منوی سفارشی اضافه شده از طریق یکی از ویژگی های."
 آدرس تصویر="_layouts / تصاویر / menuprofile.gif از بود">

    <UrlAction آدرس="HTTP://www.xyzzy.com"/>

  </CustomAction>
</عناصر>

خوب:

<?XML نسخه="1.0" پشتیبانی می کند="UTF-8" ?>
<عناصر xmlns="HTTP://schemas.microsoft.com / شیرپوینت /">
  <CustomAction
 شناسایی="SiteActionsToolBar"
 GroupId="SiteActions"
 محل="Microsoft.SharePoint.StandardMenu"
 دنباله="100"
 عنوان="سلام!"
 شرح="اقدام منوی سفارشی اضافه شده از طریق یکی از ویژگی های."
    >
    <UrlAction آدرس="HTTP://www.xyzzy.com"/>
  </CustomAction>
</عناصر>

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

من آرامش را در این واقعیت است که برخی از روز در آینده, من قادر به گفتن با اعتقاد راسخ, "back in the day, من تا به حال به راه رفتن سه مایل تا تپه ای در برف (پابرهنه!) in order to deploy a custom feature to MOSS. You kids, شما نمی دانید که چه آسان شما آن را دارند! Get off my lawn!"

نمی توانید صبر کنید.

</پایان>