.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

Deserialize - unable to find an Assembly .....

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :.NET Framework


I've got a really strange error. I'm using a fairly standard method to implement the IClonable interface, basically I serialize my object to a memory stream and then stream it back again.

This all works fine in the .Net runtime environment and if I use a test application. However, I need to run as a COM control inside of an HTML page (long story, but I am embedding it in the home page pane of Outlook).

Anyway everything works fine except this routine. It fails when trying to deserialize with "Assembly not found". I added some debug code to load the assembly dynamically and that all works fine. It can't be a version issue as I am serializing and deserializing the same object in the same method.

I've traced where the framework is loading the assembly and it looks pretty simple:

internal static Assembly LoadAssemblyFromStringNoThrow(string assemblyName)

View Complete Post

More Related Resource Links

Problem in Custom Control Unable to find Control To Validate Property


I make a custome control by taking a TextBox and A Regular Expression Validator.When i Use this on a .aspx page it works fine.But when i use this on .ascx page and dynamically load user control on a place holder in .aspx page it through an Error

Unable to find control id '_ctl0:txtEmail' referenced by the 'ControlToValidate' property of '_ctl0:txtEmailRequired'


My Custome control Code is this"--

public class EmailValidator:System.Web.UI.Control, INamingContainer{

private System.Web.UI.WebControls.TextBox textBox;

private System.Web.UI.WebControls.RegularExpressionValidator regularExpressionValidator;

public EmailValidator(){

textBox = new TextBox();

regularExpressionValidator = new RegularExpressionValidator();

IsErrorTextBelow = true;

IsRequired = false;

unable to find a version of the runtime to run this application

I have an application written using Visual studio 2005 (in VB.Net). When I run it on any machine I get "unable to find a version of the runtime to run this application” and this same application successfully some other PCs   And these following processes I have already done: Repair and reinstall .net framework2.0 I also rebuild my application setup. Scan my PC with antivirus and install new updated antivirus I have format my pc and reinstall dotnet framwork2.0 and my project. And also download .net framework cleanup tool install it.     So if any one has solution excluding the above then plz give me as soon as possible.      

Help Troubleshoot "Could not find Type in assembly"

I am attempting to create a CLR Procedure.  I was able to create the assembly, but I am unable to create a procedure on the assembly.  This is the error I receive: Msg 6505, Level 16, State 1, Procedure DINEServiceProc, Line 2 Could not find Type 'DINEServiceProc' in assembly 'DINEService' Here is the VB code to create the class: <code> Imports System Imports System.Data Imports System.Data.Sql Imports System.Data.SqlClient Imports System.Data.SqlTypes Imports Microsoft.SqlServer.Server Partial Public Class DINEServiceProc <Microsoft.SqlServer.Server.SqlProcedure()> _ Public Shared Sub ServiceProc(ByVal iMsg As String, ByVal iMsgType As String) Dim conn As SqlConnection 'Create an in-process connection to the instance of SQL Server conn = New SqlConnection("Context Connection=True") Dim DINEService As New DINEService Try conn.Open() DINEService.ProcessStartRequest(iMsg, iMsgType) Catch sqe As SqlException 'Console.WriteLine(sqe.Message) Return Finally conn.Close() End Try End Sub End Class </code> And here is the code to create the assembly and the procedure: <code> USE [ServiceBrokerTest] GO /****** Object: SqlAssembly [DINEService] Script Date: 01/03/2006 10:38:00 ******/ CREATE ASSEMBLY [DINEServiceProc] AUTHORIZATION [dbo] FROM 'D:\EHIT\ServiceBroker\DINEService\DINEService\bin\Debug\DINEService.dll' WITH PERMISSION_SET = SAFE

Re-signed my assembly, now I cannot deserialize objects saved before

I have a strange situation about object deserialization. My assemblies all had strong name but signed with different key pair file - I did not realize it is better to have all assemblies signed with the same key pair file before. And now I need to use one single key pair file to resign all assemblies for some other purpose. But After I did that, my program cannot deserialize objects saved by previous version of the assemblies anymore. Use XML object as example, In the XML file, the object is saved with this kind of information, <MyObject version="1" referenceType="MyObject, Assembly1, Version=, Culture=neutral, PublicKeyToken=f89a7ef07260c910"> <.... omited ... > </MyObject> The problem is that, the Assembly1 is resigned and the public key token of the running assembly does not match the token in the xml file. The same problem happens in my binary objects. Any gurus have some idea to deserialize objects after I resigned the assemblies? My program saved hundreds of objects, I hope there is some solution which will work with all of those objects.    

Unable to install SQL Server 2005 Express: The error is (-2146885628) Cannot find object or propert

I am installing 2 instances of SQL Server 2005 Express for 2 different accounting packages on Windows XP SP3.  I have the first installed, after much use of the forums.  The version of setup.exe was 2005.90.2047.0. I am not able to install the second, for Microsoft Office Accounting 2009, setup.exe version 2005.90.3042.0.  The error I am getting in Summary.txt is: Error String    : The SQL Server service failed to start. For more information, see the SQL Server Books Online topics, "How to: View SQL Server 2005 Setup Log Files" and "Starting SQL Server Manually." The error is  (-2146885628) Cannot find object or property. Error Number    : 29503 The errorlog file for MSSQL.2 has a lengthier description: 2009-09-05 23:00:32.13 Server      Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)     Feb  9 2007 22:47:07     Copyright (c) 1988-2005 Microsoft Corporation     Express Edition on Windows NT 5.1 (Build 2600: Service Pack 3) 2009-09-05 23:00:32.31 Server      (c) 2005 Microsoft Corporation. 2009-09-05 23:00:32.31 Server      All rights reserved. 2009-09-05 23:00:32.32 Server      Server process ID is 5516. 2009-09-05 23:00:32.32 Server      Authentication mode is MIXED. 2009-09-05 23:00:32.35 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG'. 2009-09-05 23:00:32.38 Server      Regi

Unable to find static resource in runtime even while designer can see it

So i have:    <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Werp.MigrationHelper"> <Style TargetType="{x:Type UserControl}" x:Key="WizardPageControl" x:Name="WizardPageControl"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type UserControl}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="10" /> <ColumnDefinition Width="475" /> <ColumnDefinition Width="10" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="10" /> <RowDefinition Height="410"/> <RowDefinition Height="50" /> <RowDefinition Height="10" /> </Grid.RowDefinitions> <StackPanel Orientation="Vertical" Name="MainContent" Grid.Row="1" Grid.Column="1"> <ContentPresenter Content="{TemplateBinding Content}"/> </StackPanel> <StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center&qu

Security processor was unable to find a security header in the message



Recently on one of my machines, my client (WCF client) is having problem talking to WCF server. Both server and client are running on the same machine. The machine is Windows7 64 bit machine. It used to work fine until recently. The same software is working fine on all other machines with exactly same configuration. I am really confused here. Could someone please let me know what could be the problem?

Exception Type:

System.ServiceModel.Security.MessageSecurityException, System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089


Security processor was unable to find a security header in the message. This might be because the message is an unsecured fault or because there is a binding mismatch between the communicating parties. This can occur if the service is configured for security and the client is not using security.

Stack Trace: System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessageCore(Message& message, TimeSpan timeout) System.ServiceModel.Security.TransportSecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout) System.ServiceModel.Security.SecurityProtocol.VerifyIncomingMessage(Message& message, TimeSpan timeout, SecurityProtocolCorrelationState[] correlationStates) System.ServiceModel.Channels.SecurityChannelListener

