FileResult with MemoryStream gives empty result .. what's the problem?

后端 未结 2 1971
一生所求
一生所求 2021-02-18 16:37

I\'m generating ics files ( iCalendar or RFC 2445 or however you call them) using a library that serializes the ical contents into a MemoryStream, or actually any type of stream

2条回答
  •  有刺的猬
    2021-02-18 17:20

    Just a guess: Do you need to Seek back to the start of the stream before you return it?

    fs.Seek(0, 0);
    

提交回复
热议问题