IIS upload jpg file to sftp server

孫玉樂 1 Reputation point
2022-05-05T08:30:28.2+00:00

Our company's development team uses IIS to upload jpg files to the sftp server. The source file is only 100Kb, but the file on sftp is 3TB. Open these files with a hexadecimal tool and find that they are all "00" completion bits. There is still the following warning log information on the IIS server. Does anyone know the reason?

Event code: 3005
Event message: 發生未處理的例外狀況。
Event time: 2022/5/3 上午 07:59:56
Event time (UTC): 2022/5/2 下午 11:59:56
Event ID: 759b13d42c26458a895abab9b4786811
Event sequence: 228
Event occurrence: 5
Event detail code: 0

Application information:
Application domain: /LM/W3SVC/1/ROOT/WebPage-1-132960094801933974
Trust level: Full
Application Virtual Path: /WebPage
Application Path: D:\IISProject\iPortalWebInterfaceV2\AppPlatform\
Machine name: ZZ-DMZ-KOUDAI47

Process information:
Process ID: 16064
Process name: w3wp.exe
Account name: IIS APPPOOL\DefaultAppPool

Exception information:
Exception type: CryptographicException
Exception message: 填補無效,而且無法移除。
於 System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
於 System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
於 System.Security.Cryptography.CryptoStream.FlushFinalBlock()
於 System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
於 System.IO.Stream.Close()
於 Utility.SecurityCls.Decrypt(String iInput) 於 D:\IISProject\iPortalWebInterfaceV2\Utility\SecurityCls.cs: 行 218
於 AppPlatform.Common.GetUserPhotoEncrypt.ProcessRequest(HttpContext context) 於 D:\IISProject\iPortalWebInterfaceV2\AppPlatform\Common\GetUserPhotoEncrypt.ashx.cs: 行 25
於 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
於 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
於 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Request information:
Request URL: https://www.ec.idpbg.foxconn.com:443/webpage/common/getuserphotoEncrypt.ashx?userno=LtU0nIdzO/Wd1OKAmkRrTg==role=KCWNgExCX7f4KQYL8C8LDw==
Request path: /webpage/common/getuserphotoEncrypt.ashx
User host address: 182.118.232.34
User:
Is authenticated: False
Authentication Type:
Thread account name: IIS APPPOOL\DefaultAppPool

Thread information:
Thread ID: 77
Thread account name: IIS APPPOOL\DefaultAppPool
Is impersonating: False
Stack trace: 於 System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
於 System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
於 System.Security.Cryptography.CryptoStream.FlushFinalBlock()
於 System.Security.Cryptography.CryptoStream.Dispose(Boolean disposing)
於 System.IO.Stream.Close()
於 Utility.SecurityCls.Decrypt(String iInput) 於 D:\IISProject\iPortalWebInterfaceV2\Utility\SecurityCls.cs: 行 218
於 AppPlatform.Common.GetUserPhotoEncrypt.ProcessRequest(HttpContext context) 於 D:\IISProject\iPortalWebInterfaceV2\AppPlatform\Common\GetUserPhotoEncrypt.ashx.cs: 行 25
於 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
於 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
於 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Custom event details:

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
{count} votes