The source was not found, but some or all event logs could not be searched.

The complete exception is :

System.Security.SecurityException: The source was not found, but some or all event logs could not be searched.

This happen when you are using in your code (C#) windows log events.

EventLog.WriteEntry(method, log_message, type);

Now, how to create this source in windows event log.

Solution

Using windows powershell.

  1. Run windows powershell under administrative privileges
  2. Run the following command New-EventLog -LogName Application -Source <YOUR SOURCE>

Riyadh SharePoint User Group Meeting September 2012

I just finished our event in Riyadh SharePoint User Group Meeting September 2012.

Megren & Me, lets the first two hours for open discussion questions and most of audience shared us with answers and question.

Then, Mr.Sayed presented BI in SharePoint 2010 and especially Performance Point (Business Intelligence (BI) with PerformancePoint in SharePoint 2010).

After that, Mr.Waqqs talked about SharePoint-Governance-2.

Below is some of our pictures in that event.

You have chosen to delete too many site groups at once

I have a list with 3000 users permission and I need to delete them, but when I select the root checkbox

and tried to delete the all, I got the following error message:

You have chosen to delete too many site groups at once. Select fewer site groups and try again.

Solution

I used PowerShell to delete them 😉

Below is the script…

$web=Get-SPWeb http://dev:2000/

$list=$web.Lists[“MyList”]

foreach($acc in $web.RoleAssignments)

{

try

{

$account = $web.EnsureUser($acc.Member.LoginName)

$list.RoleAssignments.Remove($account)

}

catch

{

Write-Host $acc.Member.LoginName

}

}

$list.Update()