データをロードして、Webサービス(WCFではなく従来の.Netサービス)を実装しました。ユーザーコントロール。このWebサービスは、私が作成したユーザーコントロールから呼び出されています。しかし、Webサービスを使用してファイルを読み込もうとすると、バイト配列の代わりにエラーが発生します。以前と同じように、私のローカルマシンのすべてで完璧に動作し、開発中のすべての地獄が緩んでいます&ステージング環境。テストの一環として、単純なバイト配列を返すようにWebサービスを変更しました.3つのインスタンスすべてでうまく動作し、Webサービスが期待どおりに動作していることを検証します。以下は、このエラーを返すWebサービスのエラーとコードです。System.Web.Services.Protocols.SoapException:サーバーが要求を処理できませんでした - 装置が準備されていません
どのような考えですか?
注:webmethodは、相対パスではなく、サーバー上のファイルの絶対パスを渡すことで呼び出されます。
ERROR:
Webページエラーの詳細
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDR; .NET4.0C)
Timestamp: Thu, 13 Jan 2011 04:29:30 UTC
Message: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.IOException: The device is not ready.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at 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)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at TXTextControl.LoadSettings.?(String A_0, StreamType A_1, ? A_2, ? A_3)
at TXTextControl.ServerTextControl.Load(String path, StreamType streamType)
at DocumentManager.DocumentService.Document.Load(String documentLocation) in C:\Webs\AR\DocumentManager\DocumentManager\Document.asmx.vb:line 21
--- End of inner exception stack trace ---
Line: 23
Char: 13
Code: 0
CODE:無効なパスを送っているよう
<WebMethod()> _
Public Function Load(ByVal documentLocation As String) As Byte()
Dim serverTextControl As New TXTextControl.ServerTextControl()
Dim documentData As Byte() = Nothing
Dim docLocation As String = Server.UrlDecode(documentLocation)
serverTextControl.Create()
'serverTextControl.Text = "This document has been loaded from the server " & System.DateTime.Now
serverTextControl.Load(docLocation, textControlUtility.computeStreamType(documentLocation))
serverTextControl.Save(documentData, TXTextControl.BinaryStreamType.InternalUnicodeFormat)
serverTextControl.Dispose()
Return documentData
End Function
Try/Catchはお友達ですか? –