How to block specific DL in SharePoint 2010 application.

Hi All,
We have SharePoint 2010 farm. I have a requirement to block specific Distribution List which should not recognized when user trying to give access at (user.aspx page)site level.
How can i  restrict this in SharePoint 2010 farm.
Regards
S. Mani

You can use content editor webpart to run javascript. Java script will redirect users from accessing the site. You need t o specify the user Id; it wont work on DL
Blow is the java script:
==================Script Start ===============
ExecuteOrDelayUntilScriptLoaded(getWebUserData, "sp.js");
var context = null;
var web = null;
var currentUser = null;
    function getWebUserData() {
        context = new SP.ClientContext.get_current();
        web = context.get_web();
        currentUser = web.get_currentUser();
       currentUser.retrieve();
        context.load(web);
        context.executeQueryAsync(Function.createDelegate(this, this.onSuccessMethod), Function.createDelegate(this, this.onFailureMethod));
    function onSuccessMethod(sender, args) {
        var userObject = web.get_currentUser();
        if (userObject.get_loginName() == 'i:0#.w|domain\userid')
           window.location="/businesses/pulpandfibre";
    function onFailureMethod(sender, args) {
        alert('request failed ' + args.get_message() + '\n' + args.get_stackTrace());
=============Script End===============

Similar Messages

  • How to design SSRS report using SharePoint 2010 List Version History

    Hello,
    I am using  Sharepoint 2010 list, i need to design SSRS report using Sharepoint List Version History. Could please let me know how to design.
    Thank you.
    Kind Regards

    You could do that with SQL Server Reporting Services, Please follow the instructions from the link below:
    http://www.mssqltips.com/sqlservertip/2068/using-a-sharepoint-list-as-a-data-source-in-sql-server-reporting-services-2008-r2/
    Hope that would work fro you.
    Please Mark as Answer, if the post works for you.
    Cheers,
    Amar Deep Singh

  • How to make sub sites in SharePoint 2010 as Read Only

    Hello,
    We have a requirement to make sub site as read only in SharePoint 2010 programmatically.
    How we can achieve it using Server Object Model ?
    Thanks,
    Hatim

    Hi,
    You can write a WinForm program, and use
    SPSecurableObject.BreakRoleInheritance method to achieve your requirement.
    More information for your reference:
    http://fangdahai.blogspot.com/2012/09/how-to-set-sub-site-in-read-only-mode.html
    https://social.msdn.microsoft.com/Forums/en-US/1f836da6-88ea-4d88-9e43-3383d139ca01/what-is-the-idea-of-stop-inheriting-permission-from-parent-site?forum=sharepointdevelopment
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to activate Custom Feature in SharePoint 2010 using Client Object model

    I am trying to Activate a custom feature using Client Object Model in SharePoint 2010. Here is the code I used. When I execute the code, I got the error "Feature with Id 'xx' is not installed in this farm, and cannot be added to this scope while
    creating site collection". Can anyone help?
    ClientContext clientContext = new ClientContext(spURL);
    //GUID of the custom feature                    
    Guid districtFeatureId = new Guid("5b3529de-5045-46da-af87-8d2e32c121a7");
    Site clientSite = clientContext.Site;
    FeatureCollection clientSiteFeatures = clientSite.Features;
    clientContext.Load(clientSiteFeatures);
    clientContext.ExecuteQuery();
    //Activate the feature
    clientSiteFeatures.Add(districtFeatureId, false, FeatureDefinitionScope.Site);
    clientContext.ExecuteQuery();

    Hi shil chan,
    When you activate a feature on the site collection, the feature should be scoped to site or farm, the error message shows it cannot find the specific feature, this will happen when you have a feature in web
    scope or the feature isn’t installed.  
    So, to troubleshooting this issue:
    Verify whether the feature is scoped to web. Please go to
    Site Setting->Site Features . If the feature is a web scope feature, then add the feature to webfeatures.
    Make sure the feature is installed correctly.
    Please inform me freely if you have any questions.
    Thanks

  • How to Archive a list in sharepoint 2010

    Hi
    I think large list is the inevitable trend and will be a very common issue faced by everyone. We are a medium business using sharepoint 2010.
    For past 3 years, one of our SharePoint lists is over 20000 items.
    From my end:
    1.     I have indexed some important columns and created filtered views but it does not help much.
    2. I have increased the list threshold value to 25000( Even though the best practice is 5000).
    3. Also,  I have set the list template size to 500MB 
    4.     When I try to save the list as a template,  SharePoint throws an exception error.  
    5.   I tried working on the code
    mentioned in the link
    below but it looks complicated for me.
    http://spboom.com/sharepoint-development/moving-sharepoint-list-items-to-archive-list/
    What I need:
    I need to archive old items in the list.  After archiving,  I might need to refer to the archived items from time to time.
    As I'm newbie to SharePoint, it would be great, if someone can elaborate in detail with what can be done.
    Again your help in this is much appreciated.
    Thanks & Regards,
    SweR

    What vesion of SharePoint are you using?  If you want to move items across from one list to another (as per your prefered option), something like: -
    Create a list template of you list with no content
    Recreate it on the same level as the main lis
    Create an SPD workflowthat'll copy an item to the new list and delete the original.  Make sure it doesn't have a triggering action
    Use an Expiration Information Rights Policy to triger the workflow. 
    Please note that this won't preserve the original author / create metadata as Alex has already said.
    Cheers,
    Steven Andrews
    SharePoint Business Analyst
    Blog:
    Steve's SharePoint Space  Twitter:
      LinkedIn:
      Facebook:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • How to Create Custom List in SharePoint 2010 Programmatically ?

    Hi,
    i have tried the following way, 
    http://devendra-sharepoint.blogspot.in/2012/01/creating-list-programatically-in_30.html
    But i am not able to create list.
    Becuase i am getting the following error.
    'Microsoft.SharePoint.SPWeb' does not contain a definition for 'EnsureList' and no extension method 'EnsureList' accepting a first argument of type 'Microsoft.SharePoint.SPWeb' could be found (are you missing a using directive or an assembly reference?)
    Please advice.
    Thanks,
    Aasai

    Hi,
    You can use list.Fields.Add() to add column in list. See below blog:
    http://www.c-sharpcorner.com/blogs/3764/create-sharepoint-list-programmatically.aspx
    Use this to delete list:
    http://www.c-sharpcorner.com/UploadFile/54db21/delete-list-in-sharepoint-2010-programmatically-using-vs-201/
    See this for remove user/group from list:
    http://www.c-sharpcorner.com/UploadFile/54db21/remove-group-permission-to-list-in-sharepoint-2010-programma/
    Hope it could help
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • How to enable autocomplete option in SharePoint 2010

    Hi,
    I have created a multiple selection dropdown in SharePoint (which is a long list). It takes really long to find and select the options from the  list. Is it possible that when we start typing (say the name) it starts showing the
    options starting with that particular alphabet?
    Thanks.
    N

    Hi,
    Use, "$().SPServices.SPAutocomplete"
    with jquery
    http://spservices.codeplex.com/wikipage?title=%24().SPServices.SPAutocomplete
    or
    http://tomvangaever.be/blogv2/2011/07/sharepoint-2010-autocomplete-with-list-items/
    Thanks
    -Rahul

  • How to block specific incoming calls

    CCM 4.1(3)sr2
    I am currently able to block specific calling numbers from PSTN with translation rules like this in my h323 gateway:
    voice translation-rule 10
    rule 1 reject /323xxx9650/
    rule 2 reject /323xxx9580/
    Then I use it with a call-block translation profile on the dial peer like this:
    dial-peer voice 1 pots
    call-block translation-profile incoming call_block_profile
    destination-pattern 9T
    progress_ind setup enable 3
    incoming called-number .T
    direct-inward-dial
    port 2/0:23
    Now I want to convert to MGCP and find that doing this same thing in Callmanager is [to me] less than obvious. Any thoughts?

    Stick with H323 if you are wanting to do call control for PSTN calls, because, with MGCP, it is doable from CallManager using a combination of Route Patterns / Translation Patterns, but it is MUCH more convoluted than what you currently have established with your translation rules, which look pretty clean to me. If there is no GOOD reason to change, leave it alone....

  • SharePoint 2010 Application server has SQL timeout problem

    Hi All,
    Our SharePoint has App & WFE servers, and the SQL server is always on. BTW, App server sometimes has timeout problem as follow, has any idea on it? This problem does not occur timing, our SP 10 is RTM version.
    Error Log:
    01/29/2015 17:25:29.96 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Monitoring                    
    nasq Medium  
    Entering monitored scope (Timer Job job-workflow)
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    880i High    
    System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean
    breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)     at
    System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult asyncResult, TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParserStateObject.ReadNetworkPacket()     at System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean
    encrypt, Boolean trustServerCert, Boolean& marsCapable)     at System.Data.SqlCl...
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98* OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    880i High    
    ...ient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject)     at
    System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject)     at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
    host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)     at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString
    connectionOptions, String newPassword, Bo...
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98* OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    880i High    
    ...olean redirectedUserInstance)     at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean
    redirectedUserInstance)     at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)     at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection
    owningConnection, DbConnectionPool pool, DbConnectionOptions options)     at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)     at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
    owningObject)     at System.... 5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98* OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    880i High    
    ...Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)     at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)     at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
    outerConnection, DbConnectionFactory connectionFactory)     at System.Data.SqlClient.SqlConnection.Open()     at Microsoft.SharePoint.Utilities.SqlSession.OpenConnection()
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    880k High    
      at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock)     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand
    command, CommandBehavior behavior)     at Microsoft.SharePoint.Administration.SPDatabase.get_IsReadOnly()     at Microsoft.SharePoint.Administration.SPContentDatabaseLockManager.CanProcessContentDatabase(SPContentDatabase contentDatabase)
        at Microsoft.SharePoint.Administration.SPWorkItemJobDefinition.Execute(SPJobState jobState)     at Microsoft.SharePoint.Administration.SPTimerJobInvokeInternal.Invoke(SPJobDefinition jd, Guid targetInstanceId, Boolean isTimerService,
    Int32& result)     at Microsoft.SharePoint.Administration.SPTimerJobInvoke.Invoke(Time...
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98* OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    880k High    
    ...rJobExecuteData& data, Int32& result)  
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    880j High    
    SqlError: 'Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.'    Source: '.Net SqlClient Data Provider' Number: -2 State: 0 Class: 11 Procedure: '' LineNumber: 0 Server:
    'spsql' 5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    3355 Critical
    Cannot connect to SQL Server. spsql not found. Additional error information from SQL Server is included below.  Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    tzku High    
    ConnectionString: 'Data Source=spsql;Initial Catalog=WSS_Content;Integrated Security=True;Enlist=False;Asynchronous Processing=False;Connect Timeout=15'    ConnectionState: Closed ConnectionTimeout: 15
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:50.98 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Database                      
    85t4 High    
    An error occured while attempting to verify that the database is read only for database WSS_Content. The error contained the following message: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not
    responding. 5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    01/29/2015 17:25:51.00 OWSTIMER.EXE (0x0A78)                  
    0x0B08
    SharePoint Foundation         Monitoring                    
    b4ly High    
    Leaving Monitored Scope (Timer Job job-workflow). Execution Time=21043.2150707921
    5a91b888-0f2e-46fe-9ee0-96c81c6581bf
    Thnaks.
    Ben

    What is the latency (measured via ping) between the App and SQL Server? SharePoint 2010 RTM hasn't been supported for quite some time. Upgrade to SP2 and see if it resolves the issue.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • SharePoint 2010 Application Page Caching

    I'm trying to figure out the best way to go about caching application pages with CAML and/or LINQ queries that take forever to load.
    The OOTB caching in SharePoint isn't doing the trick...it's had zero affect on load times.
    Any suggestions?

    Hi,
    By default, every time we access a page, it will make calls to database and query data. As I understand, you would like a way that can cache the data so that it doesn’t need to query each time.
    Here is a link for caching in SharePoint 2010:
    http://blogs.msdn.com/b/kunal_mukherjee/archive/2011/01/10/caching-in-share-point-2010-best-practice.aspx
    Please check Page output cache profiles, it reduces the amount of SQL calls and workload on WFE:
    http://msdn.microsoft.com/en-us/library/office/aa661294(v=office.14).aspx
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Applying the SignOn for SharePoint 2010 Application

    We have a SharePoint intranet application, where each user when accesses the site automatically sees his name in the top.
    Could you please let me know, if we could confirm that Single Sign On is already applied on this site from the above behavior.
    Thanks

    Hi,
    To confirm that Single Sign On is already applied on this site, You need to add SharePoint site in trusted zone of browser.
    open IE-->tools-->internet options-->select security tab and add your site in trusted zone.
    Also change below authentication:
    1.Go to Tools > Internet Options, click
    Security Tab
    2.Under Security tab click on Custom Level button
    3.On Security Settings dialog box scroll down until you see
    User Authentication settings section
    4.Select Automatic logon with current username and passowrd, click
    OK on Security Settings box, then click
    OK under Internet Options box
    Best Regards,
    Lisa Chen

  • How enter prise search works in sharepoint 2010

    In my organization enterprise search is configured ,
    -- sharepoint farm has
    -- two index servers ( share point server search  service is  configured in this servers)
    two web front end servers(sharepoint foundation web applications, and  share point server search  service is  configured in this servers)
    - two  application servers( central admin service is running)
    - one sql server
    here i am new to this area
    here how entr prise search works,  why index servers used
    index data stored sepratly in thi servers?
    and when user query for any documentid where it will search initially
    i know the concept of search there are 3 things
    1) query
    2)index
    3)crawler
    adil

    Hi,
    In Microsoft SharePoint Server 2010 Search, index partitions are groups of query components, each of which holds a subset of the full text index and which return search results to the query originator. Each index partition is associated with a specific property
    database containing metadata associated with a specific set of crawled content.
    The index server manages the crawling and indexing of SharePoint Server content and maintains the index file. The index service works with the query service to let you search SharePoint Server content.
    Every SharePoint Server deployment must have at least one index server. Additional index servers may be necessary as the deployment grows. There can only be one index server per server farm.
    If you use the web front end as your query server.  This tells the index server to propagate its index to the WFEs that are set as query servers so that they have a local copy of the index.
    When someone does a search (this is done on the WFE), then that WFE will search itself locally instead of going across the network to query the index server.  
    This increases speed at the time of query, but it of course introduces additional overhead in terms of having multiple full copies of the index on the network and the network demand of propagating those index copies all the time. 
    If you select the query role on your index server, then the index will not get propagated and all searches will query the index server across the network.  
    For more information, you can refer to the following article.
    http://www.sharepointpitstop.com/2012/08/sharepointsearch-index-query-crawl.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • How to Block Specific IP Address (YouTube)

    This is a follow-up question to one I posted earlier this week. I want to block YouTube (and a handful of other sites) from my stepson's new iMac and it was suggested I try/use Leopard's "Parental Control" feature.
    I tried that, but the problem is, when he attempts to visit the site, a warning page pops up informing him Parental Controls have blocked the site, then gives him the option to log in as the administrator or to email the admin for access...and that's pretty much the worst thing that could happen. He has serious Obsessive Compulsive Disorder (OCD) and it HUGELY upsets him that he can't guess the Admin password.
    Soooooo...can anyone suggest an alternative means of blocking a specific IP address that does so WITHOUT serving up a "Contact the Administrator" message? Someone has suggested blocking the IP address via the network router, but I haven't a clue how to do that.
    Any help?
    Thanks.

    Something else you might look at to see if it is suitable for you is to use the DNS servers from www.opendns.com (on your router for example) and set up an account on there, then exclude the sites you don't want accessed - either by the names of the sites OR by the category of site they are.
    What that does is NOT actually "blocking the site" as such, what it does is when the workstation wants to resolve the hostname into an IP address, OpenDNS will fail the request. The user will see a browser page from OpenDNS saying that the site was blocked by the network administrator - you can change the wording and even add an icon if you like.
    If the user doesn't have admin access to the workstation (whereby they could change the DNS server locally to your ISP's normal DNS, which presumably doesn't offer this sort of lookup-filtering) and they don't know the IP address(es) of the sites they want to access - obviously if the workstation doesn't have to go to a DNS to look the address up, it doesn't matter whether the DNS is blocking the lookup for you - this works well.
    There's more information on www.opendns.com - as I said maybe it won't be appropriate for you, but if it is, it's pretty easy to set up and to administer.

  • How to block specific websites to specific users

    our is small business company we are using windows server 2008 r2.we want to block some specific websites  for few users ,we go to group policy management policy in that user configuration clicked on it but we reached to the policy based qos in that
    no items are present than how we can block the sites , can suggest methods or solution for it
    Regrads
    rama

    Hi rama,
    For group policy method, please open GPME and follow the path: User Configuration-> Policies-> Windows
    Settings-> Internet Explorer Maintenance-> Security. Then check if Security Zones and Content Ratings can help you to achieve the target. For more details, please refer to following article.
    How to use Group
    Policy to Allow or Block URL’s
    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft
    does not guarantee the accuracy of this information.
    If any update, please feel free to let us know.
    Hope this helps.
    Best regards,
    Justin Gu

  • How to block Specific G/L for an user

    Dear All my Expert,
    It is very much essential for me that I need to block the specific G/L for some users.
    It means those user only can made add/change the data but can not do the display the
    line item in FBL3n of selected G/L which I want to restrict for them.
    Can I do this? Please advice.
    With best regards
    Bishnu

    Hey Bishnu,
    Check the authorisation group through transaction code - SU24. You can provide the transaction code FS00 there to find out the respective authorisation object.
    Thanks & Regards
    Subhasish

