473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

asp.net 2.0 - build provider for aspx?

Hello,

Using ASP.NET v2.0.40607.42, I'm attempting to create a new file
extension that should be handled exactly like "aspx" pages. For
example, I just want to rename an aspx page from "test.aspx" to
"test.extx", where .extx extensions are handled in exactly the same way
as aspx pages.

In pre-2.0 versions of ASP.NET, simply adding a HttpHandler element
(below) to web.config, and adding a IIS mapping of "extx" to
aspnet_isapi.dll was sufficient:

<httpHandlers>
<add verb="*" path="*.extx" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>

Now, in 2.0 I get this error:

There is no build provider registered for the extension '.extx'. You
can register one in the <compilation><buildProviders> section in
machine.config or web.config. Make sure the appliesTo attribute
includes the value 'Web' or 'All'.

I cannot find any good reference about build providers. I don't think
I should have to write a custom build provider because I want the page
to use whatever standard aspx pages use. What is the default build
provider class used for aspx pages?
Any advice will be greatly appreciated!

Best,
chris

Nov 19 '05 #1
3 2881
I believe the config would look something like this for 2.0:

<buildProviders>
<add extension=".extx" appliesTo="" type="System.Web.UI.PageHandlerFactory"
/>
</buildProviders>

Although I'm not 100% about the appliesTo attribute.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Hello,

Using ASP.NET v2.0.40607.42, I'm attempting to create a new file
extension that should be handled exactly like "aspx" pages. For
example, I just want to rename an aspx page from "test.aspx" to
"test.extx", where .extx extensions are handled in exactly the same
way as aspx pages.

In pre-2.0 versions of ASP.NET, simply adding a HttpHandler element
(below) to web.config, and adding a IIS mapping of "extx" to
aspnet_isapi.dll was sufficient:

<httpHandlers>
<add verb="*" path="*.extx" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
Now, in 2.0 I get this error:

There is no build provider registered for the extension '.extx'. You
can register one in the <compilation><buildProviders> section in
machine.config or web.config. Make sure the appliesTo attribute
includes the value 'Web' or 'All'.

I cannot find any good reference about build providers. I don't think
I should have to write a custom build provider because I want the page
to use whatever standard aspx pages use. What is the default build
provider class used for aspx pages?
Any advice will be greatly appreciated!
Best,
chris

Nov 19 '05 #2
<buildProviders>
<add
extension="String"
appliesTo="String"
type="String" />
</buildProviders>

extension is the File Extension
appliesTo is the Directory where the file resides
type is the Type Name of the build provieder class used to invoke the
compliation

This is an exert from:
"A First Look at ASP.NET v. 2.0" (Homer/Sussman/Howard) (Addison Wesley).
Pg 431-432

There is an update, newer version, of this book as well... go get it.
I suggest this to ALL who are working with 2.0

--
Curt Christianson
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Christopher Baldwin" <cb******@gmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Hello,

Using ASP.NET v2.0.40607.42, I'm attempting to create a new file
extension that should be handled exactly like "aspx" pages. For
example, I just want to rename an aspx page from "test.aspx" to
"test.extx", where .extx extensions are handled in exactly the same way
as aspx pages.

In pre-2.0 versions of ASP.NET, simply adding a HttpHandler element
(below) to web.config, and adding a IIS mapping of "extx" to
aspnet_isapi.dll was sufficient:

<httpHandlers>
<add verb="*" path="*.extx" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>

Now, in 2.0 I get this error:

There is no build provider registered for the extension '.extx'. You
can register one in the <compilation><buildProviders> section in
machine.config or web.config. Make sure the appliesTo attribute
includes the value 'Web' or 'All'.

I cannot find any good reference about build providers. I don't think
I should have to write a custom build provider because I want the page
to use whatever standard aspx pages use. What is the default build
provider class used for aspx pages?
Any advice will be greatly appreciated!

Best,
chris

Nov 19 '05 #3
Chris,

What you want to do ( process a custom file extension ) is
poorly documented in the ASP.NET 2.0 beta documentation,
but fairly easy to do.