Unable to find Control in List



I'm trying to define the parameters of my data source using a stored procedure. My Stored Procedure Syntax is perfect and i'm happy with that, i've just got trouble with connecting my parameters to my controls. I have 19 Parameters, of which i've managed to connect 17 to controls within my ASP.Net form (some to text boxes, some to ddls etc...)

However, i'm trying to connect a particular parameter to a control, but when i drop down my list of controls it's not visible? The control is within a hidden panel so i've un-hidden it and it's still not there. I've even commented out the panel and tried that but i can't find this control! I just cant seem to get this control to appear in the list.

Has any one seen anything like this before at all?

If you need any more information please let me know. (for clarirty i've attached screen grab)

Control Not in list


Could not load file or assembly 'vcWebCore' or one of its dependencies. The system cannot find the

I have a web project that references a strong-name DLL which contains a HttpModule, it is called vcWebCore.dll.

The DLL is registered in GAC using the gacutil.exe and everything looks fine.
I can see the DLL in my c:\windows\assembly directory with the correct
version ( and public key token.

However, at runtime I kept getting the error that the vcWenCore module could not be located:

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Could not load file or assembly 'vcWebCore' or one of its dependencies. The system cannot find the file specified.

Source Error:

Line 16: 	<system.web>
Line 17: <httpModules>
Line 18: <add type="Technesis.vcWebCore.Web.VcHttpModule, vcWebCore" name="VcHttpModule" />
Line 19: </httpModules>
Line 20: <!--
Does anyone know why or what I am missing?

P.S. If I have the DLL in the bin folder ev

Unable to find enterprise manager after installation....despite following msdn instructions...


I have installed SQL Server 2008 R2 Standard (32-bit)

I am unable to find enterprise manager after installation..

i have met all the requirements ...listed in the msdn
Hardware and Software Requirements for Installing SQL Server 2008 
Follwing is what i have on machine..

.NET Framework 3.5 SP1
 Microsoft Windows Installer 4.5 
Windows Xp sp3


trying to use custom assembly with script task in SSIS 2008 - can't find correct version of GACUtil


I am trying to use a custom assembly (compiled with VS 2005 framework 2.0) with SSIS 2008.  I understand that I need to put this Assembly in the GAC.  I initially attempted to do this using the GACUtil, but I apparently only have version 1.1 of GACUtil intalled on my development PC.  Shouldn't version 2.0 have been installed as part of VS 2005? 

So I then tried simply copying the dll into the GAC folder using windows explorer.  Well, the dll is now visibly in the GAC folder, but I cannot see it from either VS 2005 or BIDS 2008.  Does that mean I do need to use GACUtil 2.0 or higher to install the DLL into the GAC?  If so, is there any place on the Web that I can download it?

.NET 3.5 built Mixed mode assembly unable to load in .NET 4 (even after using app config) without .N


I am trying to run a .NET 3.5 built mixed mode assembly in .NET 4. I was able to do that by adding an app config file with the following content:

<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
The problem is that I used an XP machine and installed .NET 4 on it (without any other previous versions of .NET). When I tried to run the same thing, it gives me an error saying it is unable to load the assembly in .NET 4.

Any idea why this is still depending on .NET 3.5?

Unable to find control with id



I write a webcontrol with a label and a textbox

I use the AssoiactedControlId property to link the textbox to the label
See the Render method below :

protected override void RenderContents(HtmlTextWriter output)
	HtmlGenericControl hgcDiv = new HtmlGenericControl("div");

	TextBox tbNumberLot = new TextBox();	
	tbNumberLot.ID = "tbNumberLot";

 	Label lNumberLot = new Label();
	lNumberLot.ID = "lNumberLot";
	lNumberLot.AssociatedControlID = tbNumberLot.ID;



this throw an exception :"Unable to find control with id 'tbNumberlot' that is associated with the label &#

report definition cannot find custom assembly in VS 2010



I;m trying to use custom code (C#) in a report definition and I have followed the steps outlined in MSDN to get this done. However, whenever I compile the code, I keep getting the following error

"Error while loading code module: ‘GSLibrary, Version=, Culture=neutral, PublicKeyToken=null’. Details: Could not load file or assembly 'GSLibrary, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."

I've scoured through this forum and the net looking for answers but nothing seems to work. The closest answer was to mark the assembly as a trusted code module in the current app domain, but VS2010 complains that this method is deprecated.

The assembly works just fine elsewhere in code. How do I get custom C# code to work with the reports I am creating.

Thanks for your help.

HowTo find a specific version of an assembly in the GAC?


I need to find a way of determining if a certain assembly version is present in the GAC and so far the only way I've found of doing this is by running gacutil /l AssemblyName and then parsing the output of that and check the 'Version' values.

Does anyone have a better solution?

Unable to find Control ID of Dropdownlist Control of a UserControl from a ContentPage


I am implementing Master Pages in my existing project.

I am getting following Error:

" Unable to find control id '_ctl0:ContentPlaceH?older1:drop1:drop1' referenced by the 'ControlToValidate' property of 'valCust1'. "

I have a ContentPage which is refering to a UserContol. This UserControl has a DropDownList Control which i need to validate.

I am using a CustomValidator to validate the Dropdownlist and this CustomValidator is placed in the ContentPage.

The ControlToValidate Property of the CustomControl is assigned programatically as
(in ASPX.cs)

Control CTRL1;

ContentPlaceHolder cntplcHolder = (ContentPlaceHolder)?this.Master.FindCont?rol("ContentPlaceHol?der1");

 CTRL1 = cntplcHolder.FindCon?trol("drop1").FindCo?ntrol("drop1");

 valCust1.ControlToValidate = CTRL1.UniqueID;

My .ASPX page contains

<%@ Register TagPrefix="it" TagName="PickCntl1" Src="~/UserControls/?PickCntl1.ascx" %>

<it:PickCntl1 id="drop1" Runat="Server" Required="true" DisplayDefault="true?"></it:PickCnt?l1>


Unable to find a version of the runtime to run this application



I have developed a C-sharp application. But I am not sure how to run it using the .exe file. When I open the application from within Visual Studio 2008 IDE, I can first build the application and then under "debug" menu I select "start debugging". So it starts running. So I am able to run application that way. But if I put my cursor on the \bin\Debug\Application.exe , and do a right mouse click on "run as"  I get the error Unable to find a version of the  runtime to run this application.

I could be getting this error because I have not taken any steps to create a proper executable. I just went to \bin\Debug and found Application.exe and did right mouse click on "run as". Can you tell what steps need to be taken to create a proper executable, other than just "BUILD"

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