.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Regasm does not add HKEY_CLASSES_ROOT\CLSID\{My-GUID}\TypeLib

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :.NET Framework
Hi, when I do

regasm myassm.dll /codebae /tlb:myasm.tlb

Everything is registered except the


is not created. Am I doing something wrong?

View Complete Post

More Related Resource Links

Error: Encountered multiple versions of the same assembly with GUID...try pre-importing...TlbImp


Hi!  Can someone tell me how I can troubleshoot the following error: "Encountered multiple versions of the same assembly with GUID...try pre-importing one of these assemblies".

The website developed in VS 2010 (.Net 3.5). This error is only received on my workstation.  Another person developing the site does not experience this issue at all.  Also, not sure if this matters, but on my workstation the 'Assembly Information...' dialog contains no values even though the 'AssemblyInfo.vb' file does specify values for the title, desc, etc.  The GUID being referenced in the error is the main project of the three projects within the solution.

I tried looking through the GAC, but do not see any references to the projects or DLLs in the VS solution and am not sure what else/where to look.

If I delete the copy of the solution on my local machine and pull down a copy from source control (AnkhSVN) the solution will build with no error.  Once I make any changes, such as adding a new aspx file, then the error is received.

I can provide any additional information needed.

CLSID {00024500-0000-0000-C000-000000000046} failed with error: 80070005


Hi Guys,

I know the Microsoft do not support to automate office products. But still i am able to do that with Excel. I did some changes in registry and DCOM confing. Then i am able to open and edit excel on server machine.

Before doing this changes i was getting following error

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

After doing registry changes problem is resolved.

I followed steps given by Smith in



But when i deployed my application on Win Server 2008 and calling from client then i am getting following same error as above


Please help me


Santosh J.


Visual Basic: Inspect COM Components Using the TypeLib Information Object Library


The built-in Object Browser in Visual Basic, like other component browsers such as OLE View and XRay, is one of the more useful tools. But an even better tool would be customizable. You can build your own type library browser using the TypeLib Information Object Library (TLI), a set of COM objects designed to allow programmers to browse type libraries programmatically. This article explains type libraries and the TLI object model, and shows how to use the collections to get information about objects, leading to the creation of a custom type library explorer.

Jason Fisher

MSDN Magazine December 2000

Want to create Page URL rewrite based on Users GUID and Display name?



I am using the asp.net membership. 

On my site I have a Profile.aspx page.

In the code behind of this page,  i get the logged in UserId (Guid) and pass

this to a method in my DAL. GetUserByUserId()


In my database I have a Table called Member which the method gets the data from

and displays details on the page about  the user.


What I want to happen is when they have logged in and are diverted to Profile.aspx,

the page URL shows www.MyWebSite/Profile/UsersName 

for example



is this possible. In my Member table I have FirstName and LastName columns or do I get the

name from the membership table.


even better would be they go straight to www.MyWebsite/JohnSmith.aspx


thank you for any help






Failed to convert parameter value from a String to a Guid.


I am trying to get the UserRole from the logged in user and send it to the database table my code is:

SqlParameter FamilyFriendsOther = new SqlParameter("@Role", SqlDbType.UniqueIdentifier);
        string [] roles = System.Web.Security.Roles.GetRolesForUser();
        if (roles.Length > 0)
            FamilyFriendsOther.Value = roles[0];

Gridview, guid ID, and Location


Presently I have a gridview, I'm in the process of populating the gridview. One colunm "Location" is displayed as the guid ID.  I need for that colunm to be displayed as the location. Here some of the code to display the grid.

myObject orgs = new myObject();
grid.DataSource = orgs;


orgs gets a list of organizations (locations) for the grid. How can I replace the guid ID with it location. Yes the guid ID and location are in a table.

return GUID

