.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

HttpHandler and assembly problem

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :ASP.Net

Hi, I have created a HttpHandler for link redirecting and manualy compiled it, as the visual web developer express doesn,t create an assembly for development purposes. I have placed it in bin folder of the application, along with the web site assembly. I also have added to web.config section:


<add verb="*", path="*", type="Webapplication1.PrzekierowanieSkrotu, Skroc" />


However, at compilation I receive an error stating that class PrzekierowanieSkrotu couldn't be loaded from assembly Skroc.

using System;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace WebApplication1
    public class PrzekierowanieSkroto : IHttpHandler
        /// <summary>
        /// You will need to configure this handler in the web.config file of your 
        /// web and register it with IIS before being able to use it. For more information
        /// see the following link: http://go.microsoft.com/?linkid=8101007
        /// </summary>
        #region IHttpHandler Members

        public bool IsReusable
            // Return false in case your Managed Handler cannot be reused for another request.
            // Usually this would be false in case you have some state information preserved per request.

View Complete Post

More Related Resource Links

MySql.Data assembly problem



I added refernece MySql.Data to my project. My web.config looks like that:

<?xml version="1.0"?>
                <add assembly="MySql.Data, Version=, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>

But when in ServerExplorer I try "Add Connection..." I can't find "MySql Database" in the "Choose Data Source" dialog box?

What the problem can be?

Problem to create assembly which depends on other dll's from SQL Server

I am developing an application in .Net but I need to access to some procedures in ASP.Net since SQL Server.I have got it but i have problems to assembly the dll if it has dependencies of another dll's.I have read that if a dll need other dll it call it automatically but when I try to assembly my class in .NET there is the next error: Create failed for SqlAssembly 'ClaseEjemplo'. Assembly 'csyt.dal, version=, culture=neutral, publickeytoken=null.' was not found in the SQL catalog. (.Net SqlClient Data Provider) Nevertheless if I the class hasn't another dependencies it works.The class I am trying to assembly is ClaseEjemplo.If I try to use the procedure of other class "'csyt.dal" I have problems.If ClaseEjemplo hasn't dependencies it works perfectly!My class ClaseEjemplo is: using System;using System.Collections.Generic;using System.Text;using Csyt.DAL;using Csyt.Info; namespace ClaseEjemplo{    public class Class1    {        public static long devolucion()        {            AIAlarmaDB.TipoCondicion aux1 = new AIAlarmaDB.TipoCondicion();                        AIAlarmaDB aux = new AIAlarmaDB();            aux1=aux.GetTipoCondicionById(1);            return aux1.Id;        }     }}Thanks in advance

run-time error's do not jump to problem line but to assembly with some xml error.

  Used too, when there was a runtime error the ide would break at the line that caused the problem. Now I'm thrown into some assembly code with the error System.Windows.Markup.XamlParseException was unhandled   Message='The invocation of the constructor on type 'Main.MainWindow' that matches the specified binding constraints threw an exception.' Line number '4' and line   Which is extremely uninformative and inefficient. I can look down the chain to find the error thrown but this still is not very informative. How the heck can I get it back to the way it used to be? This has something to do with wpf and the assembly code has System.Windows.Markup.XamlReader.RewrapException as the address. I spend anywhere from 10x to 10000x as long because of this. If the code is simple then I still have to read the error code and click a button which takes time.   Also, I'd rather it break on the line and quit the process as it used to do. I don't need JIT debugging.  

Problem with AJAX - " Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'Syst

Hi., I'm using Visual Studio 2008 and i downloaded the toolkit from Codeplex, I downloaded the zip file which i've marked red in the below link.. This is my code, <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <asp:Panel ID="Panel1" runat="server"> Hi Simbu AJAX Works Fine ! </asp:Panel> <asp:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID = "Panel1" Radius = "6" BorderColor = "#FBB117" Corners = "All" > </asp:RoundedCornersExtender> </form> & this is the error i get, " Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' " I saw this post, http://forums.asp.net/p/1273185/3439540.aspx and i changed my TOOLSCRIPTMANAGER into SCRIPTMANAGER & now i get this error ! and now c what this post says... http://forums.asp.net/t/1529516.aspx NOW WOT AM I SUPPOSE TO DO ??? PLZ GUIDE ME ! I'm struck up with this since 2 days....

Problem with updating assembly references in IIS server

I have a website which is in a Projects directory. The IIS server is set up to point to that website (i.e. any changes in the /Projects version are visible in the wwwroot version), so I can run the website locally on IIS server.One of the libararies that there is an assembly reference to in the website has been updated. If I run the /Projects website using the local ASP development server (localhost), I can open up the files in the library that have been changed and put a breakpoint in them, which will be triggered whenever that section of code is executed.However, when I run the IIS server version in webroot, if I put breakpoints in the same files, the breakpoint icons disappear, and it says that the symbols have not been loaded for the current page (presumably because the file is new, but the old code is being compiled in the assembly?). I have checked, and the library reference is set to auto update, and has the correct path to the dll in the project's .refresh file.I'm confused about this, since I thought the IIS server version was pointing to the same website as the one in /Projects, which works. If anybody has any advice on things that I can check or how I can fix this, I'd be grateful.

requirePermission - please help - assembly problem (SSRS 2008)

*SSRS 2008 Hi All My report has custom code, the code references Oracle.DataAccess.dll for accessing an Oracle Database. The report works fine in the Designer, when I deploy it to the Report Server, I always get #Error in the column referencing the custom code. I caught the exception, the error is: ============================================== System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception. ---> System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'oracle.dataaccess.client'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. ---> System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) The action that failed was: Demand The type of

