Mac OSXのMono 3.xを使用していて、ServiceStackで静的ファイルを返そうとしています。コードは非常に簡単です:FileInfoを返すときにヘッダーを書き込むエラーHttpResult
public class AirPlayService : Service
{
public object Get(Movie request)
{
var fileName = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Movies", request.Name);
var file = new FileInfo(fileName);
return new HttpResult(file, asAttachment:false);
}
}
Movieオブジェクトは単純なDTOです。
私の取得は、()私は、ターミナルウィンドウに次のエラーが表示呼び出さ :
ERROR: Error occured while Processing Request: [IOException] Write failure, Exception: Write failure INFO: Failed to write error to response: {0}, Exception: Cannot be changed after headers are sent. ERROR: Error in HttpListenerResponseWrapper: Write failure, Exception: Write failure
ServiceStackは、バージョン3.9.35です。 Mono JITコンパイラのバージョン3.0.3(master/39c48d5 Tue Jan 8 12:12:24 EST 2013); .NET 4.5。
私は間違っていますか?
(今Xamarin Studioを使用して)MonoDevelopのとServiceStack(3.9.38)の最新バージョンで解決されるようです。 – Richard
答えとして見つけた解決策を追加できますか?これにより、将来のユーザーの回答が早くなり、評判が上がるようになります。 –
@Brent素晴らしい編集、バッジの狩猟? – CodeCaster