Chuck's Code Blog

Assorted solutions and musings

Suppress Those “CssClass not defined” issues in MVC.

I found a hack to suppress those CssClass not defined issues in MVC! The hack is to wrap duplicate link references (they already exist in our MasterPage) in a False evaluator (if loop) up in our “content3” area as shown below. Note that runat=”serverVisible=”false” attribute key \ value pairs have been added to the end of each link.

    <% if (false) { %>
        <link href="~/Content/WebFramework/Site.css" rel="stylesheet" type="text/css" 
runat="server" Visible="false" />

        <link href="~/Content/Site.css" rel="stylesheet" type="text/css" 
runat="server" Visible="false" />

        <link href="~/Content/WebFramework/smoothness/jquery-ui-1.8.11.custom.css" 
rel="stylesheet" type="text/css" runat="server" Visible="false"/>

        <link href="~/Content/WebFramework/DataTables/dataTables.custom.css" 
rel="stylesheet" type="text/css" runat="server" Visible="false" />

    <% } %>

I’ve also seen where people have created a SupressWarnings.css that have empty classes defined so technically they are defined even though practically they do nothing from a CSS point of view.


January 6, 2012 Posted by | CSS, Error Solutions, MVC | , , , , , | Leave a comment

Error 1402 When Installing MS Virtual Server 2005

While installing Microsoft Virtual Server 2005 I encountered the following error:

Error 1402. Could not open key:
Verify that you have sufficient access to that key,
or contact your support personnel.

To fix the issue, I updated the parent folder HKLM\Software\Classes
permissions. When I looked at the permisions on this key it had only one entry: “Everyone” with Full Control. I added the SYSTEM account with Full Control and this fixed the error.

The specific steps I took to succesfully resolve this error are as follows:

  1. Launch the registry editor (Start > Run > Regedit);
  2. Navigate to HKLM\Software\Classes and right click Classes to get the context menu;
  3. Select Permissions… from the menu, you will see Permissions for Classes dialog box;
  4. Click Add and a Select Users or Groups dialog box will pop up;
  5. In the Enter the object names to select text box type SYSTEM;
  6. The Check Names button should become enabled – click it;
  7. SYSTEM should become underlined indicating it was recognized as valid;
  8. Click Ok and with SYSTEM highlighted be sure Full Control is checked;
  9. Click Ok, close the Registry Editor, and retry the Virtual Server installation again.

I hope this post has helped you.

May 6, 2010 Posted by | Error Solutions | , | Leave a comment