Microsoft Knowledge Base Email Alertz

KBAlertz.com: The License Compiler (Lc.exe) throws an exception when a .NET Framework 2.0 application consumes licensed components on a computer that is running a 64-bit operating system

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]





ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **


Bug Tracking Software
For bug tracking software or defect tracking software or issue tracking software, visit Axosoft.


Community Site



We Send hundreds of thousands of emails using ASP.NET Email



Expert Web Design & Graphic Design
Design44.com

ASP.NET 3.5 Web Hosting with Windows 2008 and SQL 2008: Click Here!
Discount ASP.NET Hosting
ASP.NET 2.0 and 3.5
Windows2008 and SQL2008
US and UK Hosting
The ad says 3 - but KBAlertz referrals get
** SIX MONTHS FREE **




Mentioned In








Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks




Article ID: 913961 - Last Review: December 3, 2007 - Revision: 2.2

The License Compiler (Lc.exe) throws an exception when a .NET Framework 2.0 application consumes licensed components on a computer that is running a 64-bit operating system

SYMPTOMS

Consider the following scenario. You build a Microsoft .NET Framework 2.0-based application in Microsoft Visual Studio 2005. The application consumes licensed components on a computer that is running a 64-bit operating system. However, you compiled the application for a 32-bit operating system. In this scenario, the License Compiler (Lc.exe) throws an exception that resembles the following:
Exception occurred creating type 'LicensedComponent.UserControl1, LicensedComponent, Version=1.0.1.100, Culture=neutral, PublicKeyToken=null' System.ComponentModel.LicenseException: A valid license cannot be granted for the type LicensedComponent.UserControl1. Contact the manufacturer of the component for more information. C:\Documents and Settings\Administrator\Desktop\LC\LCIssue\64BitIssue\Properties\licenses.licx 1 64BitIssue

CAUSE

This problem occurs because the License Compiler always runs as a 64-bit application on a computer that is running a 64-bit operating system. However, the License Compiler does not support 32-bit applications that are running on 64-bit operating systems. the License Compiler only supports 32-bit applications that are running on 32-bit operating systems.

RESOLUTION

To resolve this problem, build a binary file to specify that the application is built for a 32-bit operating system. Build the binary file by using the appropriate flags of the License Compiler.

Note Do not use the Ldr64.exe command to force all code to run as a 32-bit application.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

For more information about the License Compiler, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/ha0k3c9f(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/ha0k3c9f(vs.71).aspx)

APPLIES TO
  • Microsoft .NET Framework 2.0
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Express Edition
Keywords: 
kberrmsg kbtshoot kbprogramming kbprb KB913961
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Anonymous User Report As Irrelevant  
Written: 2/26/2006 8:05 PM
Very Nice article for prof.

Anonymous User Report As Irrelevant  
Written: 12/20/2006 11:24 PM
i have done as instructed but another error encountered and that is Ldr64.exe exited with code 9009

Anonymous User Report As Irrelevant  
Written: 6/2/2008 7:10 AM
Here's how we solved this: 1) ildasm lc.exe 2) remove strong name 3) recompile 4) corflags /32bit+ the new lc.exe 5) backup original lc.exe 6) copy lc.exe obtained in step 4 over original lc.exe 7 enjoy...

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please