Hi,I am using LINQ.I have 2 methods.Method 1public Guid getUserIDByProfileCode(string pCode) { var user = from p in dc.OtherProfiles where p.ProfileCode == pCode select p.UserId; return user.FirstOrDefault(); }Method 2 public Guid getStudentUserId(int id) { var stdID = from p in dc.StudentProfiles where p.ID == id select p.UserId; return stdID.FirstOrDefault(); }The first method is ok. But the second method says "Can not implicitly convert System.GUID? to System.GUID. An explicit conversion exists (Are you missing a cast?)"What is the difference between these 2 mehtods?? how can I solve it?Error 2 Cannot implicitly convert type 'System.Guid?' to 'System.Guid'. An explicit conversion exists (are you missing a cast?) C:\WebDevelopment\DrivingSchool\DrivingSchool\BLL\RegistrationBLL.cs 150 20 DrivingSchool

Very slow regasm.exe and aspnet_regiis.exe make a setup timeout.

Hello, I originally posted my problem in the Exchange forum, but I think that it is an ASP.NET issue. The Exchange setup launch "aspnet_regiis -config+" command with maximum timeout of 120 seconds. If I manually launch the command, it take 240 seconds for a successful résult. I found that this command use regasm.exe, witch take 3.5 Minutes just for help (regasm.exe /?) All details are on : http://social.technet.microsoft.com/Forums/en/exchange2010/thread/70d8cbfa-6e9e-47be-87b8-969ad1a581aa Can you help me ? Syncerely Yours, David.MCSE, MCITP Exchange 2K7 & 2K10

C# COM interop DLL is not getting Unregister through regasm

Hi All, I had registered a C# DLL (Registered for COM Interop) using regasm,  the command is: %windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exe C:\CSharpDLL\ClassLibrary2.dll When i am tried to unregister, it is show a message "Type un-registered successfully" but it would not have got unregsitered. The command used is: %windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exe /unregister C:\Shoper9\ClassLibrary2.dll Can anyone please tell how to unregister a C# DLL using regasm or is there another way to unregister it Vijay

OWC11.Spreadsheet.11 - Retrieving the COM class factory for component with CLSID {} failed due to th

We have a web application (C#) which uses OWC11.Spreadsheet.11 to create excel files. This application works fine on XP 32bit, Windows 2003 server 32 bit versions. Recently we moved our application to a Windows 2008 web server 64bit machine. Now when we run the appication and call the functionality generate the Excel files which uses OWC11.Spreadsheet.11 it throws the following error.Retrieving the COM class factory for component with CLSID {0002E559-0000-0000-C000-000000000046} failed due to the following error: 80040154.In the code we use this library as follows using Microsoft.Office.Interop.Owc11; SpreadsheetClass xlsheet = new SpreadsheetClass();We have registered the Microsoft.Office.Interop.Owc11.dll in the global assembly cash as we have done in 2003 server.  We also tried running owc11.exe to insall all office 2003 web components.Can anyone help us to sort this issue.Thanks in advance.Sam

regasm 4.0 generates error for DLL on a mapped network drive

Calling regasm from .NET Framework 4.0 generates an error for a DLL that is on a mapped network share.  This occurs during our debug builds on developer machines (we actually call a utility that wraps around regasm to perform COM-based registration).  The error is: RegAsm : error RA0000 : Could not load file or assembly 'file:///m:\<file being regasmed>' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515) I can work around this issue by modifying regasm.exe.config to include the loadFromRemoteSources element.  This seems like an annoying change for something that seems like a fairly common task. Is there some better way to enable this? Thanks, -Kevin

ComboBox with Name and Guid

I have a simple question.  I am trying to store a Name and a Guid inside a combobox but it only lets me store one string value.  Is there any way to store the guid value along with the Name?  I need the guid because sometimes the name will be the same.  If not what would be the best way to approach this?   Thanks,

How to: Deal with UniqueIdentifiers, casting it to Guid in DAL

HelloMy users table has a column which is a unique identifier (basically this has FK relationship with aspnet_users table, of membership) Now I have an AppUser class which maps to my users tableuserid        intuser_aspnet_id  guid In my DAL, I am retreiving a user from the db an want to populate my appUser obj. How do i Convert value retreived to GuidappUsr.UserID = Convert.ToInt32(reader["user_id"]);appUsr.AspNetUserID =  reader["aspnet_user_id"];(There is no convert.ToGuid)How can this be done?appUsr.UserID = Convert.ToInt32(reader["user_id"]);                 appUsr.AspNetUserID = (Guid)reader["aspnet_user_id"];

