Web service to interact with sharepoint - c#

I am in need of some assistance on a current project. I'm working on a windows service that downloads specific sharepoint files and converts them to a pdf, then emails them to multiple recipients.
The server doesnt have access to the sharepoint library so Microsoft.Sharepoint assembly reference wont work is there another way to access the files and download them? once I get the file (probably word docs) I need to convert them to pdf.

SharePoint supports WebDAV and that can be used to get individual files provided you know where they are already. However a word of caution, this does require that the domain user that use to get the file must have the "File Browse" permission I believe.

I am assuming you cannot deploy anything to the Sharepoint server
SSRS ReportViewer which is part is Sharepoint can be used to batch create PDF's as it has an export option, You will find them also as part of Visual studio 2010
http://forums.asp.net/t/1556522.aspx/1
Is an example of this.
Then use the web requests to fetch the file.

Related

Creating SSRS report with Active Directory data

I have to create a SSRS report with data from Active Directory. I have gone through few blogs which suggested using ADSI and SSIS to perform this. I do not have permissions to create SQL table so cannot use SSIS option. Any other suggestions on extracting Active Directory data?
Without a linked server, perhaps you can use Directory services and a simple app.
Make a visual studio program with a System.DirectoryServices reference and proper permissions.
Pull the data you want from the server and dump it into an xml and save it in a place the report services can reach. Use the xml to build the report.
Run the app regularly on a schedule to update the xml file.

MOSS 2007 exporting documents using C# on XP machine

I looked at forums and some blogs to find out my answer but could not so posting here.
We have MOSS 2007 and a library where we have documents are stored, I would like to run a client utility which runs a day and export all documents imported on that day along with metadata(Column names)
I don't want to install SharePoint server on VHD or on my development environment because I don't think that just for this cause I need to to have Dev SharePoint environment. I don't want to develop this on my development SharePoint environment and give it to my SharePoint team to deploy on server because I feel I should be able to do just on my XP machine.
As SharePoint object model is available, why I cant take missing dll from server and write a small C# utility to export documents to file system? I assume I should be able to do this with SharePoint web service but my question is can I do with SharePoint object model on my XP machine? I don't want to ask my admin to use stsadm to do required work as part of script.
In SharePoint 2007 there is no support for client-side access to the (server) object model. You have to use web services to comply with the requirements you've presented.
Also, it is not possible to take SharePoint DLLs to a client machine without SharePoint installed, and compile—or even run—code with them. It might be possible to achieve compilability, but the process is tedious and makes no sense at all providing it won't ever run on such machine.
You don't need any DLLs from SharePoint 2007 to use web services.
Getting just DLLs be painful for development - you'll be able to compile your code, but to run/debug you still need full installation of SharePoint.
Note that there is special https://sharepoint.stackexchange.com/ dedicated to SharePoint questions.

Sharepoint 2007 Client access of files

I am trying to gain access of files within specific folders in Sharepoint 2007 from the client side. I am being told that this isn't possible, but when you have a file open from within the folder you can check in and check out the file, so obviously you are able to access the site from the client side. My question is, if I create a excel add in, am I able to open up another file within the Sharepoint site, and get the contents such as, versions and what not?
Has anyone done this before?
Thanks for any help, or links.
Yes it is possible to get files (regular HTTP GET on document's Url) and obtain most properties of the documents and list items using SharePoint web services - http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx .

which sharepoint project should be created in VS2010?

I want to get some useful data from *.csv file through the retrieve query, then put these data in the reference column of the sharepoint list using the admin account.
Which sharepoint project in VS2010 should I choose? And what should I do in next?
Thanks
如果我是要从 *.csv 文件中取一些数据 ,然后放到sharepoint上, 应该选择哪种工程呢?然后接下来应该怎么做呢?
谢谢
If you only need to run this job once you could create a console application and let it run on the server. Include a reference to the Microsoft.SharePoint.dll to be able to use the Object Model of SharePoint. See http://msdn.microsoft.com/en-us/library/ms473633.aspx for an overview of the different objects you can use. (SharePoint 2010)
If you have no access to the server you could try the same using the webservices that sharepoint exposes. See http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx for a list of the webservices in WSS3.0
But if you need it be done regularly your better of creating a webpart or a custom service to include into SharePoint. See http://msdn.microsoft.com/en-US/sharepoint/ee513148.aspx for an intro on building a WebPart for SP2010.
Google around, there is a lot to find about interaction with sharepoint through its object model.

Open/handle Word documents like SharePoint

Could anyone point me in the right direction when it comes to handling Word documents (.docx) on the server using asp.net.
I know I can write to and read the .docx document using the API provided.
But I would like to implement this like SharePoint does it. The user browses the web site, he is logged in, then chooses to make a new Word document in a folder, then the Word document downloads and opens locally. Then I would like the user to be able to save the document back to the server.
Alternatively, is there any good components for reading/writing Word documents in the browser. I have tried using the Telerik editor component without any luck.
First: About Sharepoint & Word: Sharepoint is using a protocol called WebDAV to provide this.
Afaik is WebDAV a standard protocol included with IIS (Install Windows Components). Windows can talk with WebDAV like it's some mounted drive, and therefore Word can handle .doc files that are served from there. To communicate with the WebDAV instance from ASP.NET you can use http://www.independentsoft.de/webdav/index.html.
I guess redirecting the user to the Word doc on the WebDAV server should get it working for the user, but I'm not sure about that. Never actually implemented a WebDAV solution.
Good editor: If you have a small set of users, you should have a look at xstandard, I found that by far the coolest rich text editor available. Yet it works with Java/ActiveX, so your users should install the component at first, but it supports image drag-drop etc. I have never seen a native in-browser editor that gives me a good experience (Telerik came closest 2 years ago).
You can integrate with the Zoho writer api http://writer.zoho.com/home?serviceurl=/index.do

Categories

Resources