I am trying to add a Generic Handler (ASHX) to my web site solution. In
order to do that I have to specifiy an assembly name in the web.config file.
But since 2.0 web sites are no longer pre-compiled I get an error when
trying to load the first page.
<system.web>
<httpHandlers>
<add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" />
</httpHandlers>
</system.web>
I get the following error:
Line 51: <system.web>
Line 52: <httpHandlers>
Line 53: <add verb="GET,POST" path="*.angel"
type="Namespace.MyHandler" />
Line 54: </httpHandlers>
Line 55: </system.web>
- Philipp 6 2737
What is the error ?
You did not include it.
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Philipp Schmid [MSFT]" <ph*****@microsoft.com> wrote in message
news:uP****************@TK2MSFTNGP09.phx.gbl... I am trying to add a Generic Handler (ASHX) to my web site solution. In order to do that I have to specifiy an assembly name in the web.config file. But since 2.0 web sites are no longer pre-compiled I get an error when trying to load the first page.
<system.web> <httpHandlers>
<add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" />
</httpHandlers>
</system.web>
I get the following error:
Line 51: <system.web> Line 52: <httpHandlers> Line 53: <add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" /> Line 54: </httpHandlers> Line 55: </system.web>
- Philipp
Sorry about that:
Parser Error Message: The 'type' attribute must be set to a valid Type name
(format: <typename>[,<assemblyname>])
- Philipp
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:%2******************@tk2msftngp13.phx.gbl... What is the error ?
You did not include it. Juan T. Llibre, ASP.NET MVP ASP.NET FAQ : http://asp.net.do/faq/ Foros de ASP.NET en Español : http://asp.net.do/foros/ ====================================== "Philipp Schmid [MSFT]" <ph*****@microsoft.com> wrote in message news:uP****************@TK2MSFTNGP09.phx.gbl...I am trying to add a Generic Handler (ASHX) to my web site solution. In order to do that I have to specifiy an assembly name in the web.config file. But since 2.0 web sites are no longer pre-compiled I get an error when trying to load the first page.
<system.web> <httpHandlers>
<add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" />
</httpHandlers>
</system.web>
I get the following error:
Line 51: <system.web> Line 52: <httpHandlers> Line 53: <add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" /> Line 54: </httpHandlers> Line 55: </system.web>
- Philipp
I've also tried to create another class library (HandlerLib) project that
contains the ASHX file and then reference that assembly from my web site
project (which promptly adds HandlerLib.dll to the Bin directory). When I
then use the assembly name HandlerLib in my web.config file it still doesn't
work. Maybe I need to put it in the GAC?
- Philipp
BTW, I am using VS.NET 2005 B2 in case that makes any difference.
"Philipp Schmid" <ph*****@microsoft.com> wrote in message
news:Oh**************@TK2MSFTNGP09.phx.gbl... Sorry about that:
Parser Error Message: The 'type' attribute must be set to a valid Type name (format: <typename>[,<assemblyname>])
- Philipp
"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:%2******************@tk2msftngp13.phx.gbl... What is the error ?
You did not include it. Juan T. Llibre, ASP.NET MVP ASP.NET FAQ : http://asp.net.do/faq/ Foros de ASP.NET en Español : http://asp.net.do/foros/ ====================================== "Philipp Schmid [MSFT]" <ph*****@microsoft.com> wrote in message news:uP****************@TK2MSFTNGP09.phx.gbl...I am trying to add a Generic Handler (ASHX) to my web site solution. In order to do that I have to specifiy an assembly name in the web.config file. But since 2.0 web sites are no longer pre-compiled I get an error when trying to load the first page.
<system.web> <httpHandlers>
<add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" />
</httpHandlers>
</system.web>
I get the following error:
Line 51: <system.web> Line 52: <httpHandlers> Line 53: <add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" /> Line 54: </httpHandlers> Line 55: </system.web>
- Philipp
Hi, Philipp.
If all you want to do is add a specific extension
to the pages which are served by your server, use this :
<httpHandlers>
<add verb="GET, HEAD, POST, DEBUG" path="*.angel"
type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
<compilation>
<buildProviders>
<add extension=".angel" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
and map the extension .angel to aspnet_isapi.dll in the
Application's configuration section in the Internet Service Manager.
That will cause ASP.NET to process the .angel extension
in the exact same way it processes files with the .aspx extension.
That should be enough for your needs.
If it isn't, post what you want to do with your .angel extension,
that can't be done in an aspx file.
See my custom extension .juan running at : http://asp.net.do/test/version.juan
Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Philipp Schmid" <ph*****@microsoft.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl... I've also tried to create another class library (HandlerLib) project that contains the ASHX file and then reference that assembly from my web site project (which promptly adds HandlerLib.dll to the Bin directory). When I then use the assembly name HandlerLib in my web.config file it still doesn't work. Maybe I need to put it in the GAC?
- Philipp
BTW, I am using VS.NET 2005 B2 in case that makes any difference.
"Philipp Schmid" <ph*****@microsoft.com> wrote in message news:Oh**************@TK2MSFTNGP09.phx.gbl... Sorry about that:
Parser Error Message: The 'type' attribute must be set to a valid Type name (format: <typename>[,<assemblyname>])
- Philipp
"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:%2******************@tk2msftngp13.phx.gbl... What is the error ?
You did not include it. Juan T. Llibre, ASP.NET MVP ASP.NET FAQ : http://asp.net.do/faq/ Foros de ASP.NET en Español : http://asp.net.do/foros/ ====================================== "Philipp Schmid [MSFT]" <ph*****@microsoft.com> wrote in message news:uP****************@TK2MSFTNGP09.phx.gbl... I am trying to add a Generic Handler (ASHX) to my web site solution. In order to do that I have to specifiy an assembly name in the web.config file. But since 2.0 web sites are no longer pre-compiled I get an error when trying to load the first page.
<system.web> <httpHandlers>
<add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" />
</httpHandlers>
</system.web>
I get the following error:
Line 51: <system.web> Line 52: <httpHandlers> Line 53: <add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" /> Line 54: </httpHandlers> Line 55: </system.web>
- Philipp
Using an ASPX page was my first attempt. However, I haven't found a way to
remove the <htm>, <head>, and <body> tags from the response that is
generated! Well, guess what - I tried again and now it works!
So my immediate problem is solved, but I still wonder how to add an ASHX
handler to a 2.0 web site. I think having an second assembly which contains
the handler code is probably correct. Now why it doesn't get loaded then
added as a reference to the project (and is put in the \bin directory) is
strange to me. Does this assembly have to be signed (but then the error
message could be improved).
- Philipp
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OO**************@TK2MSFTNGP10.phx.gbl... Hi, Philipp.
If all you want to do is add a specific extension to the pages which are served by your server, use this :
<httpHandlers> <add verb="GET, HEAD, POST, DEBUG" path="*.angel" type="System.Web.UI.PageHandlerFactory"/> </httpHandlers> <compilation> <buildProviders> <add extension=".angel" type="System.Web.Compilation.PageBuildProvider" /> </buildProviders> </compilation>
and map the extension .angel to aspnet_isapi.dll in the Application's configuration section in the Internet Service Manager.
That will cause ASP.NET to process the .angel extension in the exact same way it processes files with the .aspx extension.
That should be enough for your needs.
If it isn't, post what you want to do with your .angel extension, that can't be done in an aspx file.
See my custom extension .juan running at : http://asp.net.do/test/version.juan
Juan T. Llibre, ASP.NET MVP ASP.NET FAQ : http://asp.net.do/faq/ Foros de ASP.NET en Español : http://asp.net.do/foros/ ====================================== "Philipp Schmid" <ph*****@microsoft.com> wrote in message news:ev**************@tk2msftngp13.phx.gbl... I've also tried to create another class library (HandlerLib) project that contains the ASHX file and then reference that assembly from my web site project (which promptly adds HandlerLib.dll to the Bin directory). When I then use the assembly name HandlerLib in my web.config file it still doesn't work. Maybe I need to put it in the GAC?
- Philipp
BTW, I am using VS.NET 2005 B2 in case that makes any difference.
"Philipp Schmid" <ph*****@microsoft.com> wrote in message news:Oh**************@TK2MSFTNGP09.phx.gbl... Sorry about that:
Parser Error Message: The 'type' attribute must be set to a valid Type name (format: <typename>[,<assemblyname>])
- Philipp
"Juan T. Llibre" <no***********@nowhere.com> wrote in message news:%2******************@tk2msftngp13.phx.gbl... What is the error ?
You did not include it. Juan T. Llibre, ASP.NET MVP ASP.NET FAQ : http://asp.net.do/faq/ Foros de ASP.NET en Español : http://asp.net.do/foros/ ====================================== "Philipp Schmid [MSFT]" <ph*****@microsoft.com> wrote in message news:uP****************@TK2MSFTNGP09.phx.gbl... >I am trying to add a Generic Handler (ASHX) to my web site solution. In >order to do that I have to specifiy an assembly name in the web.config >file. But since 2.0 web sites are no longer pre-compiled I get an error >when trying to load the first page. > > <system.web> > <httpHandlers> > > <add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" /> > > </httpHandlers> > > </system.web> > > I get the following error: > > Line 51: <system.web> > Line 52: <httpHandlers> > Line 53: <add verb="GET,POST" path="*.angel" > type="Namespace.MyHandler" /> > Line 54: </httpHandlers> > Line 55: </system.web> > > - Philipp > >
Hi, Philipp.
have you seen an article by Scott Mitchell,
titled "Serving Dynamic Content with HTTP Handlers" ?
It's at : http://msdn.microsoft.com/library/de.../httphandl.asp
and has quite extensive sample code at : http://download.microsoft.com/downlo...s.msiAnalyzing Scott's sample code might help you dissectwhy yours isn't working the way you'd like it to work.Juan T. Llibre, ASP.NET MVPASP.NET FAQ : http://asp.net.do/faq/Foros de ASP.NET en Español : http://asp.net.do/foros/======================================"Philipp Schmid" <ph*****@microsoft.com> wrote in messagenews:%2****************@tk2msftngp13.phx.gb l...> Using an ASPX page was my first attempt. However, I haven't found a way to remove the<htm>, <head>, and <body> tags from the response that is generated! Well, guess what - Itried again and now it works!>> So my immediate problem is solved, but I still wonder how to add an ASHX handler to a2.0 web site. I think having an second assembly which contains the handler code isprobably correct. Now why it doesn't get loaded then added as a reference to the project(and is put in the \bin directory) is strange to me. Does this assembly have to be signed(but then the error message could be improved).>> - Philipp>>> "Juan T. Llibre" <no***********@nowhere.com> wrote in messagenews:OO**************@TK2MSFTNGP10.phx.gbl. ..>> Hi, Philipp.>>>> If all you want to do is add a specific extension>> to the pages which are served by your server, use this :>>>> <httpHandlers>>> <add verb="GET, HEAD, POST, DEBUG" path="*.angel"type="System.Web.UI.PageHandlerFacto ry"/>>> </httpHandlers>>> <compilation>>> <buildProviders>>> <add extension=".angel" type="System.Web.Compilation.PageBuildProvider" />>> </buildProviders>>> </compilation>>>>> and map the extension .angel to aspnet_isapi.dll in the>> Application's configuration section in the Internet Service Manager.>>>> That will cause ASP.NET to process the .angel extension>> in the exact same way it processes files with the .aspx extension.>>>> That should be enough for your needs.>>>> If it isn't, post what you want to do with your .angel extension,>> that can't be done in an aspx file.>>>> See my custom extension .juan running at : http://asp.net.do/test/version.juan>>>>>>>>>> Juan T. Llibre, ASP.NET MVP>> ASP.NET FAQ : http://asp.net.do/faq/>> Foros de ASP.NET en Español : http://asp.net.do/foros/>> ======================================>> "Philipp Schmid" <ph*****@microsoft.com> wrote in messagenews:ev**************@tk2msftngp13.phx.gbl. ..>>> I've also tried to create another class library (HandlerLib) project that contains theASHX file and then reference that assembly from my web site project (which promptly addsHandlerLib.dll to the Bin directory). When I then use the assembly name HandlerLib in myweb.config file it still doesn't work. Maybe I need to put it in the GAC?>>>>>> - Philipp>>>>>> BTW, I am using VS.NET 2005 B2 in case that makes any difference.>>>>>> "Philipp Schmid" <ph*****@microsoft.com> wrote in messagenews:Oh**************@TK2MSFTNGP09.phx.gbl. ..>>>> Sorry about that:>>>>>>>> Parser Error Message: The 'type' attribute must be set to a valid Type name (format:<typename>[,<assemblyname>])>>>>>>>> - Philipp>>>>>>>> "Juan T. Llibre" <no***********@nowhere.com> wrote in messagenews:%2******************@tk2msftngp13.phx. gbl...>>>>> What is the error ?>>>>>>>>>> You did not include it.>>>>>>>>>>>>>>>>>>>> Juan T. Llibre, ASP.NET MVP>>>>> ASP.NET FAQ : http://asp.net.do/faq/>>>>> Foros de ASP.NET en Español : http://asp.net.do/foros/>>>>> ======================================>>>>> "Philipp Schmid [MSFT]" <ph*****@microsoft.com> wrote in messagenews:uP****************@TK2MSFTNGP09.phx.gb l...>>>>>>I am trying to add a Generic Handler (ASHX) to my web site solution. In order to dothat I have to specifiy an assembly name in the web.config file. But since 2.0 web sitesare no longer pre-compiled I get an error when trying to load the first page.>>>>>>>>>>>> <system.web>>>>>>> <httpHandlers>>>>>>>>>>>>> <add verb="GET,POST" path="*.angel" type="Namespace.MyHandler" />>>>>>>>>>>>> </httpHandlers>>>>>>>>>>>>> </system.web>>>>>>>>>>>>> I get the following error:>>>>>>>>>>>> Line 51: <system.web>>>>>>> Line 52: <httpHandlers>>>>>>> Line 53: <add verb="GET,POST" path="*.angel" type="Namespace.MyHandler"/>>>>>>> Line 54: </httpHandlers>>>>>>> Line 55: </system.web>>>>>>>>>>>>> - Philipp>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Lasse Edsvik |
last post by:
Hello
I'm trying to build a simple COM+ app in vs.net using C# and i cant register
it in component manager.....
what more is needed than this:
using System;
using...
|
by: Namratha Shah \(Nasha\) |
last post by:
Hi All,
Assembly linker is a tool which is used to create an assembly by combining
one or more .netmodules and resource files.
In simple words an .netmodule is an IL file that does not have ...
|
by: karunakar |
last post by:
Hi All
I am not able to read the class name I want read the particular class name
string path =
System.Configuration.ConfigurationSettings.AppSettings;
string className = path + ".User";...
|
by: Karl Hungus |
last post by:
A cs file I compiled into an assembly dll is in my bin directory. In the cs
file I have a using statement for System.Xml
I compiled it using this command: csc /out:XmlContent.dll /t:library...
|
by: rh |
last post by:
I'm trying to use an ASHX files to send WAV files back to the client. I
have links to the ASHX page in an ASPX file and there is a FileID on
the querystring. Everything works except the...
|
by: Tim |
last post by:
Guys
I am trying to create an ashx IHttpHandler that will provide images for
me.
This is what I have done so far.
' Start test.ashx
<%@ WebHandler Language="VB" Class="testashx" %>
|
by: Rod |
last post by:
I've been struggling with this thing for 2 days, and after searching the
'net for help, I cannot find what is wrong.
We're using Crystal Reports XI Release 2, with Visual Studio .NET 2003 in...
|
by: Max2006 |
last post by:
Hi,
After I right-click on my web application project file and choose
"Publish ." and do the publishing, the result publishable files does not
include the *.ashx files. Is it by design? How...
|
by: nickmarkham |
last post by:
Hi,
I have 'localized' the button images in my web app by using an HTTP handler file for each image so the correct langauge imagebutton can be loaded depending on the users language.
In the...
|
by: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Hello everyone.
I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report).
I know it can be done by selecting :...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: SueHopson |
last post by:
Hi All,
I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...
| |