Protocol Error

I don't understand why i get this error. Can someone help me please? All goes well until "HttpWebResponse response". It catch an error 500 internal server error. If i look the OdgovorGreskaStatus, i get an error "ProtocolError".
I'm lost.

Hi! Thank you for you'r help! Fiskal 1 certificate is on c:\ and it's a desktop app. I think i found a part of problem. The problem is actually the proxy server. Normally, an https connexion is made on 443 port. In this case, cis service needs to use the
8449 and we have a security problem with our firewall. I'm trying to see with our network administrator to find a solution.

Hi everyone. We have identified the problem of error 500 internal server error (exeption status: Protocol error). In our case, the problem does not come from the fact of using a proxy or a certificate problem. In fact, there was a mistake for the OIB number.
This is stupid, CIS server does not seem capable of returning an error message in this case and return an http error.

For those who use a proxy server and have a 502 error bad gateway, you must using request.Proxy = null.