How to use webdav java server library to retrieve / save office documents? - webdav

We need to implement client / server to open / edit Office documents from server as confluence does. We have our server side implementations (web services) to download / upload documents. Also we have our authentication services that handle user authentication. We need to implement / configure WebDAV along with these existing services. So:
When Office application requests a document from WebDav servlet, webdav connects to our existing service to get the document and would use our existing authentication service to authenticate the user. What code do we need to write to handle this?
Save as above to save a document back.
Can anyone please help me on how to get a quick start on this? Any tutorial links?
Thanks & regards,
Nadeem Ullah

I recently implemented a prototype using the milton framework to browse the repository and open office documents from our DMS and made good progress. It´s wired up using spring and a filter in our deployment descriptor - so far I´m fairly impressed by milton. It´s easy to use and integrates quite well.

From what I know, Webdav protocol is what you are looking for.
Microsoft Office can open files from a WebDAV server and save them back to the server without the need to download them to local file system. To achieve this the following conditions must be met:
Your WebDAV server must support Class 2. Microsoft Office locks documents when creating and opening files for editing. If Microsoft Office is unable to lock the document it will be opened as read-only.
Your WebDAV server must be configured on the site root in case of MS Office 2007 or earlier. Microsoft Office 2007 and earlier may submit OPTIONS and PROPFIND requests to the site root (http://server/) and requires the server to respond properly. If your WebDAV server is non-root Microsoft Office 2007 and earlier may open documents as read-only. There is no this issue with MS Office 2010 and later versions.
https://www.webdavsystem.com/server/documentation/ms_office_read_only/
Please also look at Apache JackRabit which is a WebDav server. And search WebDav from github for other implementaions.

Related

Connections issues with MS Access to ASP.NET web application

I have hit a wall and can't figure out the heads from the tails. I am working with a team and we have developed an asp.net web application. There is a feature on the application that delivers directions from a database. The database is an MS Access database. I have published the application to an IIS7 Windows server. I also uploaded via FTP the Access database. We have tried all manner of connection string variants. We did not import the database in any way into Visual Studio but prefer to connect to where ever we decide to place it.
Now, I am wondering if using Access was a bad idea. Its a given that it was a rookie mistake since we are students working on our capstone project. Is there any other installs for the Access database that need to be installed on the server other than the driver for Access? Should my connection string be structured any other way that what it is presently? I will post the string below. Please note, I did not write this particular section of coding so if an error should be thrown it may be handled somewhere as to prevent the application from crashing on the user. Side note: Yes it does work fine on my local computer although the connection must be altered.
sConnection = #"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\inetpub\wwwroot\kioskApplication\www\Waypoints.accdb";
Thanks in advance for all the support and help with this issue.
Usually a WEB Application stores a file based database like MS-Access in its APP_DATA folder under the root of the site where every permission is granted to the IIS Service.
Then in your connection string you refer to this location using
Connection = #"Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=|DataDirectory|\Waypoints.accdb";
See Where is DataDirectory
On the server side there is no need to install anything apart from the Microsoft Database Access Engine appropriate for the bitness of your web application. (32bit or 64bit)

Case Study for CMIS and Alfresco

I am very new to enterprise content management concepts.
I would like to do a small hands or a case study before we embark on the full fledged thing.
My work will be mainly on the client side so I would like to get more experience in consuming server content.
For that I needed to get some experience on CMIS apis and their consumption.
I plan to develop a plain eclipse based client for the server. I would like to see the content in Eclipse RCP app.Kind of what alfresco explorer does.
I don't want install an alfresco server for myself as I would not work on the server side. How can I use an Alfresco server for my case study? Should I use the public alfresco server or the cloud based alfresco server?
Also please provide suggestions on my case study.
Ok..feeling much more enlightened after 4 hrs of CMIS and Alfresco exploration.
My query of getting a server got resolved by accessing the public cmis alfresco server which is available at http://cmis.alfresco.com/
I also downloaded CMIS Workbench for windows and have setup the alfresco server locally.
Both the servers can be connected with my java client (using Apache Chemisty libs).
to connect remotely to the Alfresco server a local resovable name should be used. IP is not recognized.
One more option is to get a free trial from the alfresco cloud.
cheers,
Saurav

How secure is it to open word or excel files in web browser in asp.net web application

I'm building a Document Management system in an asp.net 4.0 web application. The requirement is to open Office Documents in the web browser. The documents are stored in SQL server 2008 database in binary format.
Is it secure to open these files in the browser? If yes, then how to show/edit these files in a Web browser?
You can use WebDAV protocol to achieve this. It is an extension on the Http protocol and supported in IIS. http://en.wikipedia.org/wiki/WebDAV . Please refer to the WebDAV project at SourceForge for further details. It is a decent library for serving WebDAV content.
For dealing with the Binary (I presume in SQL blob) content, you'll have to write the content to a file and then serve it over WebDAV.

Deploy Office.Interop.Word Word 2010 on Server 2008 and calling methods from ASP.NET

I want to deploy Microsoft Word 2010 and Microsoft.Office.Interop.Word on Microsoft Windows Server 2008.
The user (just a few) visits an .ASPX page. Data is input there or selected from the database from the aspx page. Once data is collected, I want to invoke the a Word application instance on the SERVER and progematically insert the data into ranges in the Word document. That doc gets saved in a folder on the server and/or downloaded onto the user's local machine.
Can I deploy Microsoft Word and the interop assemblies on Win 2008 Server? If not, is there another solution?
i was facing the same error, after spending 2 days of my life i found this solution.
You need to assign permissions to the Microsoft office 2003 - 2007 object.
Please have a look.
Step 1
Go to the Component Services > Computers > My Computer > and select DCom Config
after this, go to the right pane and find "Microsoft Word 98 - 2003 Document" object
Step 2
Right click on the component and go to the properties and select "Security Tab"
Step 3
Add NETWORK, NETWORKSERVICE, IIS_IUSRS and Administrator users and assign them "Local" and "Remote" Access Permissions
Step 4
Now go to the "Identity tab" and select "This User"
In user and password textboxes type administrator crediantals and press "Apply" and "OK (must to save the changes)"
Step 5
Now restart your machine.
it'll works.
Regards,
Don't use Office on Server. Use Open XML...
See this Link:
Microsoft strongly recommends that developers find alternatives to
Automation of Office if they need to develop server-side solutions.
Because of the limitations to Office's design, changes to Office
configuration are not enough to resolve all issues. Microsoft strongly
recommends a number of alternatives that do not require Office to be
installed server-side, and that can perform most common tasks more
efficiently and more quickly than Automation. Before you involve
Office as a server-side component in your project, consider
alternatives.
Most server-side Automation tasks involve document creation or
editing. Office 2007 supports new Open XML file formats that let
developers create, edit, read, and transform file content on the
server side. These file formats use the System.IO.Package.IO namespace
in the Microsoft .NET 3.x Framework to edit Office files without using
the Office client applications themselves. This is the recommended and
supported method for handling changes to Office files from a service.
The Open XML file formats are a public standard. To obtain a copy of
the specification, visit the following Web site:
ECMA-376 Open XML Standard

Synchronization between Two SQL Server Databases, Online and Offline

We have a local intranet based Project Management tool, we built it in asp.net .net 4.0 and sql server 2008. We cannot access this system online as it is lan based, neither we want its files to be appear online. But most of the cases we and other managers need to post project on it from home, but the issue is we dont wana use this system only on online server but also local intranet should be working, live ip is not prefered in any case because of electricity issues etc. We have an idea in our mind, that if we launch the same published site on online server (dedicated vps), and people use to work on offline system, but we can make some .exe utility which will upload our latest records from offline server to online server using the internet, does sql server provide any built in functionality for this, what is the best way to do this, either with our own custom logic with windows task scheduler or .Net provides any kind of facility for that. The reason of not using this system only as online is, our employees used to upload files in GBs, and the internet is only 4MBps, which will slow down the work, also we dont want internet dependency every time, also there is security issue.
Regards
Atif
Check out Microsoft Sync Framework: http://msdn.microsoft.com/en-us/sync/bb736753

Resources