Unrecognized self-signed SSL certs

Found this on stackoverflow after I had issues with an SSL (self-signed) certificate on a client machine – it still didn’t work even after installing the cert via the browser.  The fix, in addition to installing the actual certificate, was to add the Certificate Authority on the client machine.

On the web server:

  • Win+R, MMC, Enter.
  • File, Add-Remove snap-in, Certificates, Add, Manage certificates for: my user account, Finish, OK.
  • Navigate to "Certificates – current user / Trusted Root Certification Authorities / Certificates".
  • Find your certificate, right-click, All tasks / Export.
  • "No, don’t export the private key"
  • "DER Encoded binary X.509 (.CER)"
  • Save the file somewhere.
  • Transfer the newly created .CER file to the client PC.

On the client machine:

  • Win+R, MMC, Enter.
  • File, Add-Remove snap-in, Certificates, Add, Manage certificates for: my user account, Finish, OK.
  • Navigate to "Certificates – current user / Trusted Root Certification Authorities / Certificates".
  • Right-click on Certificates container, All tasks / Import
  • Choose your .CER file you’ve transferred from the server machine.
  • On the next screen, choose "Place all certificates in the following store", click "Browse", check "Show physical stores", then choose "Trusted Root Certification Authorities / Local Computer".
  • Press "Finish" finally.
  • In Internet Explorer: Tools – Delete browsing History,
  • In Internet Explorer: Tools – Internet options – "Content" tab – Clear SSL state button.

Windows 7 Media Center: Netflix “Authorization Failure” error

In case you’re having an issue watching Netflix through Windows Media Center because of an “Authorization failure…” error, try the following (it worked for me):

1. Exit Media Center.
2. Open Internet Explorer and click Tools and then Internet Options.
3. Click the Delete button – check all of the check-boxes and then click the Delete button. Click OK.
4. Browse to http://www.netflix.com and sign in. Note: No need to save the passwords in IE.
5. Close Internet Explorer.
6. Open Netflix and play anything.
7. Click Yes to the pop-up.

That’s it. Hope it works for you like it did on mine.

“Cannot add duplicate collection entry of type…” error in IIS 7/7.5

I came across an “HTTP Error 500.19 – Internal Server Error” error when trying to access a static page on IIS 7 running on Windows 2008 Server.  So, here’s what I did that fixed the issue:

1. Checked the event logs first and saw this:

image

2. Checked out the ISAPI Filters of the “Default Web Site” as stated in the event log and look what came up:

image

3. Next, checked “c:\Windows\System32\inetsrv\config\applicationHost.config” and voila, saw two entries for “ASP.Net_2.0_for_V1.1”:

Line 312:

<isapiFilters>
            <filter name="ASP.Net_2.0.50727.0" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="bitness32,runtimeVersionv2.0" />
            <filter name="ASP.Net_2.0_for_V1.1" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv1.1" />
            <filter name="ASP.Net_4.0_64bit" path="c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv4.0,bitness64" />
            <filter name="ASP.Net_4.0_32bit" path="c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" enableCache="true" preCondition="runtimeVersionv4.0,bitness32" />
        </isapiFilters>

Line 960:

<location path="Default Web Site">
<system.webServer>
<isapiFilters>
<filter name="ASP.Net_2.0_for_V1.1" path="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_filter.dll" />
</isapiFilters>
</system.webServer>

After removing the second <filter name…> in line 960 (like so below), and restarting IIS, everything worked as expected. 

<location path="Default Web Site">
<system.webServer>
<isapiFilters>
</isapiFilters>
</system.webServer>

Hope this helps someone out there.

Visual Studio 2010 access denied on “Publish”

I was getting the errors below when publishing to a file system:

Connecting to C:\inetpub\wwwroot\webapp
Transformed Web.config using Web.Debug.config into obj\Debug\TransformWebConfig\transformed\Web.config.
Copying all files to temporary location below for package/publish:
obj\Debug\Package\PackageTmp.
Publishing folder /…
Unable to add ‘Web.config’ to the Web site.  Unable to add file ‘Web.config’.  Access is denied.
Publishing folder Account…
Publishing folder bin…
Unable to add ‘bin/webapp.dll’ to the Web site.  Unable to add file ‘bin\webapp.dll’.  Access is denied.
Unable to add ‘bin/webapp.pdb’ to the Web site.  Unable to add file ‘bin\webapp.pdb’.  Access is denied.
Publishing folder Scripts…
Publishing folder Styles…
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

The fix: Open Visual Studio 2010 with “Run as Adminstrator” (right-click it and choose that option).