08 April, 2009

Server Error in '/' Application. The resource cannot be found.

Few Days before, in our project, we faced one issue while browsing the site. Don’t know, what gone wrong but got error message as mentioned below:-

Server Error in '/' Application.
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly
The resource cannot be found.

Even if you have activated the possibility to see errors and trace in SharePoint (Web application web.config --> callstack="true", customerror="off", debug="true") you won't have a precise indication of what ressource is missing.

How to troubleshoot this error message? Here is the answer...
There are two ways by which you can resolve this error message:-

Method: 1
Just right click your page and choose "view source"

Method: 2
Under the root path in IIS configuration, under "Home Directory"under the field "local path". "c:\inetpub\mywebsite\" is not the same as "c:\inetpub\mywebsite" apparently now.

My site came back alive as soon as I removed the trailing backslash so that the path now says "c:\inetpub\mywebsite"

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

07 April, 2009

Error Scheduling Crawls: Access is Denied (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

When you set up your SSPs one of the things you will come across is Crawl Scheduling. This comes under Search Settings and allows you to configure Incremental Crawls and Full Crawls to the frequency you would like. For example, Full crawl once a day, Incremental Crawl every 5 minutes of each day.

When we tried to set the schdule incremental crawl, we faced this error message. When we filled out all the information and tried to click on Ok.

When I hit Ok I received the error:
ACCESS is DENIED. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Resolution:-
To fix this you need to add the account WSS_WPG to the C:\Windows\Tasks folder on your Index server and apply modify rights.

If you cannot see the Security tab on the Tasks folder you need to open a command prompt and type is:
attrib -s %windir%\tasks

When you right click on the tasks folder having done this you should be able to see the Sharing & Security option.

To remove the option once you have applied the changes to the folder open command prompt again and type:
attrib +s %windir%\tasks

I hope the above steps helps you to resolve this issue. All the Best!

.swf Files Won't Play in IE7

Few days before, when i tried to put shockwave pages (.SWF files) in pageviewer webparts, it did not work. After doing some research and troubleshooting, i compare my two systems: one was using IE 6.0 and other was using IE 7.0

The .SWF files are working fine in the machine where IE 6.0 is present but the problem is with the IE 7.0. I understand this arises from a security "feature" in IE7 that blocks "Cross-Domain" shockwave objects.

I found there's a registry hack that disables this "feature."

Solution for this as mentioned below:-
Create a key named HKLM\Software\Microsoft\Internet Explorer\Main\Feature Control\FEATURE_BLOCK_LMZ_SCRIPT and add a REG_DWORD value to the key of 0 which should show up as 0x000000 (0)

Now my page views with .swfs in them work just fine.

Cheers!!!

Happy SharePoint to all of you…

Post Mortem of SharePoint Content Database + common queries that we can run against the content databases

Conttent Database plays a very important role in SharePoint.There are some cases when we need to look into and read from the content databases.

NOTE: Never update any SharePoint database directly. Always use the SharePoint API (Object Model) for any updates.

Before beginning the postmortem of sharepoint content database, lets focused on basic sharepoint tables as how excately they function.
Features:Table that holds information about all the activated features for each site collection or site.
Sites:Table that holds information about all the site collections for this content database.
Webs:Table that holds information about all the specific sites (webs) in each site collection.
UserInfo:Table that holds information about all the users for each site collection.
Groups:Table that holds information about all the SharePoint groups in each site collection.
Roles:Table that holds information about all the SharePoint roles (permission levels) for each site.
AllLists:Table that holds information about lists for each site.
GroupMembership:Table that holds information about all the SharePoint group members.
AllUserData:Table that holds information about all the list items for each list.
AllDocs:Table that holds information about all the documents (and all list items) for each document library and list.

Here are some common queries that we can run against the content databases.
--Query to get all the top level site collections
SELECT SiteId AS SiteGuid, Id AS WebGuid, FullUrl AS Url, Title, Author, TimeCreatedFROM dbo.WebsWHERE (ParentWebId IS NULL)

--Query to get all the SharePoint groups in a site collection
SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.Groups.ID AS Expr1, dbo.Groups.Title AS Expr2, dbo.Groups.DescriptionFROM dbo.Groups INNER JOINdbo.Webs ON dbo.Groups.SiteId = dbo.Webs.SiteId

--Query to get all the users in a site collection
SELECT dbo.Webs.SiteId, dbo.Webs.Id, dbo.Webs.FullUrl, dbo.Webs.Title, dbo.UserInfo.tp_ID, dbo.UserInfo.tp_DomainGroup, dbo.UserInfo.tp_SiteAdmin, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_EmailFROM dbo.UserInfo INNER JOINdbo.Webs ON dbo.UserInfo.tp_SiteID = dbo.Webs.SiteId

--Query to get all the members of the SharePoint Groups
SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_LoginFROM dbo.GroupMembership INNER JOINdbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER JOINdbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID

--Query to get all the sites where a specific feature is activated
SELECT dbo.Webs.Id AS WebGuid, dbo.Webs.Title AS WebTitle, dbo.Webs.FullUrl AS WebUrl, dbo.Features.FeatureId, dbo.Features.TimeActivatedFROM dbo.Features INNER JOINdbo.Webs ON dbo.Features.SiteId = dbo.Webs.SiteId AND dbo.Features.WebId = dbo.Webs.IdWHERE (dbo.Features.FeatureId = '00BFEA71-D1CE-42de-9C63-A44004CE0104')

-- Query to get all the users assigned to roles
SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_LoginFROM dbo.RoleAssignment INNER JOINdbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOINdbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOINdbo.UserInfo ON dbo.RoleAssignment.PrincipalId = dbo.UserInfo.tp_ID

--Query to get all the SharePoint groups assigned to roles
SELECT dbo.Webs.Id, dbo.Webs.Title, dbo.Webs.FullUrl, dbo.Roles.RoleId, dbo.Roles.Title AS RoleTitle, dbo.Groups.Title AS GroupNameFROM dbo.RoleAssignment INNER JOINdbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOINdbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOINdbo.Groups ON dbo.RoleAssignment.SiteId = dbo.Groups.SiteId AND dbo.RoleAssignment.PrincipalId = dbo.Groups.ID

These are just some of the common queries that I have used against the content database.

Enjoy!!!

06 April, 2009

Office Server Search Service cannot be started because it does not exist.(Object reference not set to an instance of an object)


Office Server Search Service cannot be started because it does not exist.
Few Days before, I tried to setup my lab and after the installation, i tried to start the search service but mystery is here, when i checked CA-operations-services on server-OSEARCH is not there. I have the right key , the right CD and the latest fixes.I installed it and it is simply not there.
As you can probably guess, there’s nothing wrong with your PC or Cd or key, you simply did not installed the server in the correct way to receive all the services.

Please check:-
regedit and check the value under the following key :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS\
ServerRole
Possible options:
WFE
APPLICATION
SINGLESERVER

Each option means :
WFE - Windows SharePoint Services Web Application (no search , no excel, no ssp, just web server)
APPLICATION –Everything (and you can add the server to a farm)
SINGLESERVER –Everything (but you cannot add the server to a farm , and most probably you have MSDE or SQL Server Express on the box too)

To change the installation mode for the server (even if you managed to create webapplications and set-up your sharepoint config db), here’s the procedure:
-Detach the server from the farm
-Uninstall Sharepoint
-Reboot the server
-Re-install Sharepoint in Advanced mode and select your desired server role.
-Run the configuration wizard and re-attach the server to the original farm (config_db)
You should get the applications back and everything else in place, as they were but with new services in the farm.