Regasm updates from v1.1 to v2.0

Have there bee any significant updates for regasm from 1.1 to 2.0 that would cause COM to no longer be compilable by VB6.  The following now gives us a compile error when building VB6, "Expected function or variable". [ComVisible(true),Guid("5075DB0A-4B05-3351-8B1C-30ED2E1E174D")] [InterfaceType(ComInterfaceType.InterfaceIsDual)] public interface IMyInterface {   void CheckAuth(string ldapUrl, out string asUserId, out string asPassword,  out string message, out short sRetCd); } [ComVisible(true),Guid("99C9BFCB-A1DC-359D-8BE5-46849EF8E0D3")] [ProgId("MyAssembly.MyClass")] [ClassInterface(ClassInterfaceType.None)] public class MyClass : IMyInterface {   public void CheckAuth(string ldapUrl, out string asUserId, out string asPassword,    out string message, out short sRetCd)   {     // Do work   } } VB6: Dim comObj As MyAssembly.MyClass Dim stUserId As String Dim stPassword As String Dim stMessage As String Dim sRet As Integer Dim iResult As Integer Set comObj = New MyAssembly.MyClass iResult = comObj.CheckAuth(strURL, stUserId, stPassword, stMessage, sRet) Thanks, Mike...

SQLTask fails :: f"Retrieving the COM class factory for component with CLSID {19E353EF-DAF4-45D8-9A0

OS :: Windows 2008 R2 x64 SQL :: 2008 R2 Enterprise x64 The package and task worked fine untill I migrated to a different server, now the SQL Task fails with the following error msg, see below. The package was developed on the same OS & version of SQL.   SSIS package "Package.dtsx" starting. Error: 0xC002F210 at Execute SQL Task, Execute SQL Task: Executing the query "" failed with the following error: "Retrieving the COM class factory for component with CLSID {19E353EF-DAF4-45D8-9A04-FB7F7798DCA7} failed due to the following error: 800700c1.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Task failed: Execute SQL Task SSIS package "Package.dtsx" finished: Success.  

Retrieving the COM class factory for component with CLSID {6568E194-96D8-4035-9087-99E4F75E9ABC} fai

We are accessing Adobe Photoshop through ASP.NET application and using following two DLLs: [1] Interop.Photoshop.dll [2] Interop.PhotoshopTypeLibrary.dll If we execute the web application within MS Visual Studio (IDE), its working fine and no such error. If we deploy the application in IIS then start producing following error: ------------------------- [UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {6568E194-96D8-4035-9087-99E4F75E9ABC} failed due to the following error: 80070005.]    _Default.Button1_Click(Object sender, EventArgs e) +45    System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565 ------------------------- Using regedit we have looked for {6568E194-96D8-4035-9087-99E4F75E9ABC} and found several entries. We have assigned full privileges to ASP.NET, IUS

Problem with Parameters.AddWithValue and GUID

Hi,have a problem, when i want to update a line in my database with the SQLCommand. I have following code: SqlCommand tmp_sqlcmd = new SqlCommand("UPDATE LogSend SET LogSend = @State WHERE DEVICE_UID = @Device_ID", Default_Con); tmp_sqlcmd.Parameters.AddWithValue("@State", logsend.state); tmp_sqlcmd.Parameters.AddWithValue("@Device_ID", logsend.Device_ID); int test = tmp_sqlcmd.ExecuteNonQuery(); tmp_sqlcmd.ExecuteNonQuery();But nothing happens when the command is executed. Any ideas?When i manually edit the line with:UPDATE LogSend SET LogSend = 1 WHERE DEVICE_UID = '5d8f3da0-e7c9-4a99-bb3f-246ce63ceebb'It works.Any ideas for me?Sincerely,Steven
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend