Thursday, December 19, 2013

How To Find Stereo Mix On Windows 7- How To Enable Stereo Mix With Conexant


I like to use Audacity to record things off of the Internet sometimes. However, to get a clean recording, you need to be able to use the Stereo Mix feature on your audio device. If you have certain Conexant audio devices, you  may not be able to use the Stereo Mix feature. According to some reports, computer makers, like Sony Corporation, asked Conexant to disable the Stereo Mix feature to stop people from recording things off of the Internet that might violate a copyright. Well, no matter the reason, I'm here to show you how to enable Stereo Mix on your Conexant device. Make sure you do the right things with this power.

First we are going to make sure you don't have Stereo Mix on your machine already. If you are technically savvy and are completely sure you don't have it, then you can skip this step.


  1. In the lower left hand of your task bar, right click on the speaker icon.
  2. Select Recording devices. 
  3. Right click in the blank white space and select Show Disabled Devices and Show Disconnected Devices.
  4. If you don't see Stereo Mix, like the photo below shows, then you need to follow the second set of directions.




******************************************************************************
OK. Now we are going to add Stereo Mix. It once was lost, but now it will be found! Ready?

  1. Go to your start menu and type Regedit. We are going to edit your Registry. Once the software comes up, click on Regedit. 
  2. Once you have Regedit open, you are going to go to HKEY_LOCAL_MACHINESYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\Settings\EPattributes.
  3. Once you get to the EPattributes node, you are going to check and see if you have the EpSettings node. If you HAVE this node, move on to the next step. If you DO NOT have the EpSettings node, you will need to add it by right clicking on the EPattributes node and selecting New and then Key. Enter EpSettings.
  4. After you have either added EpSettings or verified that you have it, you are now going to add a key to EpSettings by right clicking on EpSettings, selecting New and then Key and creating a key named StereoMixEnable.
  5. After it has been created, right click on StereoMixEnable, click New and then Binary Value to create a Binary Value called Enable
  6. Change the value for Enable to 1 or 01 if you can't just put the 1 in.
  7. Right Click on StereoMixEnable again, click New and then Binary Value to create a Binary Value named MixAssocSeq.
  8. Change the value of MixAssocSeq to e0 e0
  9. Right Click on StereoMixEnable again, click New and then Binary Value to create a Binary Value named MuteGainSettings.
  10. Change the value of MuteGainSettings to 00 00.
  11. Now close Regedit and restart your computer.
  12. After your computer restarts, go to Control Panel, Sound and then click Recording tab and you will see Stereo Mix. It will be disabled.
  13. Right click Stereo Mix and enable it.
  14. Set it as the default device.
Now you can use Stereo Mix to record sounds from the Internet directly into your computer using something like Audacity.

If you have problems or questions, just ask!

Smooches!
Kila Morton

Problem:
You do not see Stereo Mix on your laptop or PC and you have a Conexant device.

Solution:
You must alter the registry settings, restart your machine and enable Stereo Mix.

Saturday, August 3, 2013

How To Solve The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster. Error In Asp.Net MVC!


The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the <machineKey> configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.

Isn't that a beautiful error? Recently, while working on a website I created in Asp.Net MVC 4, I got this error. How you ask? I'm so glad you asked! The website is hosted right now and I am developing it on my local development machine and pushing the changes to the actual website. From time to time, I leave my computer and leave the website up. There have been times when I was logged into the website, walked away, came back after the session timed out and clicked on a link on the site only to have the site route me to the sign in page. That is the expected behavior. What isn't expected, is that when I try to sign in I get this beautiful error -

The anti-forgery token could not be decrypted. If this application is hosted by a Web Farm or cluster, ensure that all machines are running the same version of ASP.NET Web Pages and that the <machineKey> configuration specifies explicit encryption and validation keys. AutoGenerate cannot be used in a cluster.

Now WHY do I think this is a beautiful error? Well unlike some errors you get while developing, this error actually means EXACTLY what it says! I am using the Antiforgery token system in Mvc. You call that using this syntax @Html.Antiforgery(). When you use this system straight out of the box, the encryption and validation keys are auto-generated at runtime for you. That is great - until the session terminates. At that point, the system loses a reference to those auto-generated keys. Then, when you are kicked out of the system and have to come back, it still has a reference to the old keys, but those are not usable anymore - since the system generated new ones for your new session. All of a sudden, the new one the system generated and the old one your page is referencing are not in sync and you get the error.

