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


Post New Web Links

Registering HttpHandlers

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net
 



Hi,

So I found this httphandler online. That I used on my code. Just made some changes to it http://www.dotnetcurry.com/ShowArticle.aspx?ID=214.

My question is my httphandler works fine on the localhost without even adding anything to the web.config file. But it doesnt work when I deployed the website? I am using iss7. Do I have to register this to the web.config file to make it work? if so how. Since this is my first handler. Also how would I install/map it to iis7.

Also I would have to create a .dll file to do it but I am not sure if i just compile the .ashx file it will just make it into a .dll file.


Thank you very much

Guru




View Complete Post


More Related Resource Links

Registering controls of current assembly object reference NOT set error

  

Hi There,

I have created a simple ASP.net Web Application (2.0) and have added a web user control.

Now in my page I have added this control but I have registered like this,

<%@ Register Assembly="WebApplication1" Namespace="WebApplication1" TagPrefix="Custom" %>

Which means I want to access all the controls in my current Web Application project

Then I have added my user control like this,

<Custom:MyUserControl ID="MyUserControl1" runat="server" PublicProperty="Hello" />

Every thing is fine but when I execute the project, NO control on my user control gets "instantiated" and thus I receive error "Object Reference Not Set"

Note that My Control has,

1) Public property PublicProperty as String

2) 1 Label control

In Load Event Handler I am setting Text property of Label Control to PublicProperty. Here object reference NOT set error occurs (which means Label control is NOT initialized).

I don't want to register my control using Src, TagPrefix etc. Any ideas?

Thanks


Error Registering COM+ Component

  
Hi All,

I am experimenting with using EnterpriseServices. I created a component, created the SNK file, compiled the DLL. In the assemblyinfo.vb file, I added '<Assembly: AssemblyKeyFile("c:\key.snk")> '.
I created a new package in COM+, When I attempt to add the .dll to the package i get:

An error occured while processeing the last operation.
Error Code 80020009 - Exception ocurred.

The eventlog may contain additional troubleshooting information.

Here is the Event log:

Installation of 'TransactionalComponentsCore.dll' into '{6367F5F1-56A7-4223-97AC-51F7DC1D53EB}' failed with an exception:

System.EnterpriseServices.RegistrationException: Could not install type library 'TransactionalComponentsCore.tlb' into application 'TransactionalComponentsCore'.

Server stack trace:
at System.EnterpriseServices.RegistrationDriver.InstallTypeLibrary_W2K(ApplicationSpec spec)
at System.EnterpriseServices.RegistrationDriver.InstallTypeLibrary(ApplicationSpec spec)
at System.EnterpriseServices.RegistrationDriver.InstallAssembly(RegistrationConfig regConfig, Object obSync)
at System.EnterpriseServices.RegistrationHelperTx.InstallAssemblyFromConfig(RegistrationConfig& regConfig, Object sync)
at Sys

Unrecognized configuration section httpHandlers.

  
I spliced this from the webconfig of the working program into another application's webconfig. 
I have just this one error here. Is it ok to have different locations with different system.web areas
 
<?xml version="1.0"?>
			<system.web>
		<!--Start settings for FreeTextBox-->
		<httpHandlers>
			<add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler, FreeTextBox"/>
		</httpHandlers>
		<!--End settings for FreeTextBox-->
		<compilation debug="true" strict="false" explicit="true">
			<assemblies>
				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
				<add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
				<add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicK

config.web httpHandlers add and remove elements for ajax

  

I'm using an autocomplete contol of ajax toolkit. Yesterday a user found that it had stopped working (it wasn't generating the list as you type letters in the textbox). After hours of troubleshooting, I found that in web.config <httpHandlers>, this line -- <remove verb="*" path="*.asmx" /> was placed after the <add> line like this:

<httpHandlers>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<remove verb="*" path="*.asmx"/>
</httpHandlers>

I fixed the problem by removing the <remove> line, but it seems I can also fix the problem by placing the <remove> line b

ajax setting in web.config httpHandlers

  

 I'm using an autocomplete contol of ajax toolkit. Yesterday a user found that it had stopped working (it wasn't generating the list as you type letters in the textbox). After hours of troubleshooting, I found that in web.config <httpHandlers>, this line -- <remove verb="*" path="*.asmx" /> was placed after the <add> line like this:

<httpHandlers>
    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
    <remove verb="*" path="*.asmx"/>
