You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebApiProxy.CSharp configuration should have attribute allowUntrustedSsl #35
Currently I have 2 endpoints (http and https) and later I can set the right one from code:
WebApi.Proxies.Configuration.PosWebApiProxyBaseAddress = ...
Also for client I have to provide my requests handler:
Custom handler is not a problem at all, but problem if third party WebAPI provider has only https endpoint with self-signed certificate. I am very happy that my third party provides both :)
You can also wrap your the handler.ServerCertificateValidationCallback(...) call in conditional compilation directives like DEBUG for example in your development environment
Is the issue the generation or runtime? Reading between the lines it looks like generation time, if so we could just add the config setting as you describe..
So if I understand it correctly, the proxy endpoint is over HTTPS and the generation fails on the development machine because there's no self-signed certificate? Also, if you're saying two endpoints, do you mean one for development (using HTTP) and one for production (using HTTPS)?
Guys you are talking about the same thing again. Currently I have no issues with my project because endpoint can be accessed by http or https, so I run generation over http and later from code I change endpoint to https also I set ServerCertificateValidationCallback to always return true.
Issue is in client generation.
But I think for other WebApiProxy users who have only HTTPS endpoint with self signed certificate it would be great to have attribute allowUntrustedSsl in configuration. If you don't want to implement that, please close this issue. I don't care.
This issue has been discussed over and over in #79 and due to low demand and priority it was decided to not implement for now (at least). When there's more demand for this feature we could look at it again in the future. Thank you for your contribution @pauliusg! 👏
Activity
faniereynders commentedon Jan 29, 2015
Hi @pauliusg have you found a workaround for this?
pauliusg commentedon Jan 29, 2015
Hi,
Currently I have 2 endpoints (http and https) and later I can set the right one from code:
WebApi.Proxies.Configuration.PosWebApiProxyBaseAddress = ...
Also for client I have to provide my requests handler:
Custom handler is not a problem at all, but problem if third party WebAPI provider has only https endpoint with self-signed certificate. I am very happy that my third party provides both :)
faniereynders commentedon Jan 29, 2015
You can also wrap your the
handler.ServerCertificateValidationCallback(...)call in conditional compilation directives likeDEBUGfor example in your development environmentpauliusg commentedon Jan 29, 2015
Thing is, that my third party will have self-signed cert even in production. I don't like that but I can't change that.
As I said, I have my workarounds, but it would be nice to have attribute in config to allow generate client from server which has invalid SSL cert.
wolfen351 commentedon Jan 16, 2016
Is the issue the generation or runtime? Reading between the lines it looks like generation time, if so we could just add the config setting as you describe..
pauliusg commentedon Jan 18, 2016
Yes, issue is only in the generation.
faniereynders commentedon Jan 19, 2016
So if I understand it correctly, the proxy endpoint is over HTTPS and the generation fails on the development machine because there's no self-signed certificate? Also, if you're saying two endpoints, do you mean one for development (using HTTP) and one for production (using HTTPS)?
pauliusg commentedon Jan 20, 2016
Guys you are talking about the same thing again. Currently I have no issues with my project because endpoint can be accessed by http or https, so I run generation over http and later from code I change endpoint to https also I set ServerCertificateValidationCallback to always return true.
Issue is in client generation.
But I think for other WebApiProxy users who have only HTTPS endpoint with self signed certificate it would be great to have attribute allowUntrustedSsl in configuration. If you don't want to implement that, please close this issue. I don't care.
faniereynders commentedon Jan 20, 2016
This issue has been discussed over and over in #79 and due to low demand and priority it was decided to not implement for now (at least). When there's more demand for this feature we could look at it again in the future. Thank you for your contribution @pauliusg! 👏