-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception: "Operation could destabilize the runtime" when running in Medium Trust #2
Comments
[VerificationException: Operation could destabilize the runtime.] lambda_method(ExecutionScope , CsvWriter , UserInfo ) +51 System.Action`2.Invoke(T1 arg1, T2 arg2) +0 WA.FileHelpers.Csv.CsvWriter.WriteRecords(IEnumerable`1 records) +353 |
Also, this is how I'm calling the WriteRecords function: MemoryStream memoryStream = new MemoryStream(); StreamWriter streamWriter = new StreamWriter(memoryStream); using (var csvWriter = new CsvWriter(streamWriter)) { csvWriter.WriteRecords(storeCustomers); } StreamReader streamReader = new StreamReader(memoryStream); string csvOutput = streamReader.ReadToEnd(); |
never mind, it had something to do with how i was opening/closing the streams/readers |
OK. Closing. |
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm calling the "CsvWriter.WriteRecords()" function from an ASP.NET IHttpHandler (.ashx) running in Medium Trust, and it's throwing this exception:
[VerificationException: Operation could destabilize the runtime.]
lambda_method(ExecutionScope , CsvWriter , UserInfo ) +51
System.Action
2.Invoke(T1 arg1, T2 arg2) +0 CsvWriter.WriteRecords(IEnumerable
1 records) +353"UserInfo" is just a C# class of mine that holds some user properties (username, email, etc.)
The text was updated successfully, but these errors were encountered: