I have a requirement to allow users to open word document from web page and edit locally by using MS Word application. finally they should be able to (post back)save the modified document to server.
For the above requirement I have chosen ASP.NET, C#, .NET 3.5, IIS, IE6 (or above) and MS Office 2007 (should be in all workstations).
I have developed a ASP.NET web application, which has three aspx pages Login.aspx, DocList.aspx and SaveDoc.aspx.
- Login.aspx - Authentication/Authorization. (Authentication type:Forms)
- DocList.aspx - To display/Download word documents.
- SaveDoc.aspx - To save modified word document in server.
And also I developed a shared word ribbon add-in, which helps the user save the modified document to server by clicking "Publish" button in add-in. web client has been used to upload the modified document. In order to save the modified document to server, this add-in should be installed in all workstations.
string modifiedWordXml = applicationObject.ActiveDocument.WordOpenXML;
WebClient client = new WebClient();
string serverAddress = "http://localhost:51507/DOCMGR/SaveDoc.aspx";
byte[] byteArray = Encoding.UTF8.GetBytes(modifiedWordXml);
byte[] responceArray = client.UploadData(serverAddress, byteArray);
string res = Encoding.UTF8.GetString(responceArray);
MessageBox.Show(res,"Document Manager");
Web page is displaying list of word document links, upon clicking on the link the word document is open up in separate MS Word application in client. There, User can edit the document and upon clicking "Puplish" button on add-in ribbon, modified document successfully saved to server.
My requirement is satisfied and everything is working fine when authentication is disabled.
If I enabled Authentication, add-in failed to upload the modified document to server as it is not authenticated and could not share the Authentication cookies from the IE.
Is there is any workaround/solution to satisfy my requirement? Your help will be greatly appreciate.