</httpHandlers>

I fixed the problem by removing the <remove> line, but it seem

registering PostBackTrigger for UpdatePanel...

  
I need linkbutton outside of updatePanel to be able to refresh/postback only the updatePanel.It works ok, on the first click, on every second click, the whole page is refreshed... :Othx allHere is the "very simple" code:--- aspx ---<form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:Label ID="Label2" runat="server" Text="Label">Static Text:</asp:Label> <br /> <asp:LinkButton ID="LinkButton1" runat="server">LinkButton01</asp:LinkButton><br> <hr/> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server" Text="Label">Text in UpdPanel</asp:Label> </ContentTemplate> </asp:UpdatePanel> </div> </form> --- code behind ---Public Partial Class update Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label2.Text = Now Dim trig As New AsyncPostBackTrigger trig.ControlID = LinkButton1.UniqueID t

Phillips MP3 player and MTP driver not registering, will only register as a MSC

  
I have been trying for the past 2 weeks to get my MP3 player to connect as a MTP and not a MSC, unfortunately to no success. We have 3 of the same MP3 players and none of them will connect as a MTP. I can get Rhapsody to work on the cpu, Media Player 11 will work on the cpu but in device manager the MP3 will still come up as a MSC and not a MTP. This cpu is a brand new build with me still using Windows XP PRO from the previous build however I had Media Player 10 on the last build and now I have 11 with the most current Rhapsody version 5.337. My previous build was a P4 this one is a AMD build. I don't believe that is the problem.  I have tried the following items and am at a loss as to what to try next. I have worked with Rhapsody and Phillips on the following items; reinstall all of the Rhapsody software (5 times), reinstall windows media player 11 (3 times), clean and clear MP3 reinstall software (7 times), deleted and reinstalled USB drivers (2 times), reinstalled the MTP drivers seperately and just yesterday I have performed a complete reinstall of windows and all drivers to no avail. MP3 player information is model SA1VBE04KW/17 All windows software is current and up to date. System informatio as follows; Microsoft Windows XP Professional, Verison 2002, Service Pack 3 Computer information; AMD Phenom 8250e, Triple Core Processor, 1.91

What are httphandlers and httpmodules?

  
Hi,Can anybody please tell me in very simple language what httphandlers and httpmodules are.

Problem registering client side script to interact with AJAX controls

  
Im using some animationExtenders in my project. The thing is, the objects to be animated are created programmatically, hence i need to also build programmatically the javascript code that will interact with them.It runs properly but, when i interact with these animated controls and the javascript functions are supposed to get to work, i keep getting the usual run-time error saying that the javascript functions are not defined. But, if i check the final html code generated, i can see how all the controls i built programmatically are there ,as well as the script.Tried both RegisterStartupScript and RegisterClientScriptBlock, no luck.Any advice? thanks in advance

problems registering a 32 bit activeX dll and library file on a windows 7 OS (64 bit) using regsvr32

  
Hi have been getting this message box error when i try and register a dll and lib using regsver32.exe, is there an alternative way of registering dll's and lib's? i am using visual studio 08: the error say's something like the module "GrFingerX.dll" might not be compatible with the version of windows you are running, is "GrFingerX.dll" compatible with this version of regsvr32,exe. my system is windows 7 x64 (64 bit) does anyone know why am i getting this message. please help me so that i can get my program up and running. Thanks p.s i have heard that regsvr32.exe has to versions on a 64 bit system but how do i just get the necessary one to run and register the files, because when i try the following steps, start->and type in regsvr32.exe and then the dll name i get the error i stated earlier.

SharePoint VSS Writer not registering / installing properly

  

The SharePoint 2010 VSS Writer is not being published into the results of the vssadmin list writers and is causing Microsoft DPM from being able to protect the data.   We have tried all the standard stuff including the stsadm -o registerwsswriter, configuresharepoint -EnableSharePointProtection, re-register vss dll's, ensure spwrapper account is farm admin and local admin on the server.

I posed a question in another forumn that appears to be a SharePoint VSS issue and not a DPM issue. 

http://social.technet.microsoft.com/Forums/en/dataprotectionmanager/thread/1c456575-5272-4af8-84b0-4c3729265582

