And guess it works. Well when you dont have permission on the Admin_content db then this issue will occur.
The below command will also help you check the permission
stsadm -o enumsites -url http://yoururl
MCP: Developing Microsoft SharePoint Server 2013 Advanced Solutions
MCTS: SharePoint 2010, Application Development
MCTS: Microsoft Windows SharePoint Services 3.0, Application Development
MCP 2.0 -- Certified Profession
stsadm -o enumsites -url http://yoururl
Well,
Many of the SharePoint are working on the SharePoint for a long time. Many of then also started working in the SharePoint 2010. Their are many things that SharePoint 2010 made easier then from SharePoint 2007/Moss. Many improvements are given to the SharePoint to that it can build a better solution.
If you have been reading about exciting new features of SharePoint 2010 you probably heard about something called SandBox Solutions. What is the Sandbox solution?
SharePoint is a rich development platform with a large community actively developing solutions. The challenge, however, has always been the balance between creating solutions and deploying them in a way that you can trust will not damage or impair the SharePoint farm. Sandboxed solutions, new in SharePoint 2010, address this by allowing site collection administrators to deploy solutions that are safe to run. Sandboxed solutions are restricted to running under a subset of the SharePoint API and the framework can monitor these solutions and shut down any that risk the stability of the farm.
SandBox Solutions support the following SharePoint item types:
Development
For developing a sandbox solution you have to just create a new blank SharePoint Solution in Visual Studio 2010. Go to properties of the solution and change the solution type to true.
Deploying Sandboxed Solutions
The structure of a sandboxed solution is very similar to a farm solution, which generally runs with full-trust permissions. The main differences lie in how a sandboxed solution is deployed and in the process that hosts the solution (which determines whether a solution is a sandboxed solution or a farm solution). This means that the same sandboxed solution can run with full trust when it’s deployed at the farm level and with partial trust when it’s deployed at the site collection level.
Hi,
Paging in the SharePoint 2010 list is done using the
SPListItemCollectionPosition
ListItemCollectionPosition
Gets or sets an object that is used to obtain the next set of rows in a paged view of a list. The below code I have refined from the following link. It will return the given page like page 3, items say 4.
public static SPListItemCollection ExecuteCAMLToRetrieveListItemsInPages( string listName, string viewName,
string caml, string[] columnNames, int pageIndex, int pageItemCount)
{
SPListItemCollection postDetailsItems = null;
using (SPSite Site = new SPSite(SPContext.Current.Site.Url))
{
using (SPWeb sharePointWeb = Site.AllWebs[XYZ])
{
// Check if the SharePoint web object is not null or not.
if (sharePointWeb == null)
{
}
// Get the Post List
SPList postList = sharePointWeb.Lists[listName];
// Get the SPLIst View
SPView listView = postList.Views[viewName];
SPQuery query = new SPQuery(listView);
query.Query = caml;
// Retrieve the items for the last page. E.g.: If request is for 5th page and item count/page=10 then row limit will retrieve
//40 items and 40th item will be used to get the column details which will be used for pagination.
query.RowLimit = (uint)(pageItemCount * (pageIndex - 1));
postDetailsItems = postList.GetItems(query);
// Get the previous page last item position. Use this item to retrieve the column details which will be used for pagination.
int previousPageLastItemPosition = postDetailsItems.Count - 1;
StringBuilder columnBuilder = new StringBuilder();
// Form the paging filter query string
if (columnNames != null)
{
foreach (string column in columnNames)
{
// Make sure that if the field value is mandatory and if you are passing it as NULL then SPList.GetItems will throw exception.
string columnValue =
(postDetailsItems[previousPageLastItemPosition][column] == null) ? string.Empty : postDetailsItems[previousPageLastItemPosition][column].ToString();
// Check if the value is null or empty
columnBuilder.Append("&p_" + column + "=" + columnValue);
}
}
query = new SPQuery(listView);
query.Query = caml;
// Create Paging Information which will be used for retrieving paging based items
SPListItemCollectionPosition objSPListColPos = new SPListItemCollectionPosition("Paged=TRUE" + columnBuilder.ToString());
query.RowLimit = uint.Parse(pageItemCount.ToString());
query.ListItemCollectionPosition = objSPListColPos;
// Execute the CAML query.
postDetailsItems = postList.GetItems(query);
}
} return postDetailsItems;
}
Hi,
Today my SharePoint 2010 Admin database automatically set to status Suspect.
SharePoint_AdminContent_c92d3a99-1800-4cac-b986-7e380ea42454(Suspect)I search for that issue and I got the solution which is below
EXEC sp_resetstatus 'SharePoint_AdminContent_c92d3a99-1800-4cac-b986-7e380ea42454'
ALTER DATABASE [SharePoint_AdminContent_c92d3a99-1800-4cac-b986-7e380ea42454] SET EMERGENCY
DBCC checkdb('SharePoint_AdminContent_c92d3a99-1800-4cac-b986-7e380ea42454')
ALTER DATABASE [SharePoint_AdminContent_c92d3a99-1800-4cac-b986-7e380ea42454] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB ('SharePoint_AdminContent_c92d3a99-1800-4cac-b986-7e380ea42454', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE [SharePoint_AdminContent_c92d3a99-1800-4cac-b986-7e380ea42454] SET MULTI_USER
Hi again,
Now these days I am working for the SharePoint 2010 internet facing or public facing publishing site. No doubt's we are using the OOTB publishing features of the SharePoint 2010 publishing, content types, approval workflows etc.
Well, in that site I am developing the custom web parts for the site in the Visual Studio 2010 version 10.0.30319.1 RTMRel. In this or before VS 2010 we have the .net framework 3.0 in which HtmlGenericControl which is present in the System.Web.UI.HtmlControls namespace. It will help us to build the custom UI for the web part instead of maintaining HTML in the web part and render to output(HTMLTextWriter).
You can create any of the HTML tag from HtmlGenericControl this like div, table, table row, table column and that will be very easy to manage in the code.
How this will work ?
In the code we have to add reference for the control and declare the HtmlGenericControl control in the class like :
HtmlGenericControl divSponser_Blogs_Contatiner;In the CreateChildControl or any method where you are creating the UI for the web part you can instantiate it.
divSponser_Blogs_Contatiner = new HtmlGenericControl("div");You can also set its properties like CSS class or its attributes in the control after instantiate.
divSponser_Blogs_Contatiner.Attributes.Add("class", "Sponser-Blogs-Contatiner");
or likedivSponser_Blogs_Contatiner.Attributes.Add("id", "Sponser_Blogs_Contatiner");if you wnat to create table from HtmlGenericControl then you have to just replace div with table.
divSponser_Blogs_Contatiner = new HtmlGenericControl("table");Well this post will help you to create rich UI web parts for the SharePoint and it will also make easy to mage and create the custom web parts from the .net framework.
Hi all,
Now these day I was busy with some SharePoint 2010 project. One of my project I have to configure Form Based authentication for the site. In this configuration we didn't use the default Asp.Net providers for authentication.
“ASP.NET membership is designed to enable you to easily use a number of different membership providers for your ASP.NET applications. You can use the supplied membership providers that are included with the .NET Framework, or you can implement your own providers.”
So I have create or we can implemented the custom provider class with custom SQL database and tables. We have inherited the asp.net abstract classes “MembershipProvider” and “RoleProvider” in our custom classes. The project is class library project for creating DLL, e have to used for installing in GAC.
This Membership Provider class have following following structure:
Variables
private int newPasswordLength = 8;
private string connectionString;
private string applicationName;
private bool enablePasswordReset;
private bool enablePasswordRetrieval;
private bool requiresQuestionAndAnswer;
private bool requiresUniqueEmail;
private int maxInvalidPasswordAttempts; private int passwordAttemptWindow;
private MembershipPasswordFormat passwordFormat;
private int minRequiredNonAlphanumericCharacters;
private int minRequiredPasswordLength;
private string passwordStrengthRegularExpression;
private MachineKeySection machineKey; //for encryption
Properties
Method which I have implemented:
And the methods which I have not Implemented:)
Their are some other helper methods also there like encryption for password. Similarly I have implemented role providers. Well you can get both the classes from here.
Some more configuration you have to make for the SharePoint 2010 FBA like STS, Central Admin and your port 80(primary web app) application. I have manually manipulated all web.config files of application and they are working.
Enjoy :)
SharePoint 2007 and MOSS 2007 are built on ASP.Net 2.0 which means they can leverage many of the same features of ASP.Net 2.0 including the AspNetSqlMembershipProvider for use with Forms Based Authentication. There are great guides to configuing FBA: Andrew Connell had the best article first.
When we Creating Two Web Applications, One For Each Authentication Mechanism on same port(As 80) then you have to add host headers from which the application will be browsed. But the when you create the web application with host headers(as extranet or internet) then the URL does not resolved. It will does not display your site. To resolve this you have add DNS entry for that and also configure AAM for the same.
When we create site collection and above all settings done, then it prompts for the login. But after giving credentials it again and again prompts for the credentials and we cannot browse over site.
After goggling on this issue I have found solution of this issue at one link.
At above all the configuration steps I think It would help you in configuring FBA on SharePoint 2007.
Create a new SharePoint empty project. Create a hierarchy in that like below.
Element.XMl
When we create a solution for SharePoint(like a feature) then when we use SharePoint Empty project template in visual studio 2008 then it creates a default namespace VeWSE instead of the solution name.
default namespace
So, when we activate feature or inherit another class in that then we have get the error “systemexceptionempty”. Because we provide
ControlAssembly="CustomActionControlClass, Version=1.0.0.0, Culture=neutral, PublicKeyToken=abf59b3ca9443f64"
ControlClass="CustomActionControlClass.MyCustomAction"
in element.xml file. And the actual namespace is VeWSE.Namespace.ClassName.
Workaround
Delete the default namespace from that project properties.