Hi,
I'm having some issues converting .doc to .pdf. It keeps on throwing is "Logon Failure, Unknown username or bad password".
This works fine in my dev environment, but it seems to be an issue on my hosted environment. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
The error is thrown on the pdf.Save( ) method. Weather, I pass in a stream or a filename.
The .doc file that I’m trying to convert to .pdf contains an image and few shapes and the rest is text. I think the problem lies with the image; in combination with our hosted environment. Our hosted environment is controlled by a 3rd party and its running of a NAS server. So all paths are relative (even if you go Server.MapPath(“...”) you will get \\nasserver\\websitedir\\temp.doc. And I think that is why it is crashing and burning in pdf.Save(). When it creates a temp image file; in using this temp image file throws the above below.
When I remove that image and run it again, everything is fine. It creates the .pdf perfectly. Very weird. Have you guys come across this issue before?
Logon failure: unknown user name or bad password.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.IOException: Logon failure: unknown user name or bad password.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[IOException: Logon failure: unknown user name or bad password. ] System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2056933 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +1038 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) +125 System.Net.FileWebStream..ctor(FileWebRequest request, String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async) +45 System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint) +80
[WebException: Logon failure: unknown user name or bad password. ] System.Net.FileWebResponse..ctor(FileWebRequest request, Uri uri, FileAccess access, Boolean asyncHint) +557 System.Net.FileWebRequest.GetResponseCallback(Object state) +309
[WebException: Logon failure: unknown user name or bad password. ] System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult) +227 System.Net.FileWebRequest.GetResponse() +231 Aspose.Pdf.Figure..ౣ(Uri ة) +97 Aspose.Pdf.Figure.ᑉ.ᑊ(ط ᅳ, Int32 ᅿ, String ؼ, Boolean ᇫ, Stream ل) +626 Aspose.Pdf.Figure.ᇨ.ᇩ(ط ᅳ, Int32 ᇪ, ImageFileType ػ, String ؼ, String ؽ, String ؾ, Int32 ؿ, Int32 ـ, Boolean ف, Boolean ق, Boolean ᇫ, Byte[] ك, Stream ل) +2859 Aspose.Pdf.Figure.ط.ع(Image غ, ImageFileType ػ, String ؼ, String ؽ, String ؾ, Int32 ؿ, Int32 ـ, Boolean ف, Boolean ق, Byte[] ك, Stream ل) +491 Aspose.Pdf.Xml.ᅬ.ᅱ(Pdf Ә, Image غ) +1151 Aspose.Pdf.Xml.ᙬ.᙮(Pdf ຫ, Paragraph ි, Single ى) +1820 Aspose.Pdf.Xml.ᙙ.ᙫ(Pdf Ә, Cell ) +1578 Aspose.Pdf.Row.(Pdf Ә) +233 Aspose.Pdf.Table.GetHeight(Pdf doc) +188 Aspose.Pdf.Xml.ᙇ.ᙉ(Pdf Ә, Section ྫ, Table म, ൜ , Boolean ᑕ) +15108 Aspose.Pdf.Xml.ᤏ.ᤑ(Pdf Ә, Section ྠ, Cell ฮ, FloatingBox ᤒ, ൜ , Boolean ᑕ) +2168 Aspose.Pdf.Xml.ᘼ.ᘾ(Pdf Ә, Section ྠ, ൜ ) +10287 Aspose.Pdf.Xml.ܣ.༽(Pdf Ә) +4038 Aspose.Pdf.Xml.᧹.᧾( Է, Pdf Ә) +751 Aspose.Pdf.Pdf.Save(Stream stream) +550 MyPDFCreatorHelper.SaveAsPdfAndReturnLocationUsingFileStream(String full_path, String gwr_employee) +319 CreateCorrespondence.LoadGuidelinesData() +510 CreateCorrespondence.Page_Load(Object sender, EventArgs e) +428 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436 |
There was one other similar post (see below), which may help you guys:
Jai