Looking at the registry, we do find the stsadm -o registerwsswriter command creates the "SharePoint Services Writer" key under HKLM\CurrentControlSet\Services\VSS\Diag\ but only creates the IDENTIFY (Enter) and IDENTIFY (Leave) DWORD values and not the GETSTATE (Enter) and GETSTATE (Leave) values that a working SharePoint server does (our non production server).

Any directions or assistance would be greatly appreciated.

We do have a case open with Microsoft for nearly 3 weeks... SharePoint team is currently reviewing still.


Issue with Registering to Redistribute SQL JDBC Driver

  

At the link http://msdn.microsoft.com/en-us/sqlserver/aa937725.aspx -  Register for Microsoft SQL Server JDBC Driver Redistribution Rights.

It appears that you can register to redistribute the SQL jdbc.jar.  Yet, when you click the I Accept -- you get a "broken link" or 404.    I registered with the Site Feedback for the SQL server site.   Anyone done this in the past or know if Microsoft still supports this?

Thanks! 


Web.Config (Tag ) help

  

Can any one help with protecting files and sub-folder?
I have a window web hosting with framework 2.0/3.5 laid-out as follow

/root = www.mydomain.com 

this has its own web.config

sub-folders
/css
/images
/jscripts

Second Domain running off a sub-folder
Note: the second domain is totally different than the master running off the root

/root/Application1/ = www.myseconddomain.com

second domain web.config -> contains

<httpHandlers>
      <add verb="*" path="*.mdb" type="System.Web.HttpForbiddenHandler" />
      <add verb="*" path="*.css" type="System.Web.HttpForbiddenHandler" />
      <add verb="*" path="*.js" type="System.Web.HttpForbiddenHandler" />
      <add verb="*" path="*.swf" type="System.Web.HttpForbiddenHandler" />
      <add verb="*" path="*.jpg" type="System.Web.HttpForbiddenHandler" />
      <add verb="*" path="*.gif" typ

Attached Event Registering Problem in XAML vs. CS

  

Hi,

I spent hours searching for a solution to this, but did not find a proper one.

As stated in this post here, there seems to be a difference in how attached events are registered in XAML and in C#.

As described in the MSDN documentation , WPF requires you to implement two methods (AddXYZHandler, RemoveXYZHandler) in order to use an attached Event (XYZEvent) in XAML:

 

public static readonly RoutedEvent XYZEvent = EventManager.RegisterRoutedEvent("XYZ", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(XYZClass));

public static void AddXYZHandler(DependencyObject d, RoutedEventHandler handler)
{
 //event registration comes here
}

public static void RemoveXY

Registering EventReceiver with receiver-element in xml does not work:-(

  

Hi,

I try to register an ItemEventReceiver via Feature for SharePoint Foundation 2010:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
 <Receivers ListTemplateId="10001" Scope="Web">
  <Receiver>
   <Name>Test</Name>
   <Assembly>
    Test.MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dbee5e66453120ea
   </Assembly>
   <Class>
    MyNamepsace.ItemEventReceiver
   </Class>
   <Type>ItemAdding</Type>
   <SequenceNumber>10</SequenceNumber>
  </Receiver>
 </Receivers>
</Elements>

When I activate this feature, the applicationpage ends up in following exception:

[InvalidOperationException: Operation is not valid due to the current state of the object.]
   Microsoft.SharePoint.Administration.SPElementDefinitionCollection...

In the LogFile I can find following information:

Event manager error: Could not load type 'Test.MyNamespace.ItemEventReceiver        ' from assembly 'Test.MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=dbee5e66453120ea'. f8da7d84-c1b7-4068-8105-6e6d56a4e2b5

I dont know why the Assembly cant be loaded. Namespaces, Publickeytokens and dll-Names are correct. The dll is deployed

After registering the "zkemkeeper.dll". I can't use the control in silver light, wpf even aspx. can

  
After registering the "zkemkeeper.dll". I can't use the control in silver light, wpf even aspx.

 The control in tool box is disabled. This is the issue I had faced.


registering custom module in GAC

  

I created a custom Assembly named:

Project Name is NHibernateModule and my Module tag is

<add name="NHibernateModule" type="NHibernateModule, Version=1.0.0.0, Culture=1.0.0.0, Culture=neutral, PublicKeyToken=xxx" />

I got this from Reflector, so I know it's correct.

It has a strong name then added to the GAC. I am referencing it from my Web Site. I have all of the needed assemblies referenced.

I get this error "The given assembly name or codebase was invalid."

Any other items I am forgetting?


Categories: 
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