gandra404
gandra404

Reputation: 6091

System.Runtime.InteropServices.COMException: The device is not ready

I am using third party library(DigitalOfficePro) in C# app which under the hood use Microsoft Interop. This app converts powerpoint presentation into html files.
In the local environment this works fine. On the remote server I am receiving following error:

2015-07-30 11:46:00,584 [10] ERROR Mintra.Publisher.DocumentConverter.Core.Presentation.Conversion.HtmlConversion.Convert(:0) (null) - System.Exception: Error durign conversion of file '\VIRT-PUB-STAGIN\converter_shared\ppt\Beerenberg_manual0_CellGlassCutting.ppt' to output location 'D:\converter_shared\converted\ppt\Beerenberg_manual0_CellGlassCutting' RETROWING! ---> System.Runtime.InteropServices.COMException: The device is not ready. ---> System.IO.IOException: The device is not ready. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) at System.IO.Directory.CreateDirectory(String path) at DigitalOfficePro.Html5PointSdk.PresentationConverter.c1234c1700677d6aa7d432fdb965c78bb(String c7fc9d9edb8de5e2eb0df0a4b94c9b98d) at DigitalOfficePro.Html5PointSdk.PresentationConverter.Convert(String outputFileNameWithPath) --- End of inner exception stack trace --- at DigitalOfficePro.Html5PointSdk.PresentationConverter.Convert(String outputFileNameWithPath) at Mintra.Publisher.DocumentConverter.Core.Presentation.Conversion.HtmlConversion.Convert(String pptInputFileName, String htmlOutputFileName) --- End of inner exception stack trace ---

Any idea what could be the problem?

My local environment details:
Windows 7 Ultimate (64x)
Microsoft Office PowerPoint 2007
Open XML SDK V2.5

Remote environment details:
Windows Server 2008 R2 (64x)
Microsoft PowerPoint 2010
Open XML SDK V2.5

Upvotes: 0

Views: 837

Answers (1)

CodeTherapist
CodeTherapist

Reputation: 2806

For me it looks like that your device (logical drive) D: is not ready.

            var driveInfo = new DriveInfo("D"); // or "D:\"

            if (driveInfo.IsReady)
            {
                // do your stuff..
            }
            else
            {
                // loggin, show to the user or throw an exception..
            }

Upvotes: 1

Related Questions