MOSS 2007 exporting documents using C# on XP machine - c#

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.

Related

Edit docx/xlsx/pptx file online(in browser) without storing file in cloud and save changes back to server

Can you guys please help me in finding out how to edit microsoft documents online (in browser) without importing it to a cloudstroage and then saving back the changes to server.
Things to be noted:
I should be able to implement this in ASP.NET web forms.
No document should be stored over cloud.
Is webdav a better option compared to WOPI ?
if you want to use the browser edit experience that is in office online, you need to use Office Online Server installed on premise and the WOPI iframe that provides the office application.
More info can be found at https://learn.microsoft.com/en-us/officeonlineserver/office-online-server
If you do not wish to use sharepoint you need to provide another server to serve the files to the office online iframe.
One of the solutions is WOPI server that provides files for the office online server iframe locally from your infrastructure - there are many avaliable a good starting point is:
https://github.com/petrsvihlik/WopiHost

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.

What is the difference between ASP.NET site and SharePoint site?

I am new to SharePoint development. I wanted to know what is the difference between a SharePoint site and .NET site. When to use SharePoint and when .NET?
SharePoint is a massive "application platform" -- Intranet Portal, External Website, Collaboration Tool, Business Intelligence Agent, Content Management System, Document Retention System, etc -- that utilizes ASP.NET. (SP comes standard with hundreds, if not thousands, of ASPX pages.)
On the other hand, a plain ".NET" site does not need to have SP installed: just IIS with any required ASP.NET extensions.
You use SP when you need it and/or are told to use it. It's Okay -- but generally not teriffic -- at what it does (and it does a lot). But it's big and expensive. (Microsoft "recommends" something like a minimum of 7 servers for a "basic" SP Farm, but it can run as a single instance.)
That's it. Really.
As others have pointed out, SharePoint Foundation is "Free" insomuch as there is no SharePoint CAL or SharePoint server fees. Do not, however, discount the cost of any additional requirements..
SharePoint is a web based collaboration tool built using ASP.NET. The .NET framework (and ASP.NET) is a toolset that allows you to build applications / websites + more.
You can build on top of SharePoint / Dynamics CRM 2011 using the underlying application as a framework providing goodies such ad Security, Logging, Workflow, Persistence, File Storage, Alerting, etc.
SharePoint is an enterprise information portal, from Microsoft, that can be configured to run Intranet, Extranet and Internet sites. Microsoft Office SharePoint Server 2007 allows people, teams and expertise to connect and collaborate. A SharePoint enterprise portal is composed of both SharePoint Portal and Windows SharePoint Services, with SharePoint being built upon WSS. WSS is typically used by small teams, projects and companies. SharePoint Server is designed for individuals, teams and projects within a medium to large company wide enterprise portal.
With ASP.net you have a very well documented, battle-hardened, mature and stable platform with a good API. ASP.net is more reliable, Simpler to customise look and feel. Pages render faster in native ASP.NET rather than being hosted in SharePoint. Server requirements are reduced as SharePoint services are not running/not required. Simpler development and deployment model and debugging (no .webpart & GAC deployment required).

Windows Service to upload files on SharePoint server. Some questions

I would like to upload some files on a server Share Point.
My questions are:
1) I started developing my project as a Windows Service but I read several parts of this WebService. It's mandatory that it's be a WebService?
2) I added the references to. Dll take it from my SharePoint Server (as seen in most discussions) but a little read more shares can not be tested if not solely on where you installed SharePoint Server. Right or there are alternative methods to do this? And also, when we deliver the service, can I install the latter on a machine where SharePoint is not installed (it seems a trivial question, but it seems strange not being able to test
but you install it).
You can only reference SharePoint 2007 assemblies from code that is running on the machine where SharePoint is installed (if you were using SharePoint 2010, you could take advantage of the Client Object Model).
Only the part of your solution that is directly interacting with SharePoint has to be created as a web service. You should create a web service with basic methods like UploadFileToLibrary, deploy it to SharePoint machine and then call these methods from the client (it can be an ASP.NET page or desktop application).
As Kit Menke pointed out in a comment below, it is possible that built-in SharePoint web services will be sufficient for you needs and you won't have to create a custom one:
Upload a file to SharePoint through the built-in web services
Copy.CopyIntoItems method

How to host a Silverlight app in a Sharepoint 2007 Web Part

There has been a flurry of updates released to Microsoft's Silverlight over the past couple of months (Silverlight 2 beta 2 runtime + dev tools, RC0 + dev tools which broke beta 2 apps), and recently Microsoft has released the RTM.
I have been trying (unsuccessfully) to integrate Sharepoint 2007 and Silverlight. Many of the sharepoint/silverlight blogs i have read are outdated, meaning that they target SL Beta 2.
So, my question is...
What steps are necessary in order to host a Silverlight 2.0 (RTM) application, in a web part, on Sharepoint Server 2007 ?
I haven't tried this out but
it seems like a good start:
Silverlight Blueprint for SharePoint
This isn't too difficult to do. There are a few steps you need to follow:
Update IIS with the xap mime type.
Put your files some that SharePoint can get them. In our case we developed a feature which deployed the silverlight javascript files and our xap out to folders in the ISAPI folder (%Program Files%\Common Files\Microsoft Shared\web server extensions\12\ISAPI). We created a folder called _xaps to host these files.
Put the Silverlight object code in either the page itself or in a content web part.
[EDIT: For some reason my object code isn't showing up. So here is a link to an example instead]
That's all there is to it. You're probably best off creating a feature to copy of the files and update whatever page you're hosting the control in. But to just stick silverlight in SharePoint the above should work.
This might help: http://www.u2u.info/Blogs/Karine/Lists/Posts/Post.aspx?ID=40
If you are going to be using User Controls [i.e. Web Parts], then I'd highly recommend looking at SmartPart. You'll still need to do the things in the blogs above to get the assemblies recognized, trusted, etc, but this may help you get your user controls deployed faster.

Categories

Resources