이 코드는 localhost/IIS에서 완벽하게 작동합니다. 첨부 된 pdf로 이메일을받습니다. 그러나, 그것을 IIS7 서버에 복사하면 실패합니다. 어떤 아이디어?이 전자 메일 첨부 파일이 로컬 호스트가 아닌 asp.net 서버에서 실패하는 이유는 무엇입니까?
The device is not ready.
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: The device is not ready.
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: The device is not ready.
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1093
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, Boolean useLongPath, Boolean checkHost) +886
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +127
System.Net.Mail.AttachmentBase.SetContentFromFile(String fileName, String mediaType) +104
오류 메시지를 게시 할 수 있습니까? –
죄송합니다. 그냥 잊어 버리 셨습니다. pdf 파일을로드하려고 할 때 "장치가 준비되지 않았습니다". –
좋아요 ... 문제가 해결되었습니다. 로컬 개발 상자에서 모든 것을 다시 컴파일하고 서버에 다시 배포했습니다. 5 ~ 6 번 시도한 후에 지금 일하기 시작했습니다 ... 이유는 모르겠지만, 이봐 요, 그 일은 .... –