Posts

Showing posts from May, 2011

CRM 3.0 customization synchronization

Steps: 1)       Go to production environment 2)       Choose: Settings > Customization > Export Customization > Choose in menu bar “Export All customizations”. 3)       Save the xml on the file system (can be local workstation) 4)       Go to development environment 5)       Choose: Settings > Customization > Import Customizations > Select the xml saved on your workstation and click “Upload” 6)       Choose in de menu bar “Import all customizations” 7)       If the import is successful: Choose Settings > Customization > Customize Entities > Choose from the menu bar: “More Actions”  > “Publish all customizations”

Shrink a database log file with T-SQL

So I don't forget: USE SharePoint2010_Config GO ALTER DATABASE SharePoint2010_Config SET RECOVERY SIMPLE GO DBCC SHRINKFILE ( 'SharePoint2010_Config_log' ) GO ALTER DATABASE SharePoint2010_Config SET RECOVERY FULL

SharePoint 2010 Could not load user profile.

Error Could not load user profile. Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 6e4b876f-b6ac-404d-9c1c-33af855b56ae Date and Time: 5/19/2011 9:45:23 AM Event Log: Error: RuntimeFilter: Failed to load all runtime filter configurations or the runtime filter component. Exception has been thrown by the target of an invocation. Object Cache: The super user account utilized by the cache is not configured. Did an IIS reset and waited five mins, will update later.

SharePoint 2010 Error Creating New Profile Sychronization Connection

Event Log: System.InvalidOperationException: Retrieve schema failed Microsoft.ResourceManagement.Service: System.InvalidOperationException: Retrieve schema failed at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.Create(String typeName, IList`1 createParameters, Guid creator, Guid cause) at Microsoft.ResourceManagement.ActionProcessor.SyncConfigActionProcessor.ProcessInputRequest(RequestType request) at Microsoft.ResourceManagement.ActionProcessor.ActionDispatcher.ProcessInputRequest(RequestType request) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction(RequestType request) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.ExecuteAction[ResponseBodyType](RequestType request) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.DispatchRequest[ResponseBodyType](RequestType request, Guid requestIdentifier, Object redispatchSingleInstanceKey) at Microsoft.ResourceManagement.WebServices.RequestDispatcher.Dis

Hide the quick launch side bar in a SharePoint teamsite with out editing the master page.

Create a contenet editor web part and open the source editor.  Put in the following code: <style>.ms-navframe{ display:none; }</style> Hide the header: <style>.ms-globalTitleArea{ display:none; }</style>

Restart a remote server from a command line or batch file

shutdown -m file://servername/ -r -f -t 05 -c "Scheduled Maintenance"

Get the number of connections to a database

SELECT db_name ( dbid ) as DatabaseName , count ( dbid ) as NumberOfConnections , loginame as LoginName FROM sys . sysprocesses WHERE dbid > 0 GROUP BY dbid , loginame

Programmatically remove illegal SharePoint characters from file names and directories.

Image
I have often found the need to remove illegal chars from several hundred files, so they could be transferred form a file share to a SharePoint document library.  This is a quick winform that does just that. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace SharePointCleanV2 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         private void button_Clean_Click( object sender, EventArgs e)         {             string rootpath = textBox_path.Text;             DirectoryInfo root = new DirectoryInfo (rootpath);             CleanFilesDirectoryTree(root);             CleanDirectoryTree(root);             CleanTempFilesDirectoryTree(root);         }         private void CleanTempFilesDirectoryTree(System.IO. DirectoryInfo roo