Windows Sharepoint Services - FullTextSqlQuery Document Library Unable To Find Items Created By System Account?

Apr 5, 2010

We have created an ASP.NET web app that upload files to WSS Doc Libary. The files get added under 'SYSTEM ACCOUNT' in the library. The FullTextSqlQuery class is used to search the document libary items. But it only searches files that has been uploaded by a windows user account like 'Administrator' and ignores the ones uploaded by 'SYSTEM ACCOUNT'. As a result the search results are empty even though we have the necessary data in the document library. What could be the reason for this?
The code is given below:

public static List GetListItemsFromFTSQuery(string searchText)
{
string docLibUrl = "http://localhost:6666/Articles%20Library/Forms/AllItems.aspx";
List items = new List();
DataTable retResults = new DataTable();
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite site = new SPSite(docLibUrl))
{
SPWeb CRsite = site.OpenWeb();
SPList ContRep = CRsite.GetListFromUrl(docLibUrl);
FullTextSqlQuery fts = new FullTextSqlQuery(site);
fts.QueryText =
"SELECT Title,ContentType,Path FROM portal..scope() WHERE freetext('" +
searchText +
"') AND (CONTAINS(Path,'"" +
ContRep.RootFolder.ServerRelativeUrl + ""'))";
fts.ResultTypes = ResultType.RelevantResults;
fts.RowLimit = 300;
if (SPSecurity.AuthenticationMode != System.Web.Configuration.AuthenticationMode.Windows)
fts.AuthenticationType = QueryAuthenticationType.PluggableAuthenticatedQuery;
else
fts.AuthenticationType = QueryAuthenticationType.NtAuthenticatedQuery;
ResultTableCollection rtc = fts.Execute();
if (rtc.Count > 0)
{
using (
ResultTable relevantResults =
rtc[ResultType.RelevantResults])
retResults.Load(relevantResults, LoadOption.OverwriteChanges);
foreach (DataRow row in retResults.Rows)
{
if (!row["Path"].ToString().EndsWith(".aspx"))
//if (row["ContentType"].ToString() == "Item")
{
using (
SPSite lookupSite =
new SPSite(row["Path"].ToString()))
{
using (SPWeb web = lookupSite.OpenWeb())
{
SPFile file = web.GetFile(row["Path"].ToString());
items.Add(file.Item);
}
}
}
}
}
} //using ends here
});
return items;
}

View 1 Replies


Similar Messages:

Unable To Use Webclient Object To Download A File In SharePoint Email Enabled Document Library?

Feb 22, 2010

I am using webclient object to download a file to a windows folder from a sharepoint document library. The credentials I am passing to the webclient object are that of site collection administrator. everything works fine while i test it by uploading a file to the document library. But since the document library is email enabled; when an email is received the file is not transferred to the windows folder. i have put some workflow history events to see which user account is used when the email is received. the user account shown is the network service account. I have given write permissions on the folder to all the users; Everyone, Network service, the site collection administrator user etc. but still i cant figure out what is the problem.

View 2 Replies

How To Add A File To The Sharepoint Document Library

Apr 29, 2010

how to adding a file to the sharepoint document library? I found some articles in net. but i didn't get the complete concept of the same. Now i uploaded a file without metadata by using this code.

[Code]....

This code is working as fine. But i need to upload file with meta data. I created 3 columns in my Document library..

View 3 Replies

Web Forms :: How To Find All The Web Services And Windows Services Running On A Server

Feb 4, 2011

How to Find All the Web Services and Windows Services Running on a Server in ASP.Net. I have the server details with me and want to find all the Web services running on it.

View 1 Replies