So what can you do? The answer is simple - follow directions and generate the keys in your web.config file! Add the following to your site's web.config file.

<configuration>
  <system.web>
    <machineKey decryptionKey="Decryption key goes here, IsolateApps"
                validationKey="Validation key goes here, IsolateApps" />
  </system.web>
</configuration>
You can generate keys by going into IIS and clicking on Machine Key - if you have the right version and IIS features installed. You will not see Machine Key if you don't. If you don't, you can go to the Control Panel and install additional IIS features. Then, paste those keys into the code above. That will allow the Antiforgery system to work off of those instead of autogenerating.

Problem solved!
I just love it when a plan comes together! Don't you?

Smooches,

Kila Morton
 

Sunday, June 9, 2013

Solve Cannot retrieve property 'Name' because localization failed. Type 'YourResourceFile' is not public or does not contain a public static string property with the name 'YourItemName'.

Data Annotations are a great thing. They allow you to add information to your model quickly and easily. However, if you have an application that is designed for multiple cultures, you cannot add a Name to your annotation and have it display appropriately for other cultures. It is easy to use App_GlobalResources to hold your global strings, however, you may encounter the following message when using an App_GlobalResources folder in Asp.Net MVC -

        [Required(
            ErrorMessageResourceName = "Required_PleaseSelectA",
            ErrorMessageResourceType = typeof(StringResources))]
        [StringLength(100,
            ErrorMessageResourceName = "Length_YourMustBeACombination",
            ErrorMessageResourceType = typeof(StringResources),
            MinimumLength = 6)]
        [Display(
            ResourceType = typeof(LocalizedResources),
            Name = "CategoryName",
            Description = "CategoryName")]
        public string CategoryName { get; set; }
Cannot retrieve property 'Name' because localization failed.  Type 'Resources.StringResources' is not public or does not contain a public static string property with the name 'CategoryName'.

In this particular example, I set up resources for a property called CategoryName.
This error is VERY simple to solve. The resource file needs to be made public.
To do this, you will need to change the TYPE of tool used to generate the resource file.

In Asp.Net MVC 4, when you add a App_GlobalResources folder and create a resource file in it, by default the resource file is set up as internal and given the GlobalResourceProxyGenerator as a tool. That internal designation creates a problem for the DisplayAttribute annotation because it checks to see if the ResourceType is visible. In fact, it actually uses Type.IsVisible. This creates a problem because the internal class is NOT visible to it.

Now here is an interesting thing to note. The RequiredAttribute and StringAttribute both inherit from ValidationAttribute. The DisplayAttribute does NOT. The Required and String Attributes utilize a different mechanism to connect with the resource files. You can see subtle differences when you look at how the items are set up again -

        [Required(
            ErrorMessageResourceName = "Required_PleaseSelectA",
            ErrorMessageResourceType = typeof(StringResources))]
        [StringLength(100,
            ErrorMessageResourceName = "Length_YourMustBeACombination",
            ErrorMessageResourceType = typeof(StringResources),
            MinimumLength = 6)]

        [Display(
            ResourceType = typeof(StringResources),
            Name = "CategoryName",
            Description = "CategoryName")]

        public string CategoryName { get; set; }
Notice that each resource file in the photo of App_GlobalResources above has a .cs file attached to it.When you click on that resource file,  you see that all of the classes are internal. If you change the CustomTool to PublicResXFileCodeGenerator and rebuild your application, you will see the .cs file go from internal to public and your DisplayAttribute will be able to connect with the resource file now. In fact, if you click on the .cs file to open it AND change then go over to properties and change the CustomTool, all of the items in the file will automagically change from internal to public.

Smooches,

Kila Morton





Saturday, June 8, 2013

Solving To call this method, the “Membership.Provider” property must be an instance of “ExtendedMembershipProvider”

When using Asp.Net MVC 4 and hosting your website with a hosting provider like TheDomainConnection or Godaddy, you may encounter a problem that seems strange. 

