titanium-web-proxy icon indicating copy to clipboard operation
titanium-web-proxy copied to clipboard

AuthenticationException when running proxy inside IIS

Open enkelmedia opened this issue 4 years ago • 0 comments

I have a .NET 5 app hosted inside IIS, I'm using Selenium to perform fetch information from websites and use the Titanium Proxy to intercept the requests.

It all works fine on my dev-machine but on Windows 2019 server we're getting errors like this:

Titanium.Web.Proxy.Exceptions.ProxyConnectException: Couldn't authenticate host 'accounts.google.com' with certificate '*.google.com'.
 ---> System.Security.Authentication.AuthenticationException: Authentication failed, see inner exception.
 ---> System.ComponentModel.Win32Exception (0x80090327): An unknown error occurred while processing the certificate.
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](TIOAdapter adapter, Boolean receiveFirst, Byte[] reAuthenticationData, Boolean isApm)
   at Titanium.Web.Proxy.ProxyServer.handleClient(ExplicitProxyEndPoint endPoint, TcpClientConnection clientConnection)
   --- End of inner exception stack trace ---
   at Titanium.Web.Proxy.ProxyServer.handleClient(ExplicitProxyEndPoint endPoint, TcpClientConnection clientConnection)

We've tried to figure out what's wrong but without any luck. It feels related to certificates and/or user permissions. It's interesting that when we tried to set the App Pool identity to "Administrator" it worked, but not when using AppPoolIdentity or NetworkService.

Any ideas?

enkelmedia avatar Apr 15 '21 14:04 enkelmedia