Right-click project > Add > New Item... > Visual
C# > Web > ASP.NET Module > Change 'MyModule1.cs'
to your own name
Reference:
http://go.microsoft.com/?linkid=8101007
http://blog.mastykarz.nl/accessible-404-pagenotfound-in-microsoft-office-sharepoint-server-2007/
Monday, December 9, 2013
Thursday, October 10, 2013
Friday, August 16, 2013
SharePoint 2010 Dev: Reduce DB File Size
IN DEV, NOT PROD:
Reduce Database Log File Size:
USE [DatabaseName]
ALTER DATABASE [DatabaseName] SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(LogFileName, 1)
ALTER DATABASE [DatabaseName] SET RECOVERY FULL WITH NO_WAIT
Reset User Profile synchronization:
http://technet.microsoft.com/en-us/library/ff681014(v=office.14).aspx
Resources:
http://troyvssharepoint.blogspot.co.uk/2012/10/sharepoint-user-profile-sync-database.html
http://technet.microsoft.com/en-us/library/cc262731(v=office.14).aspx
Reduce Database Log File Size:
USE [DatabaseName]
ALTER DATABASE [DatabaseName] SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(LogFileName, 1)
ALTER DATABASE [DatabaseName] SET RECOVERY FULL WITH NO_WAIT
Reset User Profile synchronization:
http://technet.microsoft.com/en-us/library/ff681014(v=office.14).aspx
Resources:
http://troyvssharepoint.blogspot.co.uk/2012/10/sharepoint-user-profile-sync-database.html
http://technet.microsoft.com/en-us/library/cc262731(v=office.14).aspx
Wednesday, August 7, 2013
FIX: SharePoint 2010 Ribbon and IE10 - Screen goes white.
<!-- Fix for ie10 bug where SharePoint Ribbon dropdown causes screen to go white -->
<style type="text/css">
.ms-cui-modalDiv-ie,.ms-cui-glass-ie
{
background-color:transparent !important;
}
</style>
Reference: http://davemcmahon81.wordpress.com/2012/12/11/sharepoint-2010-ribbon-and-ie10-screen-goes-white/
<style type="text/css">
.ms-cui-modalDiv-ie,.ms-cui-glass-ie
{
background-color:transparent !important;
}
</style>
Reference: http://davemcmahon81.wordpress.com/2012/12/11/sharepoint-2010-ribbon-and-ie10-screen-goes-white/
Friday, August 2, 2013
Page Layout: This Control is Currently Disabled
Issue:
Page Layout: This Control is Currently Disabled.
Work around:
Reference:
http://erikswenson.blogspot.com/2011/05/page-layout-this-control-is-currently.html
Sunday, July 21, 2013
Tuesday, July 9, 2013
CAML - AssignedTo [Me]
"<Where><Eq><FieldRef Name=\"AssignedTo\" /><Value Type=\"Integer\"><UserID Type=\"Integer\" /></Value></Eq></Where>"
Reference:
http://blogs.syrinx.com/blogs/sharepoint/archive/2008/08/07/caml-query-to-select-items-assigned-to-current-user.aspx
Reference:
http://blogs.syrinx.com/blogs/sharepoint/archive/2008/08/07/caml-query-to-select-items-assigned-to-current-user.aspx
Monday, June 10, 2013
Access Denied for Site Collection Administrator
Make sure the Cache Super User has Full Control in the Web Application User Policy.
Make sure the Cache Super Reader has Full Read in the Web Application User Policy.
Make sure the Cache Super Reader has Full Read in the Web Application User Policy.
Delete Line Numbers
Maybe there's a better way to do this, but if you copy and paste code that includes line numbers, you can easily remove them by selecting columns of text in Visual Studio:
To select columns of text:
Hold down SHIFT + ALT while dragging the mouse pointer over a block of text.
Reference:
http://joelabrahamsson.com/select-columns-of-text-in-visual-studio/
To select columns of text:
Hold down SHIFT + ALT while dragging the mouse pointer over a block of text.
Reference:
http://joelabrahamsson.com/select-columns-of-text-in-visual-studio/
Wednesday, May 8, 2013
PowerShell - Delete Fields From Content Types
# DELETE A FIELD FROM A LIST CONTENT TYPE
$web = Get-SPWeb http://localhost
$list = $web.Lists["MyList"]
$listContentTypes = $list.ContentTypes
$listContentType = $listContentTypes["My List Content Type"]
$listFieldLink = $listContentType.FieldLinks["MyListFieldInternalName"]
$listContentType.FieldLinks.Delete("MyListFieldInternalName")
$listContentType.Update()
# DELETE A FIELD FROM A SITE CONTENT TYPE
$web = Get-SPWeb http://localhost
$webContentTypes = $web.ContentTypes
$webContentType = $webContentTypes["My Web Content Type"]
$webFieldLink = $webContentType.FieldLinks["MyWebFieldInternalName"]
$webContentType.FieldLinks.Delete("MyWebFieldInternalName")
$webContentType.Update()
Thursday, April 25, 2013
Friday, April 19, 2013
Restore a Site to the same Content Database with Gradual Site Delete
Looks like in order to restore a site to the same Content Database, one must perform the following steps after deleting the site:
1. get-spdeletedsite -webapplication http://samplesite.com | Remove-SPDeletedSite
2. Central Administration > 'Monitoring' > 'Review job definitions' > 'Gradual Site Delete' (For the appropriate Web Application) > 'Run Now' button.
References:
http://reality-tech.com/2012/04/04/gradual-site-collection-deletion/
1. get-spdeletedsite -webapplication http://samplesite.com | Remove-SPDeletedSite
2. Central Administration > 'Monitoring' > 'Review job definitions' > 'Gradual Site Delete' (For the appropriate Web Application) > 'Run Now' button.
References:
http://reality-tech.com/2012/04/04/gradual-site-collection-deletion/
Thursday, April 18, 2013
Things to try when Content Deployment hangs
FYI - There's this list in Central Administration:
http://server/Lists/Content%20Deployment%20Jobs/AllItems.aspx
Restart the timer service on each web server:
With PowerShell:
Clear the SharePoint Configuration Cache
Adapted from http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx
Stop the OWSTIMER service on ALL of the MOSS servers in the farm.
C:\ProgramData\Microsoft\SharePoint\Config\GUID\
NOTE: ONLY THE XML FILES, NOT THE .INI FILE: Delete all the XML file in the directory.
Open the cache.ini with Notepad and reset the number to 1. Save and close the file.
Start the OWSTIMER service on the Index server and wait for XML files to begin to reappear in the directory.
After you see XML files appearing, repeat steps 2, 3 & 4 on each server, waiting for XML files to appear before moving to subsequent servers.
Check the ULS Logs
Check the Windows Error Logs
There might be a SQL Server error, for example.
Delete the Destination Site Collection
Delete the destination Site Collection
get-spdeletedsite -webapplication http://samplesite.com | Remove-SPDeletedSite
Central Administration > 'Monitoring' > 'Review job definitions' > 'Gradual Site Delete' http://samplesite.com > 'Run Now' button.
Re-create the site collection with no template.
Delete the Content Deployment Path
Re-create the Content Deployment Path
Re-create the Content Deployment Job
Run Content Deployment Test
Run Content Deployment.
References:
http://blogs.technet.com/b/stefan_gossner/archive/2010/04/08/content-deployment-the-complete-guide-part-9-timerjobs.aspx
http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx
http://blogs.technet.com/b/stefan_gossner/archive/2009/01/16/content-deployment-best-practices.aspx?PageIndex=2
http://blogs.msdn.com/b/jamesway/archive/2011/05/23/sharepoint-2010-clearing-the-configuration-cache.aspx
http://server/Lists/Content%20Deployment%20Jobs/AllItems.aspx
Restart the timer service on each web server:
With PowerShell:
$serviceName = "SPTimerV4"
$serverNames = get-content "ServerNames.txt"
foreach ($serverName in $serverNames)
{
write-host "Restarting SharePoint Timer service on" $serverName
$serviceObj = Get-Service -Name $serviceName -ComputerName $serverName -ErrorAction Stop
Restart-Service -InputObj $serviceObj -erroraction stop
}
Clear the SharePoint Configuration Cache
Adapted from http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx
Stop the OWSTIMER service on ALL of the MOSS servers in the farm.
C:\ProgramData\Microsoft\SharePoint\Config\GUID\
NOTE: ONLY THE XML FILES, NOT THE .INI FILE: Delete all the XML file in the directory.
Open the cache.ini with Notepad and reset the number to 1. Save and close the file.
Start the OWSTIMER service on the Index server and wait for XML files to begin to reappear in the directory.
After you see XML files appearing, repeat steps 2, 3 & 4 on each server, waiting for XML files to appear before moving to subsequent servers.
Check the ULS Logs
Check the Windows Error Logs
There might be a SQL Server error, for example.
Delete the Destination Site Collection
Delete the destination Site Collection
get-spdeletedsite -webapplication http://samplesite.com | Remove-SPDeletedSite
Central Administration > 'Monitoring' > 'Review job definitions' > 'Gradual Site Delete' http://samplesite.com > 'Run Now' button.
Re-create the site collection with no template.
Delete the Content Deployment Path
Re-create the Content Deployment Path
Re-create the Content Deployment Job
Run Content Deployment Test
Run Content Deployment.
References:
http://blogs.technet.com/b/stefan_gossner/archive/2010/04/08/content-deployment-the-complete-guide-part-9-timerjobs.aspx
http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx
http://blogs.technet.com/b/stefan_gossner/archive/2009/01/16/content-deployment-best-practices.aspx?PageIndex=2
http://blogs.msdn.com/b/jamesway/archive/2011/05/23/sharepoint-2010-clearing-the-configuration-cache.aspx
Friday, April 12, 2013
Delete Users from Site Collection
/_layouts/people.aspx?MembershipGroupId=0 > Check the user's checkbox > 'Actions' dropdown > 'Delete Users from Site Collection'
Wednesday, April 10, 2013
MCSM SharePoint 2013 Recommended Reading List - Just the Links
Sunday, January 27, 2013
SQL Server Management Studio - Run As Another Domain User
To create a shortcut to SQL Server Management Studio using a different windows domain user:
Right-click your desktop > 'New' > 'Shortcut' > 'Type the location of the item:' > C:\Windows\System32\runas.exe /netonly /user:sampledomain\sampleuser "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" > 'Type a name for this shortcut' > 'SampleUser SQL Server'
Right-click your desktop > 'New' > 'Shortcut' > 'Type the location of the item:' > C:\Windows\System32\runas.exe /netonly /user:sampledomain\sampleuser "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe" > 'Type a name for this shortcut' > 'SampleUser SQL Server'
Sunday, January 13, 2013
LINQ to EF - Concatenation
var sampleQuery = from s in dbContext.SAMPLE
select new
{
s.COLUMN_ONE,
CONCAT = s.COLUMN_TWO + " " + s.COLUMN_THREE
};
select new
{
s.COLUMN_ONE,
CONCAT = s.COLUMN_TWO + " " + s.COLUMN_THREE
};
Saturday, January 5, 2013
EF Error - Update Model from Database
ADO.NET Entity Framework (ASP.NET 3.5), SharePoint 2010
Visual Studio 2010
Attempted to 'Update Model from Database'
Received the following error:
Calling 'Read' when the data reader is closed is not a valid operation.
Resolution:
Restarted SQL Server.
Visual Studio 2010
Attempted to 'Update Model from Database'
Received the following error:
Calling 'Read' when the data reader is closed is not a valid operation.
Resolution:
Restarted SQL Server.
Subscribe to:
Posts (Atom)