Maybe you are looking for

  • How the sales returns will effect after rebate settlement in sap

    Dear SD Experts, I have a query that the Rebate settlement is done (Material Rebate) after that the sales returns has taken place and again in the credit memo the system is showing the rebate accruals. Can any one please suggest me how the actual pos

  • Can anyone help? "DynamicLink" not available attempting to open Mov in Photoshop CS6

    Can anyone advise where I should go to get help with this? as this is obviously not the right place! Hi, Using CS6 Photoshop extended on iMac early 2008 model..... Processor  2.8 GHz Intel Core 2 Duo Memory  4 GB 800 MHz DDR2 SDRAM Graphics  ATI Rade

  • Document system and SAP

    Hi to all, I have one third party document system in which is workflow. When workflow come in some status I want to create work item in SAP with connection to scan from documentum system. Whe user press to execute work item scan should be show with s

  • Photo stream/Camera issues on iPhone 6, iOS 8.3?

    I have an iPhone 6 on iOS 8.3 and there were lots of previously taken photos without locations and I wanted to add them in. So, I connected my phone to my MacBook Air and imported my phone pictures into an album on my Mac. I individually added the lo

  • Satellite U845W-S400 - how to open-up the laptop to put in a SSD

    Hello everyone, I would like to know how to open-up the laptop to put in a SSD. It has 6 screws on the bottom and I assume some under the keyboard. I do need a guide however to know for sure where they are before I start prying things open and might