Sharepoint 2007 Client access of files - c#

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 .

Related

Azure storage files force download to browser

I have my files stored in Azure File System and here are the requirements -
User should be able to view the documents without downloading it to the local
This is working fine for pdf but not any other mime types
I tried setting Content-Type,Content-Disposition (in azure file properties but no luck) and also iframe.
User should be able to edit the doc online without downloading.
I don't think this is possible just with Azure and have to integrate with One Drive may be? Correct me if I am wrong?
I would really appreciate any inputs/thoughts.
Not sure if this is a viable option but using Storage Accounts in Azure, you can map these accounts as a network drives to any client machine. So they would be able to access these files via File Explorer.
This link covers the basic steps in setting it up.
Unfortunately for anyone who wishes to use this feature, they need to be on Windows 8 (or above) to be able to map a network drive successfully as it uses SMB3.
If this option is a no go I will delete the post.

Web service to interact with sharepoint

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.

Creating FTP client for asp with C#

I have a little problem because on my website I can't really set permissions for the directories, it just doesn't work. I use filezilla and when I try to set them to some subdirectories of a default directory of the server that is publicly readable and writable it doesn't send me an error but when I want to save a file in one of that subdirectories from an asp page I get an error telling that I haven't got the permission to do so, I tried setting 777, so it should work. Using C# I created a FTP client that allows me to edit those subdirectories (those I couldn't edit from the asp page). My question is: can I create an asp page that uses a FTP client to access one of those subdirectories????? Thanks!!!
As I mentioned before you could try WCF and stream files to your server using a web service.
WCF could be fairly complex; however, there is plenty of tutorials online. You could start with this simple tutorial and adjust it to accomplish what you need. They even provide source code.
Basically what you need is a web service with one method, say:
void UploadFile(Stream object)
Then you need to create a web reference from your client (windows form app for example) by providing the address of your WCF web service. This will automatically create the classes you need to execute the method.
This site has more info about streaming files:
set permission to the account that your website uses to access any directory.By default in IIS iis_user account is used.Chage your web site user account to ftp user or any account that have the permission to access those directories.You can easily change this permission using iis7 manager.

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.

Browse to a file directory and display its files in a listview

Would anyone offer tips, links, code snippets on how to browse to a file folder from within an ASP.NET 3.5 web application and list the folder contents within a ListView?
Regards,
Rey R. [neophyte web application developer]
I assume you mean at the client? In which case, using regular methods you are limited to the <input type="file"/> and whatever that does in your user's browser.
Beyond that, you need additional tools; for example, flash or Silverlight - which would allow access, but even that may be sand-boxed for security.
You certainly can't list the user's files from the server.
Upload Multiple Files in ASP.NET using jQuery
http://www.dotnetcurry.com/ShowArticle.aspx?ID=317

Categories

Resources