Closed bigdavidwong closed 1 year ago
Add some new found:
This part create a HTTPConnection instance, and the url.port is got from http.URL instance, the port would be set to 5985 if the url port is None:
The http.URL instance copy the arguments from woman info, and in property method, it was set to None, then led to the finally error
If I add some code here, things work:
Thanks for the info and testing the pre-release version, I'll have to look into this and provide a fix unless you wish to push through a PR.
Thanks for the info and testing the pre-release version, I'll have to look into this and provide a fix unless you wish to push through a PR.
I have not had a deep understanding of this project, and I am not a professional programmer, so I should not have the ability to PR at present, I will wait patiently for you to improve this version, after all, version 0.8.1 is already very powerful for me!
But in the future, if I already have the ability to contribute to this project, I will definitely participate as a fan, haha~
Sorry for the delay in fixing this, the PR https://github.com/jborean93/pypsrp/pull/165 fixes this problem by correctly defining the port needed in this scenario. It also fixes a few other problems in relation to on prem Exchange and Exchange online.
Hi Jordan,
I've downloaded the pre-release version [v1.0.0b1] package and installed it, now I have some trouble when I am using it to connect to Exchange PowerShell;
here is my code:
and I always get some errors like this:
I've tried to find out which step lead to this, and I think I've found it (but not sure..):
The last error was raised by this
Then I found self.can_handle_request() returns a bool result: If the origin request url is equal to self._origin:
And I found that the port info in self._origin is not same to the woman info I created, and also not equal to http request url origin:
I don't know why this happened, did I miss some arguments when I created the WsmanInfo?
That's all, looking forward to your reply.
End, thanks