25.3.14

The Certificate associated with this binding is also assigned to another site's binding.

I faced this problem twice, so I decide to write down some notes to help me and you in case we'll face this problem again (or for the first time).
When I assign the same certificate to two or more websites and after a while I decide to remove, IIS asks the following question:

The Certificate associated with this binding is also assigned to another site's binding. Deleting this binding will cause the HTTPS binding of the other site to be unusable. Do you still want to continue?


Well...I think not.

The consequence of this action is the stop of all others applications using that certificate, not quite good for a production environment. So what to do?

Edit C:\Windows\System32\inetsrv\config\applicationHost.config, search for your application name and manually delete the row with the https binding. 

 <binding protocol="https" bindingInformation<binding protocol="https" bindingInformation="*:443:" />"*:443:" />  

Save file and re-open IIS GUI: the binding should be disappeared.

An IIS bug? Maybe or maybe only Microsoft style ;)





20.3.14

BC30002: Type 'NameClass' not defined

I've struggled a few minutes too long to resolve this problem.
I writed a new class with some type inside, added by a new Namespace.
I added the relative reference on the project.
The solution compiles correctly, but at the site's launch on localhost, I obtained the following error

 BC30002: Type 'NameClass' not defined 

WTF?!

Solution
Check if has been added the dll relative to the reference added and/or in the web.config has been added the relative assembly reference.
If not, the solution is to manually add the reference in the following manner
(in my case System.Security)

 <compilation debug="true" strict="false" explicit="true" targetFramework="4.0"> 
    <assemblies> 
     <add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/> 
    </assemblies> 
   </compilation> 

To find the exact string to write in the web.config, search in the machine.config that shows all packages already installed on your PC.

Enjoy!