What is a distribution group?
Distribution group is a sharepoint goup which is used for distributing emails to more than one people. whenevenr we want to relay a email message for a group, than we need a distribution group. It need a email id for distribution group, and when we creates a distribution group in sharepoint than automatically a AD group is created.
In MOSS 2007, AD's Distribution group can not be added into people & groups. So MOSS 2007 has added this feature to link AD's DIstribution group with SP. Now you can create a distribution group in Sharepoint and it will creates group in AD.
There are three different places you can find for disribution group in sharepoint:
1. Central Admin (Central Administration > Operations > Incoming E-Mail Settings )
Configure Incoming E-Mail Settings
Set Enable sites on this server to receive e-mail? Yes, and Settings mode: Advanced
Incoming E-Mail Server Display Address
2. under Central adminitrator > Topology and Services, click on Approve/reject distribution groups. it will show view for approved distribution group.
create a new view for ViewAll and don't put any filter. ViewAll will show all the Dtribution groups. based on their status select group which is in pending stage. right click and click on approve.
3.go to people & users and go to groups & select a group. once group is selected than go to settings > group settings. In "E-Mail Distribution List" section, select yes for Create an e-mail distribution group for this group? , and then give the name for group. Click OK.
4.Create document library/list to recieve a incoming email - Create new document library/list. while creating the new list/lib a. select Allow this document library to receive e-mail? Yes, b. Type the email address under Incoming E-Mail section.
If you don't have proper securty at AD for sharepoint account than you will get these errors:
In Central Admin
Object reference not set to an instance of an object. at Microsoft.SharePoint.EmailIntegration.SPEWSApprovalManager.ExecuteJobInAD(Int32 listItemID)
at Microsoft.SharePoint.ApplicationPages.DMSCmdPage.BtnOk_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Troubleshoot issues with Windows SharePoint Services.
------------------------------------------------------------------------------------------------
While Change Group Settings (people & group > groups > select your group > settings > group settings)
The request failed with HTTP status 401: Unauthorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.SharePoint.DirectorySoap.SPDirectoryManagementProxy.CreateDistributionGroup(String Alias, String Name, String Description, String ContactCN, RequestInfo Info, DistributionGroupFlags Flags)
at Microsoft.SharePoint.SPGroup.CreateDMS(String dlAlias, String friendlyName, String description, String[] members, String requestor, String justification, Int32& jobId)
--------------------------------------------------------------------------------------------
Setup groups
Distribution group could not be updated because of the following error: The following error has occurred while attempting to contact the Directory Management Service: The request failed with HTTP status 401: Unauthorized.
I will keep posting with my findings.
Enjoy Green coding at www.code4green.com
Hussain Naqvi
Monday, February 14, 2011
Thursday, January 27, 2011
Get detailed sharepoint error - i.e. File Not Found. at Microsoft.SharePoint.Library
Here is the best way to find out the detailed error of sharepoint.
I was strugling with sharepoint errors for a long time and I have tried lots of options(trace log, log file, event viewer, etc) but nothing has goiven me the exact error.
Finally I got the very good tool which is giving detailed error, and it throw error on scree as soon as any Moss error occured on moss server.
Here is the error I was getting and I tried alot to find out that what is the meaning of this error or which file or template I am missing. but you can not get info from most of general log resources.
Error:
File Not Found. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)
at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPWeb Web, String strWebTemplate, Boolean bSharedNav, Boolean bOnTopNav, Boolean bOnQuickLaunch, Page page)
at Microsoft.SharePoint.ApplicationPages.NewSubwebPage.BtnCreateSubweb_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Finally I got the SPTraceViewer on codeplex (http://sptraceview.codeplex.com/). this SPTraceView does analyses in real time the trace messages coming from all MOSS components and it prompt you on machine.
See the attached screen, How detaled error it is giving for the same error message I have posted above.

Enjoy SPTraceViewer and once again thanks for the codeplex's developer for making such a nice tool.
Enjoy GreenCoding @ www.code4green.com
I was strugling with sharepoint errors for a long time and I have tried lots of options(trace log, log file, event viewer, etc) but nothing has goiven me the exact error.
Finally I got the very good tool which is giving detailed error, and it throw error on scree as soon as any Moss error occured on moss server.
Here is the error I was getting and I tried alot to find out that what is the meaning of this error or which file or template I am missing. but you can not get info from most of general log resources.
Error:
File Not Found. at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String& bstrWebTemplate, Int32& plWebTemplateId)
at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)
at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPWeb Web, String strWebTemplate, Boolean bSharedNav, Boolean bOnTopNav, Boolean bOnQuickLaunch, Page page)
at Microsoft.SharePoint.ApplicationPages.NewSubwebPage.BtnCreateSubweb_Click(Object sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Finally I got the SPTraceViewer on codeplex (http://sptraceview.codeplex.com/). this SPTraceView does analyses in real time the trace messages coming from all MOSS components and it prompt you on machine.
See the attached screen, How detaled error it is giving for the same error message I have posted above.

Enjoy SPTraceViewer and once again thanks for the codeplex's developer for making such a nice tool.
Enjoy GreenCoding @ www.code4green.com
Monday, January 24, 2011
Single-Quote('), double-quote ("), and Tilde (~) keys not recognizing in first hit
Hi,
I have seen this issue in some of the laptops, and the issue is that Single-Quote('), double-quote ("), and Tilde (~) keys not recognizing in first hit. I have searched over the web than I have found that lots of people are facing the same problem.
SO I thought I can write a blog for this issue.
My Laptop's configuration is:
OS - Windows 7 Home Premium, Brand- Acer, Model - Aspire 5741, Processor - Intel Core i3 M350
Problem - From the first day onward I am having this issue. First I was pressing twice these keys and in 2nd time it was writing the 2 characters(',",~).
Reason: Still I am looking the reason. Once I will have that I will post here.
Resolution: I have found the workaround. Keep typing as you do normal typing. So if you hit the key(which has the problem) it will not show at that time, but as soon as you press different key, it will show both typed characters.
i.e. I am typing with the same laptop which has this issue, and for test I have typed the following: "Human Resources". I have typed normally without any issue and it typed correctly.
The only issue I am having in this way: Space bar is not getting recognised in first hit after these keys(",',and ~).
I will keep doing more research and try to contact with Acer with this issue. Once I will have more info I will post here.
Please post your reply if you have the same issue.
Enjoy Green Coding @ www.code4green.com
I have seen this issue in some of the laptops, and the issue is that Single-Quote('), double-quote ("), and Tilde (~) keys not recognizing in first hit. I have searched over the web than I have found that lots of people are facing the same problem.
SO I thought I can write a blog for this issue.
My Laptop's configuration is:
OS - Windows 7 Home Premium, Brand- Acer, Model - Aspire 5741, Processor - Intel Core i3 M350
Problem - From the first day onward I am having this issue. First I was pressing twice these keys and in 2nd time it was writing the 2 characters(',",~).
Reason: Still I am looking the reason. Once I will have that I will post here.
Resolution: I have found the workaround. Keep typing as you do normal typing. So if you hit the key(which has the problem) it will not show at that time, but as soon as you press different key, it will show both typed characters.
i.e. I am typing with the same laptop which has this issue, and for test I have typed the following: "Human Resources". I have typed normally without any issue and it typed correctly.
The only issue I am having in this way: Space bar is not getting recognised in first hit after these keys(",',and ~).
I will keep doing more research and try to contact with Acer with this issue. Once I will have more info I will post here.
Please post your reply if you have the same issue.
Enjoy Green Coding @ www.code4green.com
Wednesday, December 29, 2010
Soltion for error: "The solution cannot be removed when a job is scheduled or running"
if you are getting the following error while deleting solution: The solution cannot be removed when a job is scheduled or running, that means your solution got corrupted while deployment and it is not retractable.
Even if you will see under operation in Central Administration( under "Solution Management"), it will not give you option to retract and it will show error without detail.
Here is the solution to remove corrupted soltuion from sharepoint 2007:
step-1:
get the job id using enumdeployments
stsadm -o enumdeployments
i.e. job id(2529c788-971c-46a3-b69f-a2a0a1fcc851)
step-2:
cancel deployment using job id
stsadm -o canceldeployment -id 2529c788-971c-46a3-b69f-a2a0a1fcc851
step-3:
once job id in step 2 is canceled than retract solution
stsadm -o retractsolution "Yoursolution.wsp" -immediate
step-4:
once retract is completed than delete solution
stsadm -o deletesolution "Yoursolution.wsp" -override
enjoy green coding using free www.code4green.com site
Even if you will see under operation in Central Administration( under "Solution Management"), it will not give you option to retract and it will show error without detail.
Here is the solution to remove corrupted soltuion from sharepoint 2007:
step-1:
get the job id using enumdeployments
stsadm -o enumdeployments
i.e. job id(2529c788-971c-46a3-b69f-a2a0a1fcc851)
step-2:
cancel deployment using job id
stsadm -o canceldeployment -id 2529c788-971c-46a3-b69f-a2a0a1fcc851
step-3:
once job id in step 2 is canceled than retract solution
stsadm -o retractsolution "Yoursolution.wsp" -immediate
step-4:
once retract is completed than delete solution
stsadm -o deletesolution "Yoursolution.wsp" -override
enjoy green coding using free www.code4green.com site
Tuesday, October 26, 2010
SQL Query To Find out which site template had been used to create a site
Another SQL Query for WSS_Content / sharepoint / Moss database
Find out which site template had been used to create a site entitled
SELECT Title, WebTemplate, ProvisionConfig
FROM dbo.Webs
WHERE Title='Give your siteName'
Enjoy Green coding....
Keep looking for the Free Sharepoint SQL eBook on code4green.com
Find out which site template had been used to create a site entitled
SELECT Title, WebTemplate, ProvisionConfig
FROM dbo.Webs
WHERE Title='Give your siteName
Enjoy Green coding....
Keep looking for the Free Sharepoint SQL eBook on code4green.com
Basic SharePoint's tables in Content Database
Here is the list of the basic SharePoint's tables in Content Database
Features: information about all the activated features for each site collection or site.
Sites : information about all the site collections for this content database.
Webs : information about all the specific sites (webs) in each site collection.
UserInfo : information about all the users for each site collection.
Groups : information about all the SharePoint groups in each site collection.
Roles : information about all the SharePoint roles (permission levels) for each site.
AllLists : information about lists for each site.
GroupMembership : information about all the SharePoint group members.
AllUserData : information about all the list items for each list.
AllDocs : information about all the documents (and all list items) for each document library and list.
RoleAssignment : information about all the users or SharePoint groups that are assigned to roles.
SchedSubscriptions : information about all the scheduled subscriptions (alerts) for each user. ImmedSubscriptions : information about all the immediate subscriptions (alerts) for each user.
Enjoy Green coding using code4green.com
Features: information about all the activated features for each site collection or site.
Sites : information about all the site collections for this content database.
Webs : information about all the specific sites (webs) in each site collection.
UserInfo : information about all the users for each site collection.
Groups : information about all the SharePoint groups in each site collection.
Roles : information about all the SharePoint roles (permission levels) for each site.
AllLists : information about lists for each site.
GroupMembership : information about all the SharePoint group members.
AllUserData : information about all the list items for each list.
AllDocs : information about all the documents (and all list items) for each document library and list.
RoleAssignment : information about all the users or SharePoint groups that are assigned to roles.
SchedSubscriptions : information about all the scheduled subscriptions (alerts) for each user. ImmedSubscriptions : information about all the immediate subscriptions (alerts) for each user.
Enjoy Green coding using code4green.com
SQL Queries For Sharepoint's Content Database
Here is the List of some most important SQL Queries for sharepoint/moss's content database:
1. Query to get all the top level site collections
SELECT SiteId AS SiteGuid, Id AS WebGuid, FullUrl AS Url, Title, Author, TimeCreated
FROM dbo.Webs
WHERE (ParentWebId IS NULL)
2. Query to get all the child sites in a site collection
SELECT SiteId AS SiteGuid, Id AS WebGuid, FullUrl AS Url, Title, Author, TimeCreated
FROM dbo.Webs
WHERE (NOT (ParentWebId IS NULL))
3. 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.Description
FROM dbo.Groups INNER JOIN
dbo.Webs ON dbo.Groups.SiteId = dbo.Webs.SiteId
4. 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_Email
FROM dbo.UserInfo INNER JOIN
dbo.Webs ON dbo.UserInfo.tp_SiteID = dbo.Webs.SiteId
5. Query to get all the members of the SharePoint Groups
SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login
FROM dbo.GroupMembership INNER JOIN
dbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER JOIN
dbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID
6. 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.TimeActivated
FROM dbo.Features INNER JOIN
dbo.Webs ON dbo.Features.SiteId = dbo.Webs.SiteId AND dbo.Features.WebId = dbo.Webs.Id
WHERE (dbo.Features.FeatureId = '00BFEA71-D1CE-42de-9C63-A44004CE0104')
7. 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_Login
FROM dbo.RoleAssignment INNER JOIN
dbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND
dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN
dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN
dbo.UserInfo ON dbo.RoleAssignment.PrincipalId = dbo.UserInfo.tp_ID
8. 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 GroupName
FROM dbo.RoleAssignment INNER JOIN
dbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND
dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN
dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN
dbo.Groups ON dbo.RoleAssignment.SiteId = dbo.Groups.SiteId AND
dbo.RoleAssignment.PrincipalId = dbo.Groups.ID
Thank you Ethan. For more Sharepoint's content database related topics please visit Ethan's blog: http://vspug.com/ethan/
Enjoy Green coding
1. Query to get all the top level site collections
SELECT SiteId AS SiteGuid, Id AS WebGuid, FullUrl AS Url, Title, Author, TimeCreated
FROM dbo.Webs
WHERE (ParentWebId IS NULL)
2. Query to get all the child sites in a site collection
SELECT SiteId AS SiteGuid, Id AS WebGuid, FullUrl AS Url, Title, Author, TimeCreated
FROM dbo.Webs
WHERE (NOT (ParentWebId IS NULL))
3. 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.Description
FROM dbo.Groups INNER JOIN
dbo.Webs ON dbo.Groups.SiteId = dbo.Webs.SiteId
4. 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_Email
FROM dbo.UserInfo INNER JOIN
dbo.Webs ON dbo.UserInfo.tp_SiteID = dbo.Webs.SiteId
5. Query to get all the members of the SharePoint Groups
SELECT dbo.Groups.ID, dbo.Groups.Title, dbo.UserInfo.tp_Title, dbo.UserInfo.tp_Login
FROM dbo.GroupMembership INNER JOIN
dbo.Groups ON dbo.GroupMembership.SiteId = dbo.Groups.SiteId INNER JOIN
dbo.UserInfo ON dbo.GroupMembership.MemberId = dbo.UserInfo.tp_ID
6. 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.TimeActivated
FROM dbo.Features INNER JOIN
dbo.Webs ON dbo.Features.SiteId = dbo.Webs.SiteId AND dbo.Features.WebId = dbo.Webs.Id
WHERE (dbo.Features.FeatureId = '00BFEA71-D1CE-42de-9C63-A44004CE0104')
7. 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_Login
FROM dbo.RoleAssignment INNER JOIN
dbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND
dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN
dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN
dbo.UserInfo ON dbo.RoleAssignment.PrincipalId = dbo.UserInfo.tp_ID
8. 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 GroupName
FROM dbo.RoleAssignment INNER JOIN
dbo.Roles ON dbo.RoleAssignment.SiteId = dbo.Roles.SiteId AND
dbo.RoleAssignment.RoleId = dbo.Roles.RoleId INNER JOIN
dbo.Webs ON dbo.Roles.SiteId = dbo.Webs.SiteId AND dbo.Roles.WebId = dbo.Webs.Id INNER JOIN
dbo.Groups ON dbo.RoleAssignment.SiteId = dbo.Groups.SiteId AND
dbo.RoleAssignment.PrincipalId = dbo.Groups.ID
Thank you Ethan. For more Sharepoint's content database related topics please visit Ethan's blog: http://vspug.com/ethan/
Enjoy Green coding
Subscribe to:
Posts (Atom)