Feature receiver, change site collection Search Center

Hi, in a Feature Event Receiver I am changing the Search Center of the site collection but it is not taking effect. Does anyone see any mistake or reason for that? thanks
        public override void FeatureActivated(SPFeatureReceiverProperties properties)
            try
                SPWeb web = properties.Feature.Parent as SPWeb;
                if (web != null)
                    SPSecurity.RunWithElevatedPrivileges(delegate()
                        using (SPSite site = new SPSite(web.Url))
                        using (SPWeb webElevated = site.OpenWeb())
                            webElevated.AllProperties["SRCH_SB_SET_WEB"] = string.Format(
                               "{\"Inherit\":false,\"ResultsPageAddress\":{0},\"ShowNavigation\":false}",
                               SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search/Pages/results.aspx")
               webElevated.AllProperties["SRCH_ENH_FTR_URL_WEB"] = SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search");
               webElevated.Update();
            catch (Exception exception)
                LogWriter.WriteException(exception, LogCategories.Components, this.GetType().ToString());
        }

Hi,
In my test environment, an exception(Input string was not in a correct format.) occurred at this line when I ran your code.
webElevated.AllProperties["SRCH_SB_SET_WEB"] = string.Format("{\"Inherit\":false,\"ResultsPageAddress\":{0},\"ShowNavigation\":false}",SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search/Pages/results.aspx"));
Please modify it as below:
webElevated.AllProperties["SRCH_SB_SET_WEB"] = "{"+string.Format("\"Inherit\":false,\"ResultsPageAddress\":{0},\"ShowNavigation\":false",SPUrlUtility.CombineUrl(SPContext.Current.Site.Url, "/search/Pages/results.aspx"))+"}";
If the issue still exists, I suggest you debug the code to get more information.
Thanks,
Dennis Guo
TechNet Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Dennis Guo
TechNet Community Support

Similar Messages

  • People Picker in Central Administration on change Site Collection Administrator page.

    Hi there
    We are coming to the end of our rope here.
    We have a problem where the people picker is not working in Central Administration, particularly the change Site Collection administrator page. It simply does nothing but hang the page, it doesn't even give the red squigglies. The search dialogue boxes also
    hangs. It works in other parts of Central Administration.
    The environment has 2 domains with one way trust between them and the peoplepicker-searchadforest attribute is set.
    Any suggestions?

    Hi Chad,
    Did this issue only happen to the "_admin/owners.aspx" page for your Central Administration site?
    Please compare the peoplepicker-searchadforest attribute for your Central Administration web applicaiton with other working web application, see if they are the same ( iisreset may need for your Central Administration ).
    Also check
    ULS log for more related error message (also try others may like "developer dashboard","fiddler", ect.) recoreded when this issue occurs.
    Thanks
    Daniel Yang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SharePoint 2013 site collection search not working but data is indexed correctly.

    I am currently having issues with the default search box on a site. No matter what I type in I can not get it to display any information. However, I see the content indexed in the search admin console. I created a new site with the Basic Search Template
    and I am able to return items in the site using this site page.
    I am looking at http://technet.microsoft.com/en-us/library/jj683115.aspx#BKMK_CreateResutlSource and I must be missing something or doing something wrong because on the site features or site collection features I do not have these settings
    "On the Site Settings page,
    in the Site Collection Administration section,
    click Search Result Sources."
    Any advice would be great.

    I believe you're right. I have also found some other documentation that has helped me. 
    Thanks
    http://blogs.msdn.com/b/sharepoint_strategery/archive/2013/05/25/alternate-access-mappings-explained.aspx
    http://blogs.msdn.com/b/sharepoint_strategery/archive/2013/02/20/beware-crawling-the-non-default-zone-for-a-sharepoint-2013-web-application.aspx

  • Changing site collections logos across all site collections

    HI All,
    I need to change the logo across all site collections, which are around 300-400, so don't intend to do this manually.
    My question is, will simply replacing the current logo in the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE....
    with the logo I want to change to, and naming it exactly the same as the current logo, not achieve this?
    I have searched online and people run PS to achieve this, but in my head the above seems to be work, please correct me?
    Thanks

    I completely agree with Alex and not suggest to touch/change root folder. Initially it might looks easy but it may create issue.
    My option is to BRAND the sites. Master page branding is not a new concept and it mainly use for unanimous look and feel
    Look at below links which will help you to explore about branding
    SharePoint Branding 101:
    Branding Master Pages
    SITE LOGO AND CUSTOM SHAREPOINT MASTER PAGE
    https://www.youtube.com/watch?v=BX4yJA95FUU
    Hope it will help
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • SharePoint PowerPivot feature failing after site collection was backed up and restored (moved to new content database)

    Hi there,
    I am having some strange issue with my PowerPivot for SharePoint but can't figure out what is causing this. Here is what happened:
    I setup PowerPivot (PP) for SharePoint and activate it on few site collections in production environment; I upload a PP workbooks in a library, manage the data refresh schedules, run the data refresh for an external SQL databases, etc. Everything works
    fine for several days.
    One day we decide the move one of the site collections (X) from its current content database to its own (new) content db. The way we did it is that we took the site collection backup in production, restored it in test environment (in its own content
    db; we deleted the old site collection in test first before restoring), checked everything including PP data refreshes etc.; all worked fine.
    Then we did the same thing in production - we deleted the old site collection X, restored the site collection from the same backup file that we used in test environment, everything works fine EXCEPT the PowerPivot refreshes!! :-(
    I am getting these errors: When I click on the workbook, it gives this error "An error occurred during an attempt to establish a connection to the external data source. The following connections failed to refresh: PowerPivot Data"
    When I click OK on error dialogbox, it opens the workbook fine but no slicers/refreshes work now. When I go back to the library and click on "Manage PowerPivot Data Refresh" to open the refresh history/schedule page, it gives this generic but scary
    error: "An unexpected error has occurred. Troubleshoot issues with Microsoft SharePoint Foundation." ULSViewer or Event viewer is not showing anything related to this error!
    Strange thing is that PP refresh works fine in Test environment, as well as on other site collections in production that we didn't touch (which tells me there is nothing wrong with my PP configuration). Did the backup/restore in prd cause anything? Did moving
    it in its own contentdb cause anything? (But then why it works in test environment?) Is there anything wrong with site collection PP feature? Can force reactivating it help??????? I am just lost and going crazy now!
    Please help.
    Asif

    I have found some entries in ULS logs seemingly relevant to this issue as below: Please help. Thanks.
    Note: I have replaced urls with <url> or <server> and username with "domain\user".
    ExternalSource.GetExternalKeyAndStateAndMarkUsed: Populating the session's credentials for external data. Index=0, Credentials=[14337250,
    domain\user]
    ConnectionRequest.ConnectionRequest: New connection request. SessionId=1.V24.1916ClMR0rOQ1F8mQPqtil0V90.5.en-US5.en-US73.-0600#0000-04-00-01T03:00:00:0000#+0000#0000-10-00-01T02:00:00:0000#-006036.7dcb49ef-0dc4-45d2-a0f8-4dc0e18a70f41.N,
    WorkbookVersion=ConnectionInfo.WorkbookVersion: Uri=http://<url>/SQL_PowerPivotTest.xlsx, Version=Monday, 09 September 2013 06:29:42
    Check whether "http://<url>/SQL_PowerPivotTest.xlsx" is in the farm.
    Connecting to "http://<server>/_vti_bin/PowerPivot/Redirector.svc/?DataSource=/team/IT/SiteCollectionDocuments/SQL_PowerPivotTest.xlsx&LocaleID=1033".
    WcfSendRequest: RemoteAddress: 'http://<server>:32843/0a4610a7f75f4ff582ca7329256f0fe3/SSASMidTierService.svc' Channel: 'Microsoft.AnalysisServices.SharePoint.Integration.IGeminiServiceApplicationClient'
    Action: 'http://tempuri.org/IGeminiServiceApplication/GetDatabase' MessageId: 'urn:uuid:44f67e36-7ec2-4fe8-bd4c-277c9d9ddde7'
    WcfReceiveRequest: LocalAddress: 'http://<server>:32843/0a4610a7f75f4ff582ca7329256f0fe3/SSASMidTierService.svc' Channel: 'System.ServiceModel.Channels.ServiceChannel'
    Action: 'http://tempuri.org/IGeminiServiceApplication/GetDatabase' MessageId: 'urn:uuid:44f67e36-7ec2-4fe8-bd4c-277c9d9ddde7'
    Entering monitored scope (ExecuteWcfServerOperation)
    Obtaining routing information for the request using <SERVER> - User:domain\user, DataSource: http://<url>/SQL_PowerPivotTest.xlsx,
    Version: 09/09/2013 06:29:42. (RequestStartTime=[<SERVER>])
    Leaving Monitored Scope (ExecuteWcfServerOperation). Execution Time=10.7664521608193
    EXCEPTION: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Unable to find the specified file. (Fault Detail
    is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.IO.FileNotFoundException: Unable to find the specified file.  
     at Microsoft.SharePoint.SPFile.EnsureUniqueId()   
     at Microsoft.SharePoint.SPFile.get_UniqueId()   
     at Microsoft.AnalysisServices.SharePoint.Integration.Redirector.BackendRedirectService.GetDatabase(String loginName,
    String dataSource, String versionLabel, DateTime fileLastModifiedTimestamp, Int32 localeId, Boolean collectHeathInfo, Boolean createLocal, String serverEndpointAddress)   
     at Microsoft.AnalysisServices.SharePoint.Integration.GeminiServiceApplication.GetDatabase(String loginName, String
    dataSource, String dataSourceVersion, DateTime fileLastModifiedTimestamp, Int32 localeId, Boolean collectHeathInfo, Boolean createLocal, String serverEndpointAddress)   
     at SyncInvokeGetDatabase(Object , Object[] , Object[] )   
     at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)   
     at Sy...).
    Proxy encountered an error while trying to get the sandbox information. This request will be terminated
    EXCEPTION: System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Unable to find the specified file. (Fault Detail
    is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is: System.IO.FileNotFoundException: Unable to find the specified file.  
     at Microsoft.SharePoint.SPFile.EnsureUniqueId()   
     at Microsoft.SharePoint.SPFile.get_UniqueId()   
     at Microsoft.AnalysisServices.SharePoint.Integration.Redirector.BackendRedirectService.GetDatabase(String loginName,
    String dataSource, String versionLabel, DateTime fileLastModifiedTimestamp, Int32 localeId, Boolean collectHeathInfo, Boolean createLocal, String serverEndpointAddress)   
     at Microsoft.AnalysisServices.SharePoint.Integration.GeminiServiceApplication.GetDatabase(String loginName, String
    dataSource, String dataSourceVersion, DateTime fileLastModifiedTimestamp, Int32 localeId, Boolean collectHeathInfo, Boolean createLocal, String serverEndpointAddress)   
     at SyncInvokeGetDatabase(Object , Object[] , Object[] )   
     at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)   
     at Sy...).
    PF_CHECK_ERROR returned 'critical hresult error' 0x80004005 ; Stack Trace:NA
    PF_CHECK_ERROR returned 'critical hresult error' 0x80004005 ; Stack Trace:NA
    PF_CHECK_ERROR returned 'hresult error' 0x80040e41 ; Stack Trace:NA
    ConnectionManager.GetConnection: Failed to create new connection, exception=Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException:
    Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException' was thrown.   
     at Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInterop.InitConnection()   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.<>c__DisplayClass3.<CreateConnection>b__0()   
     at Microsoft.Office.Excel.Server.Credentials.TryExecuteImpersonated(WindowsIdentity wi, ExecuteImpersonatedMethod
    method, Boolean dispose)   
     at Microsoft.Office.Excel.Server.Credentials.TryExecuteImpersonated(ExecuteImpersonatedMethod method, Boolean
    dispose)   
     at Microsoft.Office.Excel.Server.CalculationServer.CredentialsDelegation.TryExecuteImpersonated(ExecuteImpersonatedMethod
    method)   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnection(Credentials credentials,
    ConnectionInfo connectionInfo, Int32 keyLcid, Uri workbookUrl, Boolean auditConnection, SessionId sessionId), sessionId=1.V24.1916ClMR0rOQ1F8mQPqtil0V90.5.en-US5.en-US73.-0600#0000-04-00-01T03:00:00:0000#+0000#0000-10-00-01T02:00:00:0000#-006036.7dcb49ef-0dc4-45d2-a0f8-4dc0e18a70f41.N,
    connectionString=Provider=MSOLAP.4;Persist Security Info=True;Initial Catalog=Microsoft_SQLServer_AnalysisServices;Data Source=$Embedded$;MDX Compatibility=1;Safety Options=2;MDX Missing Member Mode=Error;Optimize Response=3;Cell Error Mode=TextValue pool
    count=0
    ConnectionManager.GetConnection: Caught an exception: Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException:
    Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException' was thrown.   
     at Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInterop.InitConnection()   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.<>c__DisplayClass3.<CreateConnection>b__0()   
     at Microsoft.Office.Excel.Server.Credentials.TryExecuteImpersonated(WindowsIdentity wi, ExecuteImpersonatedMethod
    method, Boolean dispose)   
     at Microsoft.Office.Excel.Server.Credentials.TryExecuteImpersonated(ExecuteImpersonatedMethod method, Boolean
    dispose)   
     at Microsoft.Office.Excel.Server.CalculationServer.CredentialsDelegation.TryExecuteImpersonated(ExecuteImpersonatedMethod
    method)   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnection(Credentials credentials,
    ConnectionInfo connectionInfo, Int32 keyLcid, Uri workbookUrl, Boolean auditConnection, SessionId sessionId)   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnectionAndAddToList(ConnectionRequest
    connectionRequest, ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Boolean auditConnection, Int32 keyLcid, ConnectionInfo connectionInfo, ConnectionKey connectionKey, AutoReaderWriterLock autoPoolLock, Connection& connection, ConnectionList&
    connectionList)   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.GetConnection(ConnectionRequest connectionRequest,
    ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Int64 privateConnectionId, Boolean auditConnection)
    Refresh failed for 'PowerPivot Data' in the workbook 'http://<url>/SQL_PowerPivotTest.xlsx'.
    [Session: 1.V24.1916ClMR0rOQ1F8mQPqtil0V90.5.en-US5.en-US73.-0600#0000-04-00-01T03:00:00:0000#+0000#0000-10-00-01T02:00:00:0000#-006036.7dcb49ef-0dc4-45d2-a0f8-4dc0e18a70f41.N User: 0#.w|domain\user]
    ExternalSource.ValidateConnection: Unable to get a connection: Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException:
    Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionException' was thrown.   
     at Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInterop.InitConnection()   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.<>c__DisplayClass3.<CreateConnection>b__0()   
     at Microsoft.Office.Excel.Server.Credentials.TryExecuteImpersonated(WindowsIdentity wi, ExecuteImpersonatedMethod
    method, Boolean dispose)   
     at Microsoft.Office.Excel.Server.Credentials.TryExecuteImpersonated(ExecuteImpersonatedMethod method, Boolean
    dispose)   
     at Microsoft.Office.Excel.Server.CalculationServer.CredentialsDelegation.TryExecuteImpersonated(ExecuteImpersonatedMethod
    method)   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnection(Credentials credentials,
    ConnectionInfo connectionInfo, Int32 keyLcid, Uri workbookUrl, Boolean auditConnection, SessionId sessionId)   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.CreateConnectionAndAddToList(ConnectionRequest
    connectionRequest, ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Boolean auditConnection, Int32 keyLcid, ConnectionInfo connectionInfo, ConnectionKey connectionKey, AutoReaderWriterLock autoPoolLock, Connection& connection, ConnectionList&
    connectionList)   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionManager.GetConnection(ConnectionRequest connectionRequest,
    ExtendedConnectionInfo extendedConnInfo, Credentials credentials, Int64 privateConnectionId, Boolean auditConnection)   
     at Microsoft.Office.Excel.Server.CalculationServer.ExternalSource.TryGetValidatedConnection(Request request, Credentials
    credentials, ExtendedConnectionInfo extendedConnectionInfo, Boolean shouldReportFailure, Boolean auditConnection, Connection& connectionOut). sessionId=1.V24.1916ClMR0rOQ1F8mQPqtil0V90.5.en-US5.en-US73.-0600#0000-04-00-01T03:00:00:0000#+0000#0000-10-00-01T02:00:00:0000#-006036.7dcb49ef-0dc4-45d2-a0f8-4dc0e18a70f41.N,
    externalSource=PowerPivot Data
    ConnectionInfoManager.InitConnInfoFromOdcFile: ODC File Uri is not valid:
    ExternalSource.ExecuteOperation: We exhausted all available connection information. Exception: Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInfoException:
    Exception of type 'Microsoft.Office.Excel.Server.CalculationServer.Interop.ConnectionInfoException' was thrown.   
     at Microsoft.Office.Excel.Server.CalculationServer.ConnectionInfoManager.GetConnectionInfo(Request request, String
    externalSourceName, Int32 externalSourceIndex, Boolean& shouldReportFailure)   
     at Microsoft.Office.Excel.Server.CalculationServer.ExternalSource.ExecuteOperation(Request request, ExternalSourceStateInfo externalSourceStateInfo,
    ExternalSourceStateInfo prevExternalSourceStateInfo, Int32 index, ConnectionInfoManager connectionInfoManager, ExternalDataScenario scenario, DataOperation dataOperation, Boolean verifyPreOperationConnection), Data Connection Name:
    PowerPivot Data, SessionId: 1.V24.1916ClMR0rOQ1F8mQPqtil0V90.5.en-US5.en-US73.-0600#0000-04-00-01T03:00:00:0000#+0000#0000-10-00-01T02:00:00:0000#-006036.7dcb49ef-0dc4-45d2-a0f8-4dc0e18a70f41.N, UserId: 0#.w|domain\user

  • Hiding SharePoint 2010 specific Feature in SP2013 site collection

    In the new SP 2013 Platform, we have options to deploy the solutions to compatibility level  scope of  <<14>>, though the solution is deployed to 14 hive and targeting a SP2010 site collection, the feature name will be displayed in
    the 2013 site collection as well regardless of the scope defined for the feature.  We can create feature receivers to prevent users activating the feature, but Is there a way to prevent / stop showing a feature name/ description in a SharePoint 2013 site
    collection.
    Regards, Aj (http://www.aj-sharepoint.blogspot.com/) MCTS

    Hi Bistesh,
    The feature is not deployed to the <15 hive>, the feature is only deployed to <14 hive> as we are explicitly specifying the <14 hive> for deployment.   If i update the xml file, then
    it reflects everywhere.
    Regards, Aj (http://www.aj-sharepoint.blogspot.com/) MCTS

  • Changing Site Collection URL

    Can I change the URL for a Site collection in a Host Named Site Collection setup using PowerShell commands? I will be using Kerberos authentication.
    Thanks
    MP

    Hi MP,
    Please perform the steps below:
    1. Execute the command below:
    Set-SPSite -Identity "http://oldhost" -Url "http://newhost"
    2. Start a crawl (incremental is enough).
    3. Update the DNS entries.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Configuring site collection search - sharepoint 2013

    I'm taking over a web farm and unfortunately the search application(Global Search Center URL) was configured as if there was only going to be one web application.What was done is the url
    http:/server/searchcenter/pages
    was customized i mean the look for this particular web application.
    Now the thing is the URL that was added to the Global Search Center URL was :`
    http:/server /searchcenter/pages.`
    So right now when i create new web apps all the searches gets redirected to this url which was customized for the
    `http://server
    web app.
    What would be the best approach to have each web app have its own search center for all the scopes:
    Everything
    people
    conversations
    Would i also need to crawl each resource individually?
    Thanks in Advance

    I would say create another service application and set attach it to the other web apps
    Kind Regards, John Naguib Technical Consultant/Architect MCITP, MCPD, MCTS, MCT, TOGAF 9 Foundation

  • Word opening in Client Application in SharePoint document library when feature is not activated in manage features in site collection

    Hello, I wish for all Word documents to open in the browser for my SharePoint document library on my team site.
    The feature 'open in client application' is not activated in Features for the site collection and the setting in the document library is set on 'Use the server default (open in the browser)
    When I select File > new> from the ribbon in the document library - it still opens Word in the client application?
    Any ideas on this?
    Is there a general Office 365 setting over riding SharePoint somewhere?
    Regards
    kegan1

    Okie don't open up a ticket. Can you please open internet explorer...See if its the latest version. Once you have done that can you login to the SharePoint site. Then go to the internet wheel option  in top right corner > select manage add on >
    Click on toolbars and extensions on left > then click on SharePoint open documents in client and disable it. Close the browser completely now for the changes to take effect. Open internet explorer once again and then try to go to site collection click on
    file and create new. The word will open up in browser now. This has to be done on each and every machine in your firm so that users will be able to open up only in browser. Out of the box there is only one way is to customize the ribbon and remove the new
    option from there or creating an all together new ribbon for your SharePoint from visual studio.

  • Publishing Feature for Site Collection

    Hi..
    I am having 5 different Site Collections in SharePoint Site and from 1st Site Collection we are redirecting to other using Top Link bar, but when we enable Publishing Feature for Different Site Collections the Top Link bar changed..i want to have Standard links
    for all
    Ravindranath

    Publishing feature is applicable to a Site Collection and its sites.
    Quick Approach
    A quick solution will be to manage the Navigation (via Site Actions -> Site Settings -> Look and Feel -> Navigation -> Navigation Editing and Sorting -> Global Navigation) for all 5 site collections and add same links. This will show the same
    top links for all your site collections.
    Correct approach - 
    For using same navigation (top links) across site collections withing same web application, you need to implement Global Navigation. Google this and you'll find lots of good articles to implement this - Create an xml for site map, copy this to your web application
    directory, add the provider in web.config, update the master page to bind the provider to SiteMapDataSource.
    This is a proper approach where if you update the xml, changes get applied to all site collections.

  • How to use Site collection url in feature xml

    Hello Experts,
    I think i am asking a very simple question but this question has realy desturbed me.
    I want to deploy 2 script files using modules in style library.
    here is elements.xml file of module.
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="Scripts" Url="Style Library">
    <File Path="Scripts\jquery-1.3.2.min.js" Url="jquery-1.3.2.min.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
    <File Path="Scripts\splitlinks.js" Url="splitlinks.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"/>
    </Module>
    </Elements>
    but when i activate the feature at root site collection then these files are deployed .. no probulem.
    but when i activate the feature on some other site collection like /sites/test then files should go to /sites/test/Style Library
    but it is not going there !!
    this is my requirement please help
    Mukesh

    Hi,
    Hi,
    Add the Path attribute to the following xml and verify again
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <Module Name="Scripts" Url="Style Library/Scripts" Path="Style Library">
    <File Path="Scripts\jquery-1.3.2.min.js" Url="jquery-1.3.2.min.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" />
    <File Path="Scripts\splitlinks.js" Url="splitlinks.js" Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE"/>
    </Module>
    </Elements>
    Please mark it answered, if your problem resolved.

  • Custom master pages don't appear in all site collections within same App

    I created an additional site collection within an existing application which has a preexisting site collection.
    The preexisting site collection uses a custom master page:
    .../_Layouts/ChangeSiteMasterPage.aspx
    that doesn't appear in
    .../newsite/_Layouts/ChangeSiteMasterPage.aspx
    Anything I need to do in
    .../_catalogs/masterpage/forms/allitems.aspx
    to apply the masterpage to the new site?
    <label for="ctl00_PlaceHolderMain_ctl00_ctl00_resetSubSitesCheckBox">Thanks,</label>
    Scott<label for="ctl00_PlaceHolderMain_ctl00_ctl00_resetSubSitesCheckBox"></label>

    Hey,
    I don't get the problem completely. I undestand that your custom masterpage, which you created once for an existing site collection, does not appear in a newly created site collection. So what where your deployment steps for the custom masterpage?
    Generally you would create the masterpage via Visual Studio and deploy it within a feature to the catalogs library, either in web-scope or in site-scope. A feature event receiver applys the masterpage to the current website (in web-scope) or to all webs
    in the site collection (in site-scope) on feature activating. But in both scopes you need to active the feature in every site collection (or website).
    So please tell us how you deployed the masterpage.

  • Access denied error in feature receiver code when deploying-activating custom timer job feature

    hi,
    am creating a sp timer job for a updating a list.when i write this code in a  the event receiver featureactivated  method, and when i activate this feature , am getting access denied error.
    but, when i deploy this timer job [ without feature receiver] through powershell, it works.
    i didnt run  this feature receiver with runwithelevatedprivileges delegate - i think this wlll NOT solve the issue.
    from one of the posts i seen that, current logedin user needs to be part of config database roles. i didnt understand this point. how can i add my current loge din user into the sp_config database roles? is it through SSMS 2012?
    or
    is there any way to achieve without feature event receiver?
    otherwise i will be forced to write my business logic in a console appln and add this exe in a windows scheduler.!  
    help is appreciated! 

    hi Waqas,
    i have ran that powershell script you have pointed to me.
    function Set-RemoteAdministratorAccessDenied-False()
        [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
        [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Administration") > $null
        # get content web service
        $contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
        # turn off remote administration security
        $contentService.RemoteAdministratorAccessDenied = $false
       $contentService.Update()         
    now i need to test the functionality from the event receiver after Activate feature button click.
    BTW, i have written a console appln for my business  logic and created  an exe.
    also, should i test it with a web application levels coped feature instead of  site collection level feature? this  thread talks abt the same:
    http://social.technet.microsoft.com/Forums/en-US/f41810ec-2348-436d-a574-c29656f3a567/access-denied-error-when-running-timer-job-from-feature-activated-event?forum=sharepointgeneralprevious
    thx

  • Displaying Search dropdowns (verticals) from search center

    Hi Team,
    I am trying to display dropdowns (verticals) in SP 2013 from search center which is in separate site collection in same web app. When I try to create vertical and provide URL of page in Search-Center, SP errors out. by default it is not picking the drop
    down values from search center. Please help.
    Sachin
    Sachin Chugh,

    Hi Sachin,
    As I understand, you would like to add custom search navigation to search center and reflect them to home site collection search box.
    I found two articles for your reference:
    How to add a custom search vertical to your search results page in SharePoint 2013
    http://blogs.technet.com/b/tothesharepoint/archive/2013/11/13/how-to-add-a-customized-search-vertical-to-your-search-results-page-in-sharepoint-2013.aspx
    SharePoint 2013 Search Settings and Search drop down menu
    http://en.share-gate.com/blog/sharepoint-2013-search-settings-and-search-box-drop-down-menu
    Regards,
    Rebecca Tu
    TechNet Community Support

  • Why is PowerView Missing From My Site Collection?

    I'm setting up a test lab with SQL Server 2012 SP1 and SharePoint 2013.
    I successfully setup the integration using PowerShell and Central Administration. I can see the service application and it is related to my web application, however the PowerView/SSRS features are missing from my site collection and so are the content types.
    I even tried creating a new site collection and no dice.
    Any thoughts on this would be great!
    Cheers!

    Hi Anthony,
    Based on the current information, I suggest that you make sure the Reporting Services Add-in for SharePoint has been installed when installling SQL Server 2012 SP1. Then, please verify the Reporting Services installation referring to the following article:
    Verify a Reporting Services Installation
    If you can create the Reporting Services Service Application and a site collection successfully, please verify the Report Server Integration Feature is active. After that, please active the Power View Integration Feature for the site collection.
    Additionally, I suggest that you refer to the following blog for the SQL Server Reporting Services Integration with SharePoint 2013:
    Installing and configuring SQL Reporting services on SharePoint 2013
    Hope this helps.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

Maybe you are looking for

  • Extension error while running but not during debug

    Hi all, I'm using JDev 10.1.2 and I developed an extension for it. This extension guides the user to the creation of a sql file through a sequence of frames. While in debug mode, this extension works without the smallest problem, but when i restart j

  • Unable to Redact or Bates due to Error: There was a problem reading this document (16)

    I am using Acrobat Pro X.  I have hundreds of account statements where I need to redact and bates stamp.  Somehow I keep getting this error:  There was a problem reading this document (16) The files open and print fine.  There is no security settings

  • Clicking noise from Ac adaptor while charging using 600W inverter

    I am trying to charge my laptop from a 12 volt battery through a 600w inverter. However the latop won't charge and the charger just makes a clicking noise. Does any one know why this is? And can anyone help me?

  • My Apple ID is not being verified for FaceTIme

    I've changed my password twice and logged in successfully to apple id but when it tries to connect to FaceTime it says unable to verify email address then says it sent a verification link but it didn't and then says check network connection (which is

  • Activity Clipboard Blank

    Hi     I am facing a typical issue. If we close the interaction without clicking the END button system is not shaving the entries in activity clipboard. Next time when we open the same transaction, there is nothing on activity clipboard. But in case