Tuesday, June 23, 2015

There is a duplicate scriptResourceHandler section defined (HTTP Error 500.19)

The solution I found so far was to change the Application Pool of the website from DefaultAppPool to .NET v2.0. I also have tried with no luck other solutions based from stackoverflow.

Operating System: Windows 8
IIS: Version 8
Default Site Framework: .NET 3.5 SP1

Reference: There is a duplicate scriptResourceHandler section defined

The installer was interrupted before Application could be installed

I have a .msi file created using .NET Framework 3.5 SP1 in which it can't proceed to installation as stated by the title of this post. Since I'm running on IIS 8, there might be some issues communicating with IIS 6. Taken from the point that this application was packaged using Visual Studio 2008.
The fix is to enable IIS Metabase and IIS 6 configuration compatibility through the Control Panel -> Turn Features On/Off.
OS: Windows 8
IIS: 8
.NET Framework: 3.5 SPI
Visual Studio: 2008

Run MSI file as Administrator in Windows 8


Right clicking an MSI file through Windows 8 and then "Run As Administrator" isn't supported. After doing some research, I found some steps to achieve it. See instructions below:

1. Start Button / key
2. Type in "cmd" without quotes and press Shift+Enter to open a command prompt as an administrator.
3. Type in the full path to the msi and press enter.
Put the path inside quotes if it has any spaces like "C:\Users\username\My Documents\SoftwarePackage.msi"
4. Press enter and agree to execute the MSI

See Reference here: Run an MSI file as Administrator

Friday, June 19, 2015

Unity already has a dependency defined for CommonServiceLocator (VS 2012 Ultimate)


While trying to add Unity to a Console Project, I encountered an error as stated by the title of this post. After doing some research, I found a post in Stack Overflow which is to update Nuget Package Manager. When I checked my VS, the nuget package manager is an older version.

So, I removed/uninstalled it and added the recent version of Nuget package manager through Tools -> Exentsion and Updates then look for Nuget Package Manager. Then install/download it in your VS IDE. See image for current Nuget Package Manager.
That's It.. :)

Thursday, June 18, 2015

Transparent Border Color in Internet Explorer 8 and Below

Normally, the css snippet below paints a transparent border to containers or divs using Mozilla Firefox, Chrome or IE9+.
 .NewsContent {  
  background-color: #fff;  
  border: 10px solid transparent;   
  background-clip: content-box;   
However, for other IE8 and below, I had a hard time figuring out how to make the border transparent. Luckily, I found a link: Border Color Transparent in IE6 which serves as the basis for the fix below:
 .NewsContent {  
      background-color: #fff;  
      border: 10px solid black;   
      filter: chroma(color=black);   
Afterwards, the border color changed to transparent. MSDN link: MSDN Chroma Filter

Wednesday, June 17, 2015

Access Is Denied (User.Identity.Name)

Given you have an ASP.NET MVC code below that will show the current user logged in a domain:
<div class="content-wrapper">
    <div class="float-left">
        <p class="site-title">@Html.ActionLink("your logo here", "Index", "Home")</p>
    <div class="float-right">
        <section id="login">
            Hello, <span class="username">@User.Identity.Name</span>!
            <ul id="menu">
                <li>@Html.ActionLink("Home", "Index", "Home")</li>
                <li>@Html.ActionLink("About", "About", "Home")</li>
                <li>@Html.ActionLink("Contact", "Contact", "Home")</li>

and when you run that project, you encountered an error such as below: The fix is to click on the MVC Project -> Navigate to Properties Window -> Change Windows Authentication from "Disabled" to "Enabled". See image below:
After setting that property, you can now see the user name and the program is running successfully.

Cheers! :)