Problem with assembly reference not updating


I have a solution A which references an assembly in solution B. I added the reference to the project in A by right clicking on the project > add reference, and finding the dll in the bin/Debug folder of the project in solution B in the Browse tab.
However, the reference to assembly B is not being updated in solution when I update the code in project B, even though I am making sure that I recompile the code in project B and then in project A. This means I am unable to debug A properly because the source code does not match the executable (I've checked and the location of the file the breakpoint is added to is correct).
I can go into the bin/Debug folder in project B, the date modified fields for the dll and .pdb files in

CustomControl in seperate assembly problem with control template



I'm still not quite used to work with WPF, so this may be an easy question. But I have a problem.

I have just created a new CustomControl in my project. This custom control which inherits from a TextBox and has a template which defines the layout of the corresponding custom control. The template is referenced in the Generic.xaml as a MergedDictionary.

But, when I use this custom control in a another assembly, the template resource is not loaded, and I can't find out why. If I reference the template directly in the form that references the control it is displayed as it should, but not otherwise!

I have other controls that does work, just this one that doesn't...

Does anyone have any idea what I have forgot to do?

Here is the code of my template xaml:




VS2008 assembly load problem


Hi, I have .NET solution in VS2008. In my solution there are 20 projects. In Debug configuration everything is OK. But in Release configuration there is problem with loading one specific assembly(class library from my projects).

Could not load file or assembly 'Solution.Project, Version=1.0.3929.32377, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.

My system is Windows 7 prof. 64bit. I checked directory and file(.dll) is OK. On other computers it`s OK. I checked out working copy to another directory and same problem.

Where can be problem please?

Problem to create assembly which depends the Same DLL 'System.Web' as itself???


I need to register a .Net assembly within the SQL 2005 eng because other assembies depend on it. That I need to use.


I get the following error message listed below, of the Assembly is depended on itself [ IE 'System.Web'  need assembly 'System.Web' ] see the bold/unscore below...


Has any one solve this or can tell me what I'm doing incorrect?


The Jet


Here is the message stack:



Attempting to create the following assembly in SQL Server 2005:


Problem Executing CLR assembly in SQL Server



 I am trying to execute a CLR assembly for loading data into SQL Server. When I execute the sql statement that calls the CLR Assembly, I am getting the below error. Any help to resolve this issue please....

I have tried giving permissions to external access, but no luck...



Msg 6522, Level 16, State 1, Procedure DW_EXPORT_LoadData, Line 0

A .NET Framework error occurred during execution of user-defined routine or aggregate "DW_EXPORT_LoadData":

System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnection' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlConnectionFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Data.SqlClient.SqlPerformanceCounters' threw an exception. ---> System.IO.FileLoadException: The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


at System.Diagnostics.Switch.InitializeWithStatus()

at System.Diagnostics.Switch.get_SwitchSetting()

at System.Diagnostics.TraceSwitch.get_Level()

at System.Data.ProviderBase.DbConnectionPoolCounters..ctor(St

Problem in the code of "Assembly" in Visual studio 2010


Program is

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Myclasslib1;

namespace WindowsFormsApplication5
    public partial class Form1 : Form
        public Form1()
        class c1=new class();
        private void button1_Click(object sender, EventArgs e)
            int x=c1.sum(Convert.ToInt32(TextBox.Text),Convert.ToInt32(TextBox.Text));
 Error is

1.Error    6    'WindowsFormsApplication5.Form1.c1' does not contain a definition for 'sum'   

Problem in the code of "Assembly" in Visual studio 2010 of C#


The code is as follows

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using myclasslib;

namespace myclasslib


public partial class Form1 : Form


public Form1()




Myclass m1 = new Myclass();

Myclass2 m2 = new Myclass2();

private void button1_Click(object sender, EventArgs e)


int s = m1.Sum(35, 36, 37);



private void button2_Click(object sender, EventArgs e)


string s2=m2.StringFormat("abhishek");



class1 c1 = new class1();

private void button3_Click(object sender, EventArgs e)


int z=c1.MyFun(56,98);

MessageBox.Show(z.ToString()); } } } }

Errors are :

Error    3    The type or namespace name 'class1' could not be found (are you missing a using directive or an assembly reference?)   

Error    6    'myclasslib.Myclass2' does not contain a definition for 'StringFormat' and no extension method 'StringFormat' acceptin

assembly resolving problem



I have a project that references TXTextControl.dll (available at http://www.textcontrol.com/en_US/downloads/trials/ TX Text Control .NET for Windows Forms). Originally, the license.licx contains:

TXTextControl.TextControl, TXTextControl, Version=11.0.300.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638

Since I download newer version of TXTextControl.dll, I change license.licx to:

TXTextControl.TextControl, TXTextControl, Version=16.0.900.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638

(new strong name is found under properties of dll and PublicKeyToken is found to be same as old version through sn.exe)

But strangely, it still gives error:

Error    1    Unable to resolve type 'TXTextControl.TextControl, TXTextControl,  Culture=neutral, PublicKeyToken=6b83fe9a75cfb638'

What is the problem? I need help. Thanks.


Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:

Regrading Sharpoint 2010 problem and solutions

We can write your question and problem on this blogger.you get ans.use.

This sharpoint 2010 problem solving threads

Hi friend,

you can use this thread to solving problem and solutions.
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