Tag Info

Hot answers tagged

4

When you RunWithElevatedPrivileges the executed code runs with Elevated Privileges, and under other Account, usually Application Pool user. If you need to pass user account to the method, insert into a variable before calling the delegate. string userId = Context.CurrentWeb.RootWeb.CurrentUser; (This code is j ...


4

You would maybe need to understand how search works prior to developing your own in the 1st place - a fast track video, check here http://www.youtube.com/watch?v=EJIhgL2zRwI. Also there quite a lot of videos on TechNet around search for developers. So, for your case you would need a Search scope (it could be a site collection level) which targets either ...


3

I am not sure whats best but you can use SPQuery (only for reading) as well to get Data out of sharepoint, however if you want someone to look at your code and improve it then I would suggest you try this question on http://codereview.stackexchange.com/ hope it helped ;) Just realized your not disposing your SharePoint objects in code, I would recommend ...


3

Because you define the web object in the elevated mode, you'll impersonate as a system account. This means you'll always get the same person... Maybe you can store the user before you run the elevated code from SPContext.Current.Web.CurrentUser and use this user inside the elevated code (or in your case properties.Web.CurrentUser) I'm not sure this will work ...


3

Different products (if you can call Shared Folder as such). Basically SharePoint Workspace is the new Groove (in Office 2007). The Windows Process is still named Groove if you peek in your processes. Groove Workspaces allow secure collaboration workspaces between partners, with the condition of both have SharePoint workspace running. Otherwise, Shared ...


3

you can use SharePoint web service to do that. Corey Roth have a tutorial about using SharePoint search web service. MSDN also have article to use web service for enterprise search in http://msdn.microsoft.com/en-us/library/ms543175%28v=office.12%29.aspx


2

The only way for content to be returned by a query is for it to be indexed. The only way for content to be indexed is for it to have been crawled. Hourly incremental crawls are common. If you're concerned about performance you can crawl a WFE that isn't used by end users. If you have so much data that the crawl does introduce a performance issue, you should ...


2

Yup, via a FeatureReceiver, call PublishingSite.SetAvailablePageLayouts() http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.publishingweb.setavailablepagelayouts.aspx


2

You can use Refinements to find all the possible values for Managed Properties. Refinements will also include the counts for each Managed Property. Look here for more details on how to configure: http://msdn.microsoft.com/en-us/library/ff394639%28v=office.14%29.aspx


2

This is NOT possible with Managed Property keyword queries. The only wildcard capability that Sharepoint Search Server 2010 supports is "Stemming". Stemming expects the characters to be matched by the characters at the start of a string in the index. e.g. Item contains Title string "TestMe" You're query can be : Title:"Tes" and that would pick up the ...


2

I would do the following: priorize the incremental crawl with "high" priorize the new content source with "low" limit the requests to the new site in crawler impact rules start the crawl on friday night and pause it on monday - repeat until you have the main chunk indexed (use powershell to automate) With this the impact should not be that hard.


1

This isn't really possible without having multiple farms each with a separate Search Service Instance. I would suggest you basically split out your 1.5TB of content into a separate farm with a dedicated Search instance. You can even use HOSTS entries on the crawl servers so they have their own local dedicated WFE servers for the crawl process to iterate ...


1

Your best approach is to get titles on those weird formats into a separate managed property. Then you can do word searches on that property in FQL with less chance of the query bombing. It's all about term expansion in the search engine core and how many terms would match and how big(slow) will the end query be. The other approach is to create a full text ...


1

If you want to explore how rank is evaluated for a query check out http://powersearching.wordpress.com/2013/01/25/explain-rank-in-sharepoint-2013-search/ which explains how to access the ExplainRank.aspx page located in the 15 hive.


1

You need to create a new crawler rule with default crawler account if it already has read permission on external websites, if not then you can specify a new crawler rule with a crawler account that has at least read permission on external content your crawler will crawl. Since you getting Access denied error seems like your crawler account doesn't have ...


1

I have never touched FAST server but from the point of common sense and having configured and used code signing certificates... I do not see where is "a new certificate issues by my CA authority" can be used by "following the tecnet article http://technet.microsoft.com/en-us/library/ff381244 " That article describes situations of: replacing ...


1

If your SharePoint site is using FBA, you can use authentication.asmx webservice to get the authentication cookie. If your site is using Windows, you can directly assign defaultcredentials of logged in user like : proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;


1

I dont know if this is what your looking for but from what i understand you want to do the following? SPWeb web = SPContext.Current.Web; SPList list = web.Lists["MyList"]; SPListItem item = list.Items[0]; item["Title"] = TextBox_Title.Text; item["Name"] = TextBox_Name.Text; item["Address"] = TextBox_Address.Text; item["Age"] = ...


1

An application page can run pretty much any code you like, in C# or VB (and probably F# too, since it's .NET). I'd suggest you start looking at the documentation for SqlClient. You can find many, many tutorials for using these classes on Google.


1

You are reading the user info from an elevated SPWeb istance, so the reported user will be the one used by the application pool - this is why you are getting the "System" user name. Just use properties.Web.CurrentUser. That should give you the non-elevated SPWeb object and thus the real current user.


1

Nadeem Below had beaten me to this :) thanks Nadeem :) Some additions below: public class YourClass: SPItemEventReceiver { public override void ItemAdded(SPItemEventProperties properties) { SPListItem item=properties.ListItem; item.BreakRoleInheritance(false); SPUser user = web.CurrentUser; ...


1

You can use following code as a starting point: item.BreakRoleInheritance(false); SPUser user = web.CurrentUser; SPRoleAssignment roleAssignment = new SPRoleAssignment(user); roleAssignment.RoleDefinitionBindings.Add(web.RoleDefinitions["Full Control"]); item.RoleAssignments.Add(roleAssignment); This will give the ...


1

Thre is no property to do this OOTB from simply adding an item into a SharePoint List. If you are comfortable in creating / writing code then an event receiver for the ItemAdded event which takes the value of the metadata selected (View By Everyone / Only Me) then breaks the inheritance of the SPList (Parent List) and sets the permissions explicitly. ...


1

If you can use C# to find out what username to filter for you could try to use the Filter Web Part to filter a standard XSLTListViewWebPart. It should accept FilterName and FilterValue. If you can't use the built in Filter Web Part you could write your own. Another option is to refresh the page with the query string for this, like: ...


1

With FAST Search you are going to have a separate set of servers dedicated to document processing, indexing and other components. The configuration options are very flexible so you'll need to come up with the proper architecture based on your specific requirements for content freshness, query throughput, index size and redundancy. Your SharePoint application ...


1

I have solved this problem: Below is the source of the Javascript attach it with code. src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" write this all code in the javasrcipt tag $(document).ready(function() { // add change handler $("input[title='Test Value']").change(function() { MasterSelectChange(); ...


1

The way you specify a non standard source for your search is by setting the Location property. The DefaultSearchProvider can't be set as it's just a convenience property to easily get the DefaultSearchProvider of the current contexts search application. But the only thing the DefaultSearchProvider property is used for is setting the Location if not ...


1

Option 1: Lookup list, if for entry into list If you can make an extra group ZYX which contains everybody except the people in XYZ then you can make the following: Create a list with the choices A,B,C,D,E On each item break inheritance and assign view right to groups XYZ and ZYX Make your dropdown a lookup into the list Option 2: Audiences, if webparts ...


1

By default you can use the standard web parts. You don't say anything of any particular search needs so hard say where you should start to look. MSDN has samples on overriding the Core Result Web Part, or take a look at the code in spsearchparts.codeplex.com in order to do FQL queries via a web part. You should look into the following: Override Core ...


1

You simply need to setup a new SharePoint content source and put the URLs to the sites to crawl from SharePoint 2007. You may need to set your search service account to have Full Read access to the SharePoint 2007 web applications in Central Administration on 2007. To do that, goto Central Admin on 2007 > Application Management > Policy for Web Application ...



Only top voted, non community-wiki answers of a minimum length are eligible