On my local SharePoint server, Timer Service gives me an error "The service could not be started due to logon failure".
Initially I thought that, there is a need to enable some service from the Central Administration. Later realized that the issue is in the service itself.
The issue is fixed after setting of proper password within the service properties.
Friday, July 15, 2011
Thursday, July 7, 2011
Fixing error "Cannot generate serialization assembly"
Recently on my development machine I faced this error in Visual Studio. The error occurred at the build a project, and that project is already in use on the local machine.
Now, the problem here is, out the error message nothing clearly come out. After further research I found that the output dll is already present in GAC and after removing that dll, the project showed successful build.
Cheers!!
Somu
Now, the problem here is, out the error message nothing clearly come out. After further research I found that the output dll is already present in GAC and after removing that dll, the project showed successful build.
Cheers!!
Somu
Friday, June 24, 2011
Shrink Database
While working with MOSS and Project Server I noticed the physical hard disk size is growing rapidly and captured a lot of space. After opening the database files I found the DB log file taking huge space.
Following Database script is executed on SQL Server to Shrink the size of the log files. It is very effective to reduce the size.
USE XXX_MOSS_Config
Cheers!!!
Following Database script is executed on SQL Server to Shrink the size of the log files. It is very effective to reduce the size.
USE XXX_MOSS_Config
GO
ALTER DATABASE XXX_MOSS_Config SET RECOVERY SIMPLE
DBCC SHRINKFILE(N'XXX_MOSS_Config_log', 1)
ALTER DATABASE XXX_MOSS_Config SET RECOVERY FULL
GO
Cheers!!!
Creating Custom Application Pages in MOSS
On a development cycle, you might need to create several custom Application Pages, which will be stored in Layouts\FolderName\YourPage.aspx.
While creating the page the base class need to inherit is "LayoutsPageBase"
Here is a blog specified about the steps for creating the pages.
Now, the challenge is, when you create such Application page for Anonymous Access, the user asked for a log in. Means the Anonymous user redirected to the login page.
To avoid such scenario, there is another base class need to inherit "UnsecuredLayoutsPageBase"
The code of the page will look like this:
Somu
While creating the page the base class need to inherit is "LayoutsPageBase"
Here is a blog specified about the steps for creating the pages.
Now, the challenge is, when you create such Application page for Anonymous Access, the user asked for a log in. Means the Anonymous user redirected to the login page.
To avoid such scenario, there is another base class need to inherit "UnsecuredLayoutsPageBase"
The code of the page will look like this:
protected partial class CustomPage : UnsecuredLayoutsPageBaseOn the same page, following method also need to be added for smooth functioning:
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
protected override bool AllowAnonymousAccessCheers!!
{
get
{
return true;
}
}
Somu
Monday, May 2, 2011
Read Project Server Custom Fields value from the database
There is a standard method of accessing Project Server data and Custom Fields information. That is create web service reference with PSI. Recently I have created a report of Projects with custom field values with some business requirements. Now, the the loading time of the report is very high and that is causing huge dissatisfaction.
After some searching I found a Project Server database view, which contains all the project information with custom fields values. The name of the view is MSP_EpmProject_UserView and it is present in Reporting DB.

Once you are able to find the view, then you can write query according to your needs.
Cheers,
Somu
Friday, April 29, 2011
Custom ASPX page and automatic deployment in SharePoint
For a particular project, I was required to built a couple of custom pages and deploy them with a WSP.
For the solution, we first need to create a Class Library project. First, create a folder structure from 12 hive, as shown below. Under layouts folder, place the ASPX pages. Then I add a folder named "ApplicationPages" and add the code behind C# files.
For the solution, we first need to create a Class Library project. First, create a folder structure from 12 hive, as shown below. Under layouts folder, place the ASPX pages. Then I add a folder named "ApplicationPages" and add the code behind C# files.
The Folder "ApplicationPages" is required, otherwise we can also have a folder name as "FeatureCodes". These are names that SharePoint understand well.
Next, for each of the code behind C# files, a common Namespace has been set and a separate class name is defined.
And on the ASPX page, we need to specify the assembly info. For that the project need to sign with a string name, then built and finally get Public Key Token with a tool. Here is my blog for easy retrieval of Public Key Token.
On each of ASPX page, we have to set the Assembly info, Public key token in the page directive area.
After that, build the project, and create a WSP using WSP builder. Finally deploy the WSP with a STSADM command.
Cheers...
Somu
Tuesday, March 22, 2011
An unhandled exception ("System.MissingMethodException") occured in "ApplicationName" [22956]
In my day to day development work I faced this issue today. I am having a Class Library with several methods in it. This class library also takes several web service references. Now, I created a Console Application and take the assembly reference of this class library. And when I tried to run the Console Application, following error message is generated:
An unhandled exception ("System.MissingMethodException") occured in "ApplicationName" [22956]
I got no clue after reading this message, since it is a very generic error message. I deleted the assembly reference and restarted the Visual Studio a couple of times. But no luck, the problem remains the same.
After following a reference on the net, I learnt that the Class Library I created should have at least one default constructor. Otherwise you may get this kind of ambiguous error message.
It saved my day!!!
An unhandled exception ("System.MissingMethodException") occured in "ApplicationName" [22956]
I got no clue after reading this message, since it is a very generic error message. I deleted the assembly reference and restarted the Visual Studio a couple of times. But no luck, the problem remains the same.
After following a reference on the net, I learnt that the Class Library I created should have at least one default constructor. Otherwise you may get this kind of ambiguous error message.
It saved my day!!!
Subscribe to:
Posts (Atom)