Unable To Find Any Documentation On This Library (using JavaScript With .dll's)?

Sep 3, 2010

I love the demos of ASTreeView. I'd like to use this in my project, which is completely local and currently only uses HTML, JavaScript, and CSS - i.e. no ASP.net or anything dealing with servers...

Is it possible for me to use this? There is a .dll and a .js included in the package, but I have no clue where to start since this isn't a ASP.net project for me. I can't find any documentation on this library.

View 1 Replies

Starting Or Stopping Windows Services In A Remote System?

Mar 1, 2011

how to start or stop windows services present in a remote system using Servicecontroller in c#.net.

View 1 Replies

Unable To Add Reference To System.Web In A Class Library Project

Mar 18, 2011

Does anyone know what could be the reason I am not able to add reference to System.Web. It gives an exclamation(!) symbol in front of the dll under reference folder in VS 1020. I wand to refer to System.Web.Security.MembershipProvider class.

View 1 Replies

ADO.NET :: Unable To Locate System.Data.Extension.dll Library In Add Reference?

Sep 26, 2010

I want to use LINQ over DataSet in my C# ConsoleApplication project.But i do not find System.Data.Extension.dll in Add Reference section of my project.There is System.Data.DataSetExtension.dll present. I added that file, but then which namespace to use in my project ?

View 3 Replies

C# - Twitter Api Library / Get The Twitters From Parse Out The New Ones And Use A Library To Retweet Them On Own Account?

Mar 2, 2010

I am looking at the twitter api page http://apiwiki.twitter.com/ and I noticed that they have already built libraries that are wrappers against the twitter api. So I am thinking this is the best way to go but I am unsure which C# library I should use.

What I am trying to do is make some simple service or cmd line application that will help me automate retweeting.

So I am looking for a library that will allow me to get posts from other twitter accounts and then retweet them from another account.

I am not sure if the library can do this or not. Otherwise I was thinking of getting the RSS feed from the twiter account I want to get the twitters from parse out the new ones and use a library to retweet them on my own account.

I have not used twitter much so I am hopping someone can shed some light on this.

View 2 Replies

Controls :: Display Word Document On Webpage - Unable To Find The File Error

Jan 17, 2014

I downloaded the example from the article Display Word Document on web page asp.net

I'm showing the following error when i try to run it

System.Runtime.InteropServices.COMException:Unable to find the file (C:Windowssystem32PROGRAMAS.doc)

And its supposed to be on this line :

applicationclass.Documents.Open(fileName, readOnlyObject, missingType, missingType, missingType, missingType, missingType, missingType, missingType, missingType, isVisible, missingType, missingType, missingType, missingType, missingType)

View 1 Replies

Unable To Call The SharePoint Custom Web Service From Another SharePoint Farm

Jan 12, 2011

I have deployed a custom SharePoint Web service on Farm A. I am trying to access this Web service from a SharePoint timer job on Farm B. On Farm B, I am creating Class Library project, packaging it (wsp) and then deploying to GAC. The problem is I'm unable to access the Web Service using the following code. TodaysNewSVC is a service reference

TodaysNewSVC.GetTodaysnewsfromInsite objGetNews = new TodaysNewSVC.GetTodaysnewsfromInsite();
objGetNews.PreAuthenticate = true;
objGetNews.Credentials = CredentialCache.DefaultCredentials;
objGetNews.Url = "http://insite-dev.portal/_vti_bin/todaysnews.asmx";
DataTable dt2 = objGetNews.getNewsFromInsite(true, true);

//getNewsFromInsite is a WebMethod which returns the DataTable.

Note: Both farms use the same active directory authentication. I have also done the debugging for Timer Job and feature activation and they are working fine. The problem occurs during the call i.e. getNewsFromInsite
The asmx and wsdl files are accessible from Internet Explorer and also from Windows Console application. Here is the code which I use from console application:

GetTodaysnewsfromInsiteSoapClient objWSClient = new GetTodaysnewsfromInsiteSoapClient();
objWSClient.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;[code]...

Here is the error message:The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fPages%2fproblem-with-page.aspx%3fc%3d500">here</a>.</h2>
</body></html>

View 1 Replies

Databases :: System.EntryPointNotFoundException--Unable To Find An Entry Point Named 'OCIDateTimeFromArray'

Feb 14, 2011

I am using a web method to submit my form data , having Oracle DataBase. And in my local development machine every thing is fine.I am successfully able to submit my form data asynchronously through a web method. But the same project when deployed to test server then while submiting form date there an error occurs as stated above. One field in the table is of DataTime type, and i am inserting server's date into that field, all other fields are of type varchar2 or int. I googled about that but it seems that no one has got such error.

View 16 Replies

ADO.NET :: Unable To Find "System.Data.Entity"?

Feb 16, 2011

I am developing under VS 2010 with asp 4.0. What library and / or reference am I missing?

View 2 Replies

C# - How To Pass Credentials To Httpwebrequest For Accessing SharePoint Library

Mar 4, 2011

I try to read a file from SharePoint document library through httpwebrequest.For that I have to pass the credentials.So How should I pass the creadentials.

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "application/msexcel";
request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
request.Credentials = new NetworkCredential(UserName, PassWord);

View 3 Replies

Configuration :: Web App Forms Authentication Vs Sharepoint Services

Apr 22, 2010

I am having difficulty getting an asp.net web application to run on a new server. This same app has been deployed to at least a dozen other servers without issue. The x-factor seems to be that Sharepoint Services (WSS 2.0) is present on the new machine.

The app is configured to use Forms Authentication with a redirect to a specified login page, the first symptom is that no attempt is apparently made to redirect new requests, requests proceed directly and then error out when that page attempts to look at the HttpContext.Current.User.Identity.Name.

Second, when navigating directly to the Login.aspx page, the login and authentication check appear to proceed normally, but again HttpContext.Current.User.Identity.Name is blank where is should now have the users login name, and an application error occurs. I have confirmed that the same code on other servers behaves as expected (the Name is set at this point). IIS virtual directory settings are identical as well.

It would seem that something is interfereing with the normal Forms Authentication processes and that something appears to be Sharepoint. We have already listed the web app's path as excluded in the Sharepoint Admin section. Is there something else that needs to be done?

View 2 Replies

Sharepoint - Display An Excel 2010 Document In A Web Application?

Jul 12, 2010

I am wanting to display an excel 2010 document in an asp.net web application. This document uses the new slicer functionality which I want to be available to the user.I know that excel 2010 docs can be used within sharepoint by inserting a web part which uses exceservices.But can it be achieved without sharepoint? Or can it be achieved using the the excelservices API to get the document from shreapoint and then somehow get it to the browser in .net?

View 1 Replies

C# - Server Control Library Calling Its Own Services?

Nov 18, 2010

I am posting this as a part of my effort in searching the best possible design solution for my requirement. I am currently working on a complex server control(not user control) in asp.net which is going to be rendered into html elements on the client side.And those html elements needs to do a ajax call backs to the server using js/jquery. Here is the problem. As this is a serverside control and can be added into any application/domain. I dont want to have those callback services hosted separately. Is there any way that I can host those server callback services in the same library? If so, how can I access them from the client side?

View 1 Replies

Changing Document Library Default View?

Jul 22, 2010

I basically have quite a large site collection with various site and sub sites that all contain their own document libraries. I need to change the default view of each document library to include the following fields:

Checked out to.

Check in comments.

This is ok as I have written an app that will loop through all existing lists and do this however is there a way I can change the template for a document library so that any future lists that are created will automatically contain these two fields in the their default view?

I am using WSS 3.0.

View 1 Replies

Gdata Api - Seek Library To Integrate Google Services?

Jan 28, 2011

Sometime earlier this week i saw a reference to a commercial library (think was priced at 299) that wrapped up all the various GoogleDocs family of services - have lost the link. I've searched codeplex and VS's Library Manager without joy.I'm aware of Google's sdk but would prefer working with a higher abstraction - though a verbose kickstarter project that integrates gData to an asp.net datatier would be nice.

View 1 Replies

C# - How To Integrate Sharepoint Document Into Web Application And Adding Credentials For External Users

Sep 9, 2010

Being new to integrating sharepoint documents into web applications I am struggling with the following task, so anyI have a page in my web application that needs to display a document from sharepoint.I use the appropiate sharepoint web service to get a list of all the documents in the sharepoint list, I then pick out the one I would like to retrieve and get the path to the document so i would end up with something like:

Company%20Hire/Hire%20Site%20Price%20Lists/0.pdf
Within our network I can do following:
iframePdf.Attributes[
"src"] = ConfigurationManager.AppSettings["SharepointUrl"] + _filePath;

This would display the document in iframe... problem I have is coming from outside the network the sharepoint site can't be accessed (due to firewalls etc). We do have a vpn back to our network on the external server our web application sits on. If i was to use the document url in a browser on the server I am prompted for credentials and then get to view the document.Is there a way for the web application to use the vpn, use credentials i give (e.g through impersonation) to access the document and display it to exernal clients?

View 2 Replies

Use Sharepoint As The Back - End Versioning And Storage For Custom Document Management Website?

Apr 16, 2010

I want to build a custom document management web application that ties in with sharepoint for the actual document versioning and storage. I'm hoping for something like a sharepoint widget that I can plug into my web application that would allow me to tie in with sharepoint and download documents, make edits to them, and upload them back to sharepoint, with sharepoint handling all of the versioning and storage. Basically I'm looking for a sharepoint API. If WSS is the answer to this, are there licensing issues that I need to consider?

View 4 Replies

Web Forms :: Error - Could Not Contact Sharepoint Server For List Of Document Libraries

Feb 15, 2011

I am creating one new silverlight webpart from VS Sharepoint 2010. If i am creating the silverlight application its asking for the sharepoint local site url, i gave the valid url but its showing the ["could not contact sharepoint server for list of document libraries. check your sharepoint URl"].

how to resolve this error.

View 1 Replies

C# - Library To Convert Word Document Text To HTML?

Oct 19, 2010

Is there a .Net open source library to convert the word dococument to HTML to display inside the webpage.

I know several tools to convert word docs to html files, but my requirements is to convert the doc(either from the file or just extracted text) to HTML on the fly in the ASP.Net application.

I found the converting-a-word-document-into-usable-html-in-php PHP library do the same thing, is there any similar tool in .net?

View 2 Replies

MVC :: Integrate Document Management Library 3rd Party Control

Mar 7, 2011

I want to intergrate Document Management Library into my mvc application. so is there any Document Management Library 3rd party control or service available. so i can easily intergrate it into my site.

View 3 Replies

Installing Windows Application On Client System (Example: Windows Update From Microsoft Site)

Nov 23, 2010

I have a ASP.NET application. From that, User register, User will get email after registration. My Req : When user click on link provided in email. Then it should go to my ASP.Net application page . That page should install a wincows application on Client system through web ( I was inspired by Microsoft Windows update from Microsoft site)

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved