-
PROBLEM: When attempting to deploy a solution from Visual Studio you get an access error that includes this code – “SPUserCodeV4”
-
SOLUTION: Go to Central Administration -> System Settings. Under the “Server” heading go to “Manage Services on Server.” Look for “Microsoft SharePoint Foundation Sandboxed Code Service” and enable it. If that doesn’t work, go to the Security item in the sidebar. Under the “General Security” heading, go to “Configure service accounts.” Each service has to have a user account assigned to it. Silly. I know. Select “Windows Service – Microsoft SharePoint Foundation Sandboxed Code Service” from the dropdown, and leave YourBelovedandVeryImportantCustomer\spadmin as the account.
-
PROBLEM: When running a user control that contains UserProfileManager, you get an error that says the object cannot be found
-
SOLUTION: UserProfile Service has to be started in Central Admin. Follow the directions above, but enable both UserProfile services. You will be prompted to assign an account. Leave the account as YourBelovedandVeryImportantCustomer\spadmin. Reset IIS.
-
PROBLEM: All your list searches return null. OR a programmatic list update fails.
-
SOLUTION: Look at how you are creating your SPWeb item. If you are setting it equal to a local site, make sure the list is on that site. Here’s some handy code to get to the top level of the site without any items to dispose:
using (SPSite site = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.List[ "TheNameOfYourList" ];
}
}
*Edit: SPContext objects should not be disposed, see Jason's absolutely
correct comment below!
|
-
PROBLEM: On a filtered list, you cannot select a value if it is the only row.
-
SOLUTION: This one eluded me for a little while. In the “Miscellaneous” category of the web part editor panel, there is a “Send first row to connected web parts…” item. Initially this seems to just control when in the page life the data is sent. HOWEVER… In typical SharePoint non-logic logic… this actually means “select first row by default.” The data binding event occurs regardless, except the datarow is empty if there is no selected row. Oh SharePoint, you poorly-worded rascal!
-
PROBLEM: “File Not Found” error. OR User Profile service cannot be accessed at all.
- If you are only experiencing the first issue do this:
- Go to Central Admin > Application Management > Manage Services on Server
- Start the following:
- Microsoft SharePoint Foundation Web Application
- Managed Metadata Web Service
- SharePoint Server Search
- If you still have a file not found error, restart IIS.
- If you STILL have a file not found error, restart SharePoint Web Services in IIS Manager manually
- If you are having user profile service issues, do the above, then check the following:
- Go to Start > Administrative Tools > Services
- Both forefront identity managers need the following settings –
- Make sure they are both disabled (SP will start them automatically)
- Right click the service name and go to properties. Click the “Log On” tab. Chck “This Account” and put the farm account in. On our server its UCLA\SPAdmin, password is “password”
- Go to Start and enter “MMC” in search. Open the management console.
- Go to “Add snapins” in the file menu
- Add “Certificates”
- Select Computer account for the account
- Select local machine for the machine
- In The following three places, look for security certificates that begin with “Forefront”
- Personal > Certificates
- Trusted Root Certification Authorities > Certificates
- Trusted People > Certificates
- If none of the certificates exist, that’s fine. If they do, delete them.
- Follow the steps in Spence Harbar’s post here: To delete the current user profile service and create a new one.
- After all this reset IIS.
- If you still can’t connect, check Central Admin > Application Management > Service Application – Configure Service Application Associations
- Make sure the web app has the User Profile Service proxy enabled.
|
After you delete your current service, you may want to delete the Application Pool so that you can create a new one with a logical name. (The default is “User Profile Services Application” and it’s a pain to have to create new pools with new names all the time, but it’s nice to just clear the old one out and try again)
- Run PowerShell as an administrator, and enter do the following:
- enter Add-PSSnapin Microsoft.SharePoint.PowerShell
- enter Get-SPServiceApplicationPool
- Copy the name of the pool you want to delete
- enter Remove-SPServiceApplicationPool “Name of my pool”
- Keep the quotes around the name
|
-
- If you are still experiencing problems, you may want to restart all the associated machines.
- If you do this, you may need to:
- go to the your DB machine and open the sql config manager. Make sure all the services are started
- On both the APP and WFE machines, make sure user profile service and all of the sharepoint services started back up.
- If you get an error that the configuration database is unavailable from Central Admin, then you need to double check all the services on the DB machine from sql config manager. If you miss a single one, you may not be able to access SQL.
- BREATHE.
- Pour one out for Mr. Gates.
- Go to bed.
Share the post "4 Common SharePoint Issues–And How to Solve Them"
Related posts:
Your code sample is wrong. You should NEVER dispose of the SPContext.Current.Site object.
Check: http://msdn.microsoft.com/en-us/library/aa973248(v=office.12).aspx