Jump to content

Error: Converting Office File To Xps In Wcf Service


dm_team
 Share

Recommended Posts

Hi,I have created the WCF service which will convert the Office document into XPS file. I did using Microsoft Interop assemblyMicrosoft.Office.Interop.Word.dllMicrosoft.Office.Interop.Excel.dllI am using silverlight application to show the XPS file. When i run the silverlight application with WCF is in same solution it is working fine. I was able to convert to XPS and show in silverlight. But i host the service in IIS 7.0and run the application, i am getting following error.Microsoft Office Excel cannot access the file 'C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\DataStreamPOC\Download\XPS\517d7310-8cd2-4bd2-9984-f1841ba858c9\Daily Tracker.xlsx'. There are several possible reasons: • The file name or path does not exist. • The file is being used by another program. • The workbook you are trying to save has the same name as a currently open workbook.File name is proper and it is not used by any one. I anm getting same error or all office document. How can i solve this issue?

Link to comment
Share on other sites

I have worked with the Interop assemblies a bit and found that when there was a failure the file handles were not released.Make sure you are error checking every fail point and releasing the file handle when you are doen with it.
Ya... i am handling the object properly.... as i said it is working fine, when i run the service in filesystem... but when i move the code to IIS 7.0, it is not working
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...