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

Some small fixes #33

Merged
merged 3 commits into from
Sep 15, 2022
Merged

Some small fixes #33

merged 3 commits into from
Sep 15, 2022

Conversation

svrooij
Copy link

@svrooij svrooij commented Sep 29, 2018

This PR will fix 2 small issues:

For the TimeZones I created a small extension so that it doesn't disturb anything, but it doesn't crash on Ubuntu because of adding duplicate TimeZoneId's

You commented out the sending of the headers with the HttpClient, probably because of that they didn't validate in the MediaTypeHeaderValue. I changed it to just send the Content-Type anyway.

Stephan van Rooij added 2 commits September 29, 2018 12:41
This solved part of the timezone problem and shouldn't cause any
other problems

Thanks ststeiger in issue sherlock1982#16
@sherlock1982
Copy link
Owner

I will check, thanks!

@adz
Copy link

adz commented Jun 26, 2019

Hi @sherlock1982 - could you consider please merging this and releasing a new nuget?

We have been struggling with code that works with Office365, but fails with Exchange 2010.

Specifically, the error was:

InnerException was: Microsoft.Exchange.WebServices.Data.ServiceRequestException: The request failed. Cannot process the message because the content type 'text/plain; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.

---> Microsoft.Exchange.WebServices.Data.EwsHttpClientException: Cannot process the message because the content type 'text/plain; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.

After this change that allows setting content type, everything appears working ok.
Seems like no content type was set before...

@svrooij
Copy link
Author

svrooij commented Jun 26, 2019

For now I'm just running this in a private nuget feed on Azure DevOps.

@svrooij
Copy link
Author

svrooij commented Jan 4, 2021

Closing this stale PR

@svrooij svrooij closed this Jan 4, 2021
@adz
Copy link

adz commented Jan 5, 2021

Could we merge instead? Are the issues fixed elsewhere or can I do something to make the PR it acceptable?

@svrooij
Copy link
Author

svrooij commented Jan 5, 2021

@adz they are fixed in this old pr. I'm using a private nuget in the mean time.

Seems this repo isn't maintained anymore.

Yesterday I closed several stale PR of mine

1 similar comment
@svrooij
Copy link
Author

svrooij commented Jan 5, 2021

@adz they are fixed in this old pr. I'm using a private nuget in the mean time.

Seems this repo isn't maintained anymore.

Yesterday I closed several stale PR of mine

@adz
Copy link

adz commented Jan 5, 2021

Oh right. I thought maybe you were a maintainer. Thanks - I'm also using a fork.

@tjmoore
Copy link

tjmoore commented Sep 15, 2022

Could this be merged @sherlock1982 ? I see you've merged a change recently for 2.0.0-beta3 so this repo doesn't seem entirely dead.

Project I'm working on has hit the issue in #16 when running on Linux (CentOS 7 based) and get "An item with the same key has already been added. Key: Dlt/1941" when creating appointments. It would appear that it's this issue.

@sherlock1982 sherlock1982 reopened this Sep 15, 2022
@sherlock1982
Copy link
Owner

@tjmoore could you pls resolve conflicts? The issue is that i can't really test it - I don't have on premise exchange and don't have a lot of time.
If you say it's ok - let's merge it.

@tjmoore
Copy link

tjmoore commented Sep 15, 2022

It's not my PR, it's @svrooij

I'd probably have to do my own PR unless I can add to this one, if I can work out the conflicts, unless @svrooij wants to fix the conflicts. I can test that it solves our issue.

@tjmoore
Copy link

tjmoore commented Sep 15, 2022

Thanks @svrooij 👍. How would I build this as a nuget package I can try out, or can it be published anyway?

@sherlock1982
Copy link
Owner

I will publish tomorrow. Glad this work was helpful :-)

@sherlock1982 sherlock1982 merged commit a5c2333 into sherlock1982:master Sep 15, 2022
Comment on lines -93 to +98
message.Content.Headers.Clear();
message.Content.Headers.Add("Content-Type", "text/xml; charset=utf-8");
//if (!string.IsNullOrEmpty(ContentType))
// message.Content.Headers.ContentType = new MediaTypeHeaderValue(ContentType);

if (!string.IsNullOrEmpty(ContentType)) {
message.Content.Headers.ContentType = null;
message.Content.Headers.TryAddWithoutValidation("Content-Type", ContentType);
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick check. Is this the same effective fix as PR #52 ? (the change it replaces). That's where the merge conflict was I think as #32 was already fixed in 2.0.0-beta2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants