Wednesday, May 29, 2013

View the GAC like a normal File/Folder and Copy/Paste From/To the GAC


היי חברים,
החבר'ה מצוות הפיתוח ביקשו שאפרוש להם קבצי DLL ו- PDB באחד האתרים ב-SP בעקבות שינויים שביצעו בקוד.
רציתי לפרוש את הקבצים ב-GAC אבל כמו שאנחנו יודעים ספריית ה- Assembly תחת C:\Windows  איננה נראית כמו ספריית קבצים רגילה ומעבר לכך כאשר אנחנו גוררים וזורקים את הקבצים לספרייה C:\windows\assembly   , הקבצים לא באמת ומעתקים לשם, ישנו פלאגין מיוחד שנקרא gacutil שמתקין את ה- assembly לתוך ה-GAC. הפלאגין הזה יכול להיות מבלבל משום שהוא עשוי לתת לנו אשליה שה-GAC  הוא פשוט תיקייה עם המון קבצי  DLL.
למעשה, זה מבנה היררכי עם תיקייה לכל assembly name, בתוכה יש תיקיות עבור גירסאות שונות, וכן הלאה.

כדי להגיע למקום הנכון ולהחליף את הקבצים איפשרתי Look & Feel של ספריית קבצים רגילה.
 אז איך עושים את זה :

לחץ על Start > Run ורשום Regedit. לאחר מכן נווט למיקום הבא :





HKEY_LOCAL_MACHINE ==> SOFTWARE ==> Microsoft ==> Fusion




צור ערך חדש מסוג DWORD וקרא לו DisableCacheViewer , לחץ על הערך פעמיים והכנס את הערך 1 בשדה Value Data. לחץ על OK וצא מהחלון.





פתח את תיקיית ה- Assembly וראה עכשיו את ה-DLL בתצורה רגילה של ספריית קבצים.

חשוב : פעולה זו תשבית את הפלאגין שמציג את ה- GAC כל כך פשוט (אבל זה גם יהפוך את הגרירה ושחרור לא שמישים - תצטרכו להפעיל את gacutil בעצמכם). כמובן שאתם יכולים להשתמש במנהלי קבצים חלופיים או קונסולה, אם אתם לא רוצים להתעסק עם הגדרות ב-Registry.


============================================================================================================================================================================================


Hi Everybody,

The guys From R&D asked me to put in the GAC DLLs and PDB of one of the sites in SP due to changes they carried out in the code.

When you drag and drop your assembly into C:\windows\assembly folder, it doesn't really get copied there—a special Windows Explorer plugin callis gacutil to install your assembly into GAC.
This Explorer plugin can be confusing because it may give one an illusion that GAC is just plain simple folder with lots of DLLs. Actually, it is a hierarchical structure with a folder for each assembly name, inside of which there are folders for different versions, and so on.

If you want to see the real GAC structure, open registry (Start ==> Run ==> regedit).


Go to HKEY_LOCAL_MACHINE ==> SOFTWARE ==> Microsoft ==> Fusion.


Set New DWORD Named DisableCacheViewer and write 1 in the value field





Important : This will disable Cache Viewer plugin that makes GAC look so simple (but it also will make drag and drop to install unusable—you'll have to call gacutil yourself). Of course, you can use alternative file managers or console as well, if you don't want to mess with registry settings.



What is the difference between iisreset, recycle, refresh and restart?

היי חברים,

לא מעט שואלים את עצמם מה ההבדל בין  iisreset, recycle, refresh and restart.

אנסה לסכם בקצרה את הפעולות שקורות בכל אחת מהפעולות :


 iisreset גורם לעצירה והתחלה של שירותי הפרסום-World Wide Web. . זה חל על כל מאגרי היישומים שלכם (application pools). אני בטוח ששמתם לב לתהליך שנוצר עבור כל מאגר יישומים (process), תהליך זה מטפל בבקשות לכל אתרי האינטרנט שקשורים אליו.

 כאשר אתם מבצעים recycle  למאגר יישומים,  IISיצור תהליך חדש (וישמור על הישן) כדי לטפל בבקשות, לאחר מכן הוא מנסה להעביר את כל הבקשות לתהליך החדש. לאחר זמן מה התהליך הישן  "מושמד" באופן אוטומטי. בדרך כלל נמחזר מאגר היישומים כדי להיפטר מדליפות זיכרון (כנראה שיש לכם בעיה ביישום אם זו צריכה להיות פעולה שגורה ורגילה, למרות שזה מומלץ לבצע recycle מתוזמן).

באשר להפעלה מחדש של אתר אינטרנט -  restart, פעולה זו פשוט מפסיקה ומפעילה מחדש את הבקשות לאתר מסוים. היא תמשיך לשרת אתרים אחרים על אותו מאגר יישומים ללא הפרעות .אם יש לכם session oriented application, כל האמור לעיל יגרום לאובדן של אובייקטי ה – session .

לרענון אתרים, refresh ,  אין כל השפעה על השירות / תהליך / אתר , והוא רק פקודה מממשק המשתמש וזאת כדי לרענן את תצוגת העץ (אולי הוספתם ספרייה ואתם לא רואים אותה  בקונסולת הניהול).

בהצלחה !
רון נס.



 ============================================================================================================================================================================================

Hi Everybody,

A lot of People ask themselves what is the difference between iisreset, recycle, refresh and restart. I will try to summarize briefly the actions that occur in each of the Actions:
iisreset will stop and start the World Wide Web Publishing Service. This of course applies to all of your application pools. I'm sure you noticed a process being created for each application pool. This process will handle requests for all websites associated with it.

When you recycle an application pool, IIS will create a new process (keeping the old one) to serve requests. Then it tries to move all requests on the new process. After a timeout the old process will be killed automatically. You usually recycle your application pool to get rid of leaked memory (you might have a problem in your application if this needs to be a regular operation, even though it is recommended to have a scheduled recycle).

As for restarting a website, it just stops and restarts serving requests for that particular website. It will continue to serve other websites on the same app pool with no interruptions. If you have a session oriented application, all of the above will cause loss of session objects.


Refreshing a websites has no effect on the service/process/website and is merely a UI command to refresh the tree view (maybe you added a directory you don't see in the management console.

Good Luck :)
Ron Ness.

Update SharePoint 2010 Farm Credentials

היי חברים,

מאמר זה מתאר כיצד לשנות את הסיסמאות עבור חשבונות שירות ב -  SharePoint 2010

כדי לשנות את הסיסמאות עבור חשבונות שירות ב- SharePoint 2010 בצע את הפעולות הבאות:

הערה אם שירות SQL Server משתמש בחשבון תחום, ותוקף הסיסמה עבור חשבון תחום זה פג או שהיא אינה חוקית, הקפד לעדכן את הסיסמה עבור חשבון התחום לפני שתבצע הליך זה.

1.       עדכן את הסיסמה עבור החשבון שנמצא בשימוש על-ידי מאגר היישומים 'ניהול מרכזי'. לשם כך, בצע את הפעולות הבאות:
o        בכל השרתים בחוות השרתים, פתח שורת פקודה, הקלד את השורה הבאה ולאחר מכן הקש ENTER:
c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin

o        בשרת המארח את אתר האינטרנט 'ניהול מרכזי', הקלד את השורה הבאה בשורת הפקודה, ולאחר מכן הקש ENTER:
stsadm -o updatefarmcredentials -userlogin DomainName\UserName -password NewPassword
o        בכל השרתים האחרים בחוות השרתים, הקלד את השורה הבאה בשורת הפקודה, ולאחר מכן הקש ENTER:
stsadm -o updatefarmcredentials -userlogin DomainName\UserName -password NewPassword -local
o        הפעל מחדש את Microsoft Internet Information Services (IIS)7.0. לשם כך הקלד את השורה הבאה בשורת הפקודה ולאחר מכן הקש ENTER:
iisreset /noforce

2.       ודא כי הגדרת המשימה 'פריסת אישורים של מאגר יישומי ניהול' לא מוצגת עוד בדף 'הגדרות של משימות שעון עצר' של הניהול המרכזי של SharePoint  לשם כך, בצע את הפעולות הבאות:
o        פתח את ניהול מרכזי של SharePoint, לחץ על פעולות ולאחר מכן לחץ על הגדרות של משימות שעון עצר תחת הגדרות תצורה כלליות.
o        ודא כי הגדרת המשימה 'פריסת אישורים של מאגר יישומי ניהול' לא מוצגת עוד ברשימה.

הערה אם הגדרת המשימה 'פריסת אישורים של מאגר יישומי ניהול' מוצגת ברשימה, המתן עד שהיא תיעלם מהרשימה.

3.       עדכן את הסיסמה עבור חשבון מאגר היישומים שנמצא בשימוש על-ידי יישומי האינטרנט בחוות השרתים. לשם כך, הקלד את השורה הבאה בשורת פקודה בכל שרת בחוות השרתים ולאחר מכן הקש ENTER:
stsadm -o updateaccountpassword -userlogin DomainName\UserName -password NewPassword –noAdmin

שלבי 4 ו -5 אינם נדרשים אלא אם אתה מפעיל את החיפוש של SharePoint. ברוב ההתקנות של SharePoint, שירות זה אינו פועל, כך שאינך צריך לעשות את הפעולות הבאות

4.       עדכן את הסיסמה עבור החשבון המשמש להפעלת השירות 'חיפוש בעזרה של Windows SharePoint Services'. לשם כך, הקלד את השורה הבאה בשורת פקודה בכל שרת בחוות השרתים ולאחר מכן הקש ENTER:
stsadm.exe -o spsearch -farmserviceaccount DomainName\UserName -farmservicepassword NewPassword
5.       עדכן את הסיסמה עבור חשבון ברירת המחדל לגישה לתוכן המשמש את השירות 'חיפוש בעזרה של Windows SharePoint Services'. לשם כך, הקלד את השורה הבאה בשורת פקודה בכל שרת בחוות השרתים ולאחר מכן הקש ENTER:
stsadm.exe -o spsearch -farmcontentaccessaccount DomainName\UserName -farmcontentaccesspasswordNewPassword



בהצלחה !
רון נס.
 ============================================================================================================================================================================================


Hi Everybody,

This article describes how to change the passwords for service accounts on SharePoint 2010
To change the passwords for service accounts in SharePoint 2010, follow these steps.

Note If the Microsoft SQL Server service uses a domain account, and the password for that domain account is either expired or invalid, make sure that you update the password for the domain account first.

1.     Update the password for the account that is used by the Central Administration application pool. To do this, follow these steps:
a.     On all servers in the server farm, open a command prompt, type the following line, and then press Enter:
c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin
b.     Do one of the following:
§  On the server that hosts the Central Administration website, type the following line at the command prompt, and then press Enter:

stsadm -o updatefarmcredentials -userlogin DomainName\UserName -password NewPassword

§  On all other servers in the server farm, type the following line at the command prompt, and then press Enter:

stsadm -o updatefarmcredentials -userlogin DomainName\UserName -password NewPassword -local
c.     Restart Internet Information Services (IIS) 7.0. To do this, type the following line at the command prompt, and then press Enter: 
iisreset /noforce

2.     Verify that the Administration Application Pool Credential Deployment job definition is no longer displayed on the Timer Job Definitions page of SharePoint Central Administration. To do this, follow these steps:
 .      Open SharePoint Central Administration, click Operations, and then click Timer job definitions under Global Configuration.
a.     Verify that the Administration Application Pool Credential Deployment job definition is no longer displayed in the list.

Note If the Administration Application Pool Credential Deployment job definition is displayed in the list, wait until it disappears from the list.
3.     Update the password for the application pool account that is used by web applications on the server farm. To do this, type the following line at a command prompt on every server on the server farm, and then press Enter:
stsadm -o updateaccountpassword -userlogin DomainName\UserName -password NewPassword –noAdmin 


§  Steps 4 and 5 are not required unless you’re running SharePoint Search.  In most SharePoint installations, this service is not running so you don’t need to do these steps


4.     Update the password for the account that is used to run the Windows SharePoint Services Help Search service. To do this, type the following line at a command prompt on every server on the server farm, and then press Enter:
stsadm.exe -o spsearch -farmserviceaccount DomainName\UserName -farmservicepassword NewPassword

5.     Update the password for the default content access account that is used by the Windows SharePoint Services Help Search service. To do this, type the following line at a command prompt on every server on the server farm, and then press Enter:

stsadm.exe -o spsearch -farmcontentaccessaccount DomainName\UserName –farmcontentaccesspasswordNewPassword


Good Luck :)
Ron Ness.