Tuesday, September 21, 2021

How to: Chrome: allow localhost site even without https certificate

 So as we all are learning, chrome is blocking entirely https sites, even those from localhosts. Sometimes you a presented with a warning screen. Sometimes you are presented with a connect to network screen despite being fully connected to the internet.

For those of us with application specific programs that do not require a certificate, maybe a self hosted test website or whatever you need. Chrome does allow you to override the warning about https certificates if the address is localhost.


1 Steps total

Step 1: Open Google Chrome

Enter the below into the address bar in google chrome.

chrome://flags/#allow-insecure-localhost

Set the option to enabled on allow-insecure-localhost.


Now you can able to access the localhost 

Monday, September 13, 2021

ASP.Net WCF: The service cannot be activated because it does not support ASP.NET compatibility

 The following error is thrown by the ASP.Net WCF Service when the aspNetCompatibilityEnabled attribute is set to true in Web.Config file.

The service cannot be activated because it does not support ASP.NET compatibility. ASP.NET compatibility is enabled for this application. Turn off ASP.NET compatibility mode in the Web.Config or add the AspNetCompatibilityRequirements attribute to the service type with RequirementsMode setting as 'Allowed' or 'Required'.


The Solution
The above error occurs because in order to make the WCF Service work in ASP.Net compatibility mode, you also need to decorate the WCF Service class with the AspNetCompatibilityRequirements attribute.
Below are the correct steps to make the WCF Service work in ASP.Net compatibility mode,
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>

If some case the above solution is not work go with below solution 
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" multipleSiteBindingsEnabled="true"/>

Thank you Hope it is help you