dm_team Posted September 4, 2009 Share Posted September 4, 2009 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 More sharing options...
aspnetguy Posted September 4, 2009 Share Posted September 4, 2009 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. Link to comment Share on other sites More sharing options...
dm_team Posted September 7, 2009 Author Share Posted September 7, 2009 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.