Here's what you need to do :

Open the Internet Services Manager.
If your folder isn't configured as an Application,
configure it as an Application before proceeding.

1. Right-click the virtual folder that contains
your ASP.NET application, and then click Properties.

2. Click the Configuration button.

3. Highlight and Click the .aspx application mapping, and then click Edit.

4. Select the text in the Executable text box,
and then press CTRL+C to copy the text to your clipboard.
Click Cancel to return to the Application Configuration dialog box.

5. Click the "Add" button, paste the clipboard text into the "Executable" textbox,
and write in the file extension you want ( chris, for example - don't include the dot)

6. In the Verbs section, click to select Limit To, and then copy and paste "GET, HEAD, POST, DEBUG"
( without the quotes ) in the text box.

Click OK 3 times to get out of the Application Properties.

Now, here's a sample web.config to enable the .chris extension :

web.config :
------------
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<httpHandlers>
<add verb="GET, HEAD, POST, DEBUG" path="*.chris" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
<compilation>
<buildProviders>
<add extension=".chris" appliesTo="Web" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
</system.web>
</configuration>
-----------------
That's it!

You can now access pages with the .chris extension,
and they will be processed just like .aspx pages are processed.

Easy, isn't it ?

Let us know how you do.

Juan T. Llibre
ASP.NET MVP
===========
"Christopher Baldwin" <cb******@gmail.com> wrote in message news:11*********************@z14g2000cwz.googlegro ups.com...
Hello,

Using ASP.NET v2.0.40607.42, I'm attempting to create a new file
extension that should be handled exactly like "aspx" pages. For
example, I just want to rename an aspx page from "test.aspx" to
"test.extx", where .extx extensions are handled in exactly the same way
as aspx pages.

In pre-2.0 versions of ASP.NET, simply adding a HttpHandler element
(below) to web.config, and adding a IIS mapping of "extx" to
aspnet_isapi.dll was sufficient:

<httpHandlers>
<add verb="*" path="*.extx" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>

Now, in 2.0 I get this error:

There is no build provider registered for the extension '.extx'. You
can register one in the <compilation><buildProviders> section in
machine.config or web.config. Make sure the appliesTo attribute
includes the value 'Web' or 'All'.

I cannot find any good reference about build providers. I don't think
I should have to write a custom build provider because I want the page
to use whatever standard aspx pages use. What is the default build
provider class used for aspx pages?
Any advice will be greatly appreciated!

Best,
chris

4
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.794 / Virus Database: 538 - Release Date: 11/11/2004
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: DSISupport | last post by:
Hi, I'm planing to use the enterprise library in a new web project, and I was looking at the Security application block which came by defaul with one provider called database authentication...
2
by: | last post by:
Hi all, How can I get a reference to my custom profile provider in my .aspx page? I have looked at httpcontext.current.profile. But from there where do I go? Ideally I would like to be able to...
3
by: BS | last post by:
Hello everybody We are currently writting a small app that will be delivered on an Informix DB and a Sql Server DB. We will be doing some performance check pretty soon for both databases. Is...
2
by: WB | last post by:
Hi, I am revamping my company's website with ASP.Net 2.0. In order to use our existing user data in our SQL 2000, I have written a custom membership provider. However, when I try to logon with...
8
by: MR | last post by:
Is there a document or example that show how to write a MAPI server/provider? Is there was way to write it in .NET? this will be for an application that runs on XP but needs to exposes a third...
6
by: shapper | last post by:
Hello, What is the profiler provider type when using a Microsoft Access database? Thanks, Miguel
4
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality...
0
by: Scott M. | last post by:
I have a simple ASP .NET 2.0 page with no code added to it yet, just a couple of labels and textboxes. The page/project build just find and the page comes up as expected. However, when I look...
2
by: =?Utf-8?B?TUNN?= | last post by:
I am using the compiler: Microsoft.VisualBasic.VBCodeProvider What are the different options I can specify using <providerOption>? So far I have: <system.codedom> <compilers> <compiler...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.