Error message during 'PDF.Save'

We have the configuration where an image file is located on a file server and IIS is on a separate server. We add this image to an Aspose PDF and during 'PDF.Save("filename.pdf", Aspose.Pdf.SaveType.OpenInBrowser, Response)” the following error is generated because 'System.Net.FileWebRequest' is called.

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 str) +723
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync) +46
   System.Net.FileWebStream..ctor(String path, FileMode mode, FileAccess access, FileShare sharing, Int32 length, Boolean async) +25
   System.Net.FileWebResponse..ctor(Uri uri, FileAccess access, Boolean asyncHint) +110
 
[WebException: Logon failure: unknown user name or bad password.
]
   System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase) +497
   System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData) +598
   System.Net.AsyncGetResponse.EndInvoke(IAsyncResult result) +0
   System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult) +72
   System.Net.FileWebRequest.GetResponse() +141
   ঒..(Uri ) +50
   ঒.ኘ.ኙ( ሑ, Int32 , String , Boolean ሖ, Stream ) +502
   ঒.ሓ.ሔ( ሑ, Int32 ሕ, ImageFileType , String , String ఑, String , Int32 , Int32 , Boolean , Boolean , Boolean ሖ, Byte[] , Stream ) +2183
   ঒..(ImageFileType , String , String ఑, String , Int32 , Int32 , Boolean , Boolean , Byte[] , Stream ) +338
   .ᔡ.ᔫ(Pdf ᐚ, Section ᔬ, HeaderFooter ᎛, Cell ᓠ, Image , Ꮙ Ꮧ, Boolean ᔣ, ᔻ ᔩ) +2125
   .ᛝ.ᙥ(Pdf ᐚ, Section ᔬ, HeaderFooter ᎛, Table ઱, Row ᓄ, Cell ᓠ, Ꮙ Ꮧ, Boolean ᔣ) +2817
   .ᛝ.ᙜ(Pdf ᐚ, Section ᔬ, HeaderFooter ᎛, Table ઱, Row ᓄ, Ꮙ Ꮧ, Boolean ᔣ) +335
   .ᛝ.ᙲ(Pdf ᐚ, Section ᔥ, HeaderFooter ᎛, Table ઱, Ꮙ Ꮧ, Boolean ᔣ) +2888
   .ᔡ.ᔧ(Pdf ᐚ, Section ᔥ, HeaderFooter ᎛, Ꮙ ᔦ, Boolean ᔣ) +638
   .ᔡ.ᔤ(Pdf ᐚ, Section ᔥ, HeaderFooter ᎛, Ꮙ ᔦ, Boolean ᔣ) +96
   .ᙏ.ᙑ(Pdf ᐚ, Section ጳ, Ꮙ Ꮧ) +1683
   .ࣷ.ᑎ(Pdf ᐚ) +509
   .ᐕ.ᐙ( , Pdf ᐚ) +327
   Aspose.Pdf.Pdf.Save(String fileName, SaveType saveType, HttpResponse response) +243
   wps.wpsapp.RiskASPNET.Reports.RiskOnePagePDF.Page_Load(Object sender, EventArgs e)
   System.Web.UI.Control.OnLoad(EventArgs e) +67
   System.Web.UI.Control.LoadRecursive() +35
   System.Web.UI.Page.ProcessRequestMain() +733


Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032

I think this is a file accessing permission problem. Please make sure the application server has the right permission to access the image file. If you still can’t resolve the problem. Please provide more detailed info about your configuration and provide the code also.