Skip to content
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

Medium trust level #340

Closed
denes opened this issue May 15, 2016 · 7 comments
Closed

Medium trust level #340

denes opened this issue May 15, 2016 · 7 comments
Labels
bug Something isn't working

Comments

@denes
Copy link

denes commented May 15, 2016

Do you have MailKit in Medium trust level hosting?

@jstedfast jstedfast added the question A question about how to do something label May 15, 2016
@jstedfast
Copy link
Owner

I'm not sure what you mean. It's hosted on GitHub. I guess if that's Medium trust level, then yes?

@denes
Copy link
Author

denes commented May 15, 2016

When I'm running my code on the sharing host Server:

Inheritance security rules violated while overriding member: MailKit.Net.Imap.ImapCommandException.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext) . Security accessibility of the overriding method must match the security accessibility of the method being overriden.

My server hosting is configured in Medium trust level.

@jstedfast
Copy link
Owner

Try adding [System.Security.SecurityCritical] to the GetObjectData() method on ImapCommandException and see if that fixes it.

jstedfast added a commit that referenced this issue May 16, 2016
@jstedfast jstedfast added bug Something isn't working and removed question A question about how to do something labels May 16, 2016
@denes
Copy link
Author

denes commented May 23, 2016

Same problem in medium trust level. Is not working in version 1.2.23:

For your tests: put this in web config: <trust level="Medium"/>

@jstedfast
Copy link
Owner

Do you think you could dig into the problem and send me a patch to fix it? I have no knowledge of ASP.NET website development.

Thanks.

@jstedfast
Copy link
Owner

You can apparently fix this issue by adding the following to your web.config:

<system.web>
    <trust level="Full" />
<system.web>

@gyself
Copy link

gyself commented Aug 5, 2016

Will not work if your hosting doesn't support full trust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants