neha sonar

neha sonar

  • NA
  • 41
  • 685

getting error "The underlying connection was closed "

Jul 14 2017 1:35 AM
I am getting this error “The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.” on mvc application.
 
Below web config code:
 
<system.web>
<compilation debug="false" targetFramework="4.6"/>
<httpRuntime targetFramework="4.6" requestValidationMode="2.0" enableVersionHeader="false"/>
<machineKey validationKey="FF4636C4DF933BE453F9B94810661C5F5625794E5DCA46A3C281EB18CC5410386A4B38F5E4C7D7106C049C9EB10F31C2F4E76E74616ABD36DC6C64AF2BFF6801" decryptionKey="667F9049734567FF3E7BC7031DF4B4431F992A447CE2FB3258F6EE989BA82E8F" validation="SHA1" decryption="AES"/>
<httpHandlers>
<add path="*" verb="OPTIONS" type="System.Web.DefaultHttpHandler" validate="true"/>
<add path="*" verb="TRACE" type="System.Web.DefaultHttpHandler" validate="true"/>
<add path="*" verb="HEAD" type="System.Web.DefaultHttpHandler" validate="true"/>
</httpHandlers>
<authorization>
<deny verbs="OPTIONS" users="*"/>
<deny verbs="TRACE" users="*"/>
<deny verbs="HEAD" users="*"/>
</authorization>
<authentication mode="Forms">
<forms loginUrl="~/Login/Login" defaultUrl="~/Home/Home" name="testdb" cookieless="UseCookies" requireSSL="true" slidingExpiration="false" protection="All"/>
</authentication>
<httpCookies httpOnlyCookies="true" requireSSL="true"/>
<sessionState timeout="20"/>
<customErrors mode="On" defaultRedirect="~/Home/ErrorPage"/>
</system.web>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-Frame-Options" value="DENY"/>
</customHeaders>
</httpProtocol>
<validation validateIntegratedModeConfiguration="false"/>
</system.webServer>
 
 

When i published code.I got this message "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." on error log.But when i set requireSSL="false" in web config it's working Properly.but in security tool it shows vulnerabiltiy.

Please help!

 
 
 

Answers (1)