When testing locally on your dev machine not on the host, you  may be able to create accounts just fine. However, after you  load your site to your host,  you may get the error 
  
To call this method, the “Membership.Provider” property must be an instance of “ExtendedMembershipProvider”

You think to yourself "Self, why am I getting this error when this worked on my dev machine not more than a few moments ago?" The answer is interesting.

The error is happening because of this code located in the WebSecurity file of the WebMatrix.WebData dll -


        private static ExtendedMembershipProvider VerifyProvider()
        {
            ExtendedMembershipProvider provider = Membership.Provider as ExtendedMembershipProvider;

What is the significance of this? That Membership.Provider line is getting the membership information from your web.config and if you have not configured your system to use a provider that extends the ExtendedMembershipProvider class, the provider will not match and your application will not work. The first step to solving this problem is to add the following line to your web.config file -

  <appSettings>
    <add key="enableSimpleMembership" value="true" />
  </appSettings>

However, in some cases, your website host settings are actually going to override that setting in your web.config! That's right - your host configuration is going to override your own. This means that the setting above will be ignored and if your host is implementing a provider that is NOT an extension of the ExtendedMembershipProvider, you are going to experience the error. This happens because NONE of the old providers used with prior versions of Asp.Net/Asp.Net MVC are extensions of ExtendedMembershipProvider.
So how do you solve this problem?

Place the following code in your web.config file of the website you are hosting.


  <system.web>
    <roleManager enabled="true" defaultProvider="SimpleRoleProvider">
      <providers>
        <clear />
        <add name="SimpleRoleProvider" type="WebMatrix.WebData.SimpleRoleProvider, WebMatrix.WebData" />
      </providers>
    </roleManager>
    <membership defaultProvider="SimpleMembershipProvider">
      <providers>
        <clear />
        <add name="SimpleMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider, WebMatrix.WebData" />
      </providers>
    </membership>
    <sessionState mode="InProc" customProvider="DefaultSessionProvider">
      <providers>
        <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
      </providers>
    </sessionState>
  </system.web>
This will override your host's settings for your website and get your website working!
Smooches, 
Kila Morton

Sunday, January 13, 2013

Windows 8 Is Horrible - It Makes The Desktop Different Just To Be Different - NOT To Be Better

I am REALLY beginning to hate a company that I have loved for so many years and it makes me feel so sad! I just took the plunge and purchased a Windows 8 laptop. Trying to do simple things with this interface is now such a chore. I want to throw this crap across the room, go and get it, lay it down on the sidewalk, run over it four times with each one of my wheels, bring it back inside, beat it with a hammer, take it into the bathroom, pour water into it, throw it off of my rooftop deck, go back outside and pick it up off of my driveway and then drive to the nearest garbage bin, get out, jump up and down on it and THEN throw it in the dumpster! GIVE ME BACK THE SIMPLE DESKTOP LOOK THAT I COULD CONTROL - NOT THIS CRAP THAT CLUTTERS MY DESKTOP AND TAKES AWAY MY PREVIOUSLY PEACEFUL DESKTOP!!!

WHAT in the WORLD is Microsoft thinking? How do you take away ordinary things like the start menu? WHY would you move that? WHY would you change that? There are so many things in Windows 8 that are different for the sake of being different - NOT different because it made Windows better! I don't want a phone or tablet interface on my laptop! When I sit down to work, I don't want to see Facebook updates, Twitter information, the news, the weather, Jesus, Joseph or John! I just want to be able to QUICKLY click where I need to click and access my work!

Windows 8 makes productivity about as rare as a white elephant in the middle of Manhattan! There are so many unnecessary things going on! WHY? I would love to walk  up to the person who created this piece of crap and just smack them. That would be uncivilized, but I think unleashing this phone sized app for the desktop called Windows 8 was MORE uncivilized. It is completely horrible. I have to take a deep breath and calm myself down. As it stands, I'm typing this on one of my other laptops with Windows 7. Listen, if your Windows 7 works for you DO NOT UPGRADE OR MOVE TO WINDOWS 8! Microsoft does this crazy crap where they screw up every other generation so Windows 9 will likely be perfect! I'm so upset about Windows 8 that I don't ever want to touch another Microsoft product again - EVER! I am going to, but my emotions are spilling over right now. I have to get get my mind right and then get something to make this Windows 8 crap work properly.

MICROSOFT, EVERYONE DOES NOT WANT A DESKTOP SET UP LIKE A PHONE!
I HAVE ANDROID DEVICES, APPLE DEVICES AND WINDOWS BASED DEVICES. YOU ARE TRYING ENTIRELY TOO HARD TO MAKE SOMETHING THAT IS RELEVANT. HOWEVER, YOU CAN'T ALTER THE WAY PEOPLE WORK AND THINK IT WILL BE OK!!!

OK. I need to get myself a drink of water and calm my nerves. I have things to do and I now have to go search for Notepad. This reminds me of the Ribbon! How do you come out with the Ribbon and not provide a classic menu for those who don't have time to learn where everything is? I still don't use Office anymore. I use Google Docs and Open Office. I just wish there was a viable alternative to Windows. I have a Mac, but I need to use software that is Windows compatible. God I feel stuck between an Apple and a hard place!

I could understand and support a change that made it EASIER to work, but removing things like the start menu is just ridiculous! What purpose does it serve? How does a company like Microsoft, that had a good product twist it into this? I wish Microsoft would ask CUSTOMERS how it could make its products better instead of focusing on changing things to try to match other companies. Everything has its place. Desktops, phones, tablets, laptops - everything has its place. I have all 4 and I just don't want my laptop and my desktop to look like my phone. I don't feel like customizing Windows and downloading more crap to make this Windows 8 crap usable. I just don't. I need to relax before I use that computer again. This is almost enough to make me try to develop my own operating system. God I wish I had the time!

As a software developer, this places me in a hard spot. I hate this operating system so much that I don't want to develop for it. I know the world will go on whether I develop for it or not, but I know  many other people who are starting to feel exactly the same way. I can't believe it has come down to this.

Google can YOU save us......please?

How To Figure Out How Many Spheres Will Balance One Cube!

OK. There are times when we must divert attention from the really important things in our lives to the things that are going to cause us problems just because they exist. My child has to take a test. While preparing for that test, we went over an online test booklet that had various example problems. Here is the problem.
Kent is using the scale to compare the weight of various solids. How many spheres will balance one cube?
This is an example question on the Washington State Algebra End Of Course exam (also known as the WASL). It seems that a lot of people have struggled with this question, but it really is simple and it doesn't really require much math. In fact, I don't even understand why this question would be on an Algebra high school math test and not a seventh grade math test! So let's do this with almost no math. In the top equation you have this -


TOP EQUATION
SIDE ONE
4 Cubes
2 Triangles
3 Spheres
 
SIDE TWO
3 Cubes
4 Triangles
5 Spheres
 
BOTTOM EQUATION
SIDE ONE
1 Cube
1 Sphere
SIDE TWO
4 Triangles
2 Spheres


TOP EQUATION WITH CANCELLATIONS
4 Cubes leaves 1 Cube
2 Triangles
3 Spheres
 
3 Cubes
4 Triangles leaves 2 Triangles
5 Spheres leaves 2 Spheres
 
BOTTOM EQUATION WITH CANCELLATIONS
1 Cube
1 Sphere
4 Triangles
2 Spheres leaves 1 Sphere

So what does that tell you? With hardly no effort, you have learned that 1 Cube = 2 Spheres and 2 Triangles AND 1 Cube = 1 Sphere and 4 Triangles You found this just by cancelling things out. You can EASILY cancel in this problem because you know that 1 sphere = 1 sphere and 1 triangle = 1 triangle and 1 cube = 1 cube. NOW you just use patterns to find out how many spheres will balance on one cube.


FIND THE NEXT ITEM IN THE PATTERN
1 Cube = 4 Triangles 1 Sphere
1 Cube = 2 Triangles 2 Spheres
1 Cube = 0 Triangles 3 Spheres

So the answer is 3 Spheres (or B) and we did that all without any math. What does that tell you? More importantly, what does that tell me? As a parent, it tells me that the Washington State Math test isn't an accurate predictor of anything! What does this question prove? I solved this question in minutes without any real math. Why is this on an Algebra End Of Course test? Hmmmm.......