What’s my SharePoint 2010 Content Database ID?
Posted: March 16, 2010 Filed under: Powershell, SharePoint 2010, Troubleshooting Leave a comment »There are several commands that may require you to pass in a SharePoint Content Database ID. PowerShell makes it easy, just use the Get-SPContentDatabase command.
Pass in the WebApplication Parameter to get a list of all of your Content Databases for that Web Application:
Need to know the Content Database of a specific site (web)? Just pass in the site parameter:
For a complete list of SharePoint 2010 Content Database Powershell cmdlets go to
http://technet.microsoft.com/en-us/library/ee890116(office.14).aspx
Solution to: “An error occurred while accessing SharePoint AddGallery, Please Try Again” on SharePoint 2010
Posted: January 6, 2010 Filed under: Administration, SharePoint 2010, Troubleshooting 2 Comments »I ran into the following error while creating a SharePoint library while trying to troubleshoot a completely unrelated problem: “An error occurred while accessing SharePoint AddGallery, Please Try Again”
Not very descriptive. A quick look at the event viewer revealed the following Warning:
“Alternate access mappings have not been configured. Users or services are accessing the site
http://imapc
with the URL
http://localhost
. This may cause incorrect links to be stored or returned to users. If this is expected, add the URL
http://localhost
as an AAM response URL. For more information, see: http://go.microsoft.com/fwlink/?LinkId=114854″/>”
Of course accessing the site via the correct Url is the easiest way to solve it. If you need to add the Alternate Access Mapping, you can do so from “Central Administration > Application Management > Configure Alternate Access Mappings”
SharePoint 2010 on Windows 7 Exception – UserProfileException: Unrecognized attribute ‘allowInsecureTransport’
Posted: November 23, 2009 Filed under: Administration, Hotfixes, SharePoint 2010, Troubleshooting 5 Comments »If you tried installing SharePoint 2010 Beta 2 on Windows 7 (or Windows Server 2008 R2) shortly after its release; you may have ran into the following error:
Failed to create sample data.
An exception of type Microsoft.Office.Server.UserProfiles.UserProfileException was thrown. Additional exception information: Unrecognized attribute ‘allowInsecureTransport’. Note that attribute names are case-sensitive. (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\WebClients\Profile\client.config line 56)
Microsoft.Office.Server.UserProfiles.UserProfileException: Unrecognized attribute ‘allowInsecureTransport’.
This error is caused by a known issue with Token Authentication and WCF. A fix has been released and is now available at
http://go.microsoft.com/fwlink/?LinkID=166231
.
If you didn’t uninstall after receiving the error, simply install the hotfix, and re-run the SharePoint 2010 Products Configuration Wizard.
HTTP Error 403 – Forbidden with Custom or Updated Features and Application Pages
Posted: August 31, 2009 Filed under: Best Practices, Development, Feature Development, Features, IIS, SharePoint, Troubleshooting Leave a comment »This is a fairly common and non-descriptive error that continues to surface more and more as the SharePoint developer community continues to grow. Surprisingly, I’ve found very little information in the web regarding what I believe to the most common cause and solution (hence this blog post).
Many things can trigger this error, and as you might expect by the description the error is security/permissions related. I’ve seen it most often, when browsing the Site Features and Site Collection Feature pages… but it has been known to take down a whole site; although mostly (and luckily) in dev environments.
So why do I keep referring back to development? And more importantly, what is this “most common” cause/solution? Its mostly tied to “drag and drop”; when you drag and drop files, permissions usually go with them (albeit there are a few exceptions.) With development rarely taking place directly in the 12 hive features, or layouts folder; its shouldn’t be surprising to see developers (and administrators alike) deploying and often testing changes to features by dragging and dropping files from their Desktop, My Documents, or project folders. Naturally this approach doesn’t follow best practices, but I wont deny having made the mistake while testing a quick change to a feature or elements xml file in a development environment. All updates to production environments should be done via WSPs.
So how do you solve the problem? Finding the culprit shouldn’t be too difficult, think of any items that have been recently deployed/updated. Cant think of any, search for any recently updated files of folders. If you do think of or find any; check the permissions and make any required modifications; also consider redeploying them via a WSP.
So what’s my Web Application Pool Process ID (in Windows Server 2003)
Posted: April 15, 2009 Filed under: IIS, Tools and Utilities, Troubleshooting 3 Comments »Have you ever noticed your WFE server crawling, and then ran Task Manager to find the Memory Usage of some of your w3wp.exe process through the roof. You need to know which process is tied to which application pool to begin troubleshooting. How do you get this information? OK, so this is nothing new, and definitely not specific to SharePoint. But it does come in handy, and I never seem to remember exactly how:
1. From Task Manager, select View > Select Columns
2. Put a check mark next to “PID (Process Identifier)” and click “OK”
3. Open the command prompt
4. Run the following command:
%systemroot%\system32\cscript.exe %systemroot%\system32\iisapp.vbs
The above should result in an output similar to the following:
Notice how each w3wp process is tied to a specific application pool. If you’ve properly labeled your Application Pools and are not using the same Application Pool for all of your IIS sites, this should give you a good place to start looking for problems. If responsiveness is severely hampered you may choose to recycle the the offending Application Pool without having to do an IIS Reset which would impact all of your other sites.
SharePoint Timer Jobs Running Multiple Times
Posted: April 10, 2009 Filed under: SharePoint, SharePoint Timer Jobs, Troubleshooting 4 Comments »I was recently brought into a client to help troubleshoot an issue with a SharePoint Timer Job, that appeared to be executing multiple times (around the same time) although it was scheduled to run only once daily. While others in the SharePoint community appeared to experience the same problem, no one seemed to be able to point to a cause.. much less a solution. In this case it was always running 9 times, significantly more than the three or four others where reporting.
After much digging around, and focusing on the magic number (why 9) it struck me. How many Content Databases did the client have on the web application that the Timer Job was associated with? 9 to be exact. It was doing what it needed to do based on how it had been developed, the developers failed to test it on a Web Application with more than one Content Database. From there on, fixing the code was simple.. but it may be different for you based on what your timer job needs to do. Remember every Site Collection (SPSite) has a property that gives you the Content Database, and every time a Timer Job is called (targeting a Content Database) the Content Database GUID for which it is running is passed in… use it for validation.
Anyhow, at the very least, if you are running into this problem this might help point you in the right direction.
For information on how to develop SharePoint Timer Jobs (SPJobDefinition) see Andrew Connells MSDN Article “Creating Custom Timer Jobs in Windows SharePoint Services 3.0”
Prescan Error: Exception scanning web, The system cannot find the file specified.
Posted: July 28, 2008 Filed under: prescan, SharePoint, Troubleshooting, Upgrade 3 Comments »Just recently, I ran into a problem running the prescan utility where a series of sites reported the following errors:
Error: Exception scanning web:
http://intraneturl/sites/samplesite
System.IO.FileNotFoundException: The system cannot find the file specified.
Error: The following site has not been scanned. Id = f3b05792-52a4-4a85-9b26-19905f23cf46 and Url = /sites/samplesite
Error: Prescan has encountered sites or lists that were not updated because they cannot be accessed using the SharePoint Products and Technologies object model. The most likely reasons for Prescan to skip a list are covered in the Knowledge Base article at:
http://go.microsoft.com/fwlink/?linkid=69958&clcid=0×409
.
The recommended Knowledge Base article indicates that the problem may be caused by database corruption which can be solved using the databaserepair command line operation of stsadm. Running the command should produce a list of orphaned objects. Calling the command again with the “deletecorruption” parameter would delete the orphaned objects.
But what if the command doesn’t find any orphaned objects? This was the problem I ran into. Running the databaserepair command would always produce the following response.
First I decided to take a look at the sites that where reporting the “Exception scanning web” error; opening these sites in the browser returned the following “list does not exist” error.
This led me to believe there might be something wrong with the site definition. With a little more research, I found that all of the sites reporting this error were in fact based on the same site definition.
Cause: As it turns out, the Site Definition used had been commented out in the “WebTemp.xml” file (I’ve seen many people do this to prevent certain site definitions from showing up in the list of available templates.)
Note: None of the sites identified by the error “The following site has not been scanned. Id = SOMEGUID and Url …..” were the cause of the problem; it was always a sub-site, specifically the ones that generated the “Exception Scanning Web” and “FileNotFoundException” errors.
Solution: Make sure any site definitions used are included in one of the “WebTemp.xml” files (they must not be commented out.) After correcting (or updating) the WebTemp.xml files, you’ll need to run an IISReset. You should then be able to browse the sites without receiving an error and re-run the prescan.exe utility (hopefully you wont run into something else).
