Monday, March 12, 2012

want my own extention like http://www.myserver.com/default.prt

Dear friends,

I am web developer, working with vs.net 2005.
I want to create my own extenstion like .aspx, which will server only aspx
code. but user cannot see that extension.

like my web application will be
http://myserver.com/default.prt
is that possible?

Sachinyes, it is, but it has nothing to do with vs.net, but rather the
webserver (most likely IIS). The idea is that you would register your
new extension in IIS, and have it assign the ISAPI trunk to point to
the .net framework.. Once you find where the extensions are registered
you can probably mimic the way the .aspx extension is currently
registered

~kcf

_thedebugger wrote:

Quote:

Originally Posted by

Dear friends,
>
I am web developer, working with vs.net 2005.
I want to create my own extenstion like .aspx, which will server only aspx
code. but user cannot see that extension.
>
like my web application will be
http://myserver.com/default.prt
>
is that possible?
>
Sachin


You can implement HttpModules and Httphandlers to achieve that. you can take
a look at this article
it shows you step by step how to get that done
http://www.15seconds.com/issue/020417.htm
"kferron" <kevin.ferron@.gmail.comwrote in message
news:1163569554.261797.217630@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

yes, it is, but it has nothing to do with vs.net, but rather the
webserver (most likely IIS). The idea is that you would register your
new extension in IIS, and have it assign the ISAPI trunk to point to
the .net framework.. Once you find where the extensions are registered
you can probably mimic the way the .aspx extension is currently
registered
>
~kcf
>
>
_thedebugger wrote:

Quote:

Originally Posted by

>Dear friends,
>>
>I am web developer, working with vs.net 2005.
>I want to create my own extenstion like .aspx, which will server only
>aspx
>code. but user cannot see that extension.
>>
>like my web application will be
>http://myserver.com/default.prt
>>
>is that possible?
>>
>Sachin


>


Yes.

However, even as the resource you have mentioned states, "Since we are
creating a handler for handling files of a new extension, we also need
to tell IIS about this extension and map it to ASP.NET."

As I stated, there are numerous ways, but one thing all of the ways
will require, is configuring the webserver to dispatch, or at least let
pass through the request to the asp.net libraries for handling.

~kcf

Onwuka Emeka wrote:

Quote:

Originally Posted by

You can implement HttpModules and Httphandlers to achieve that. you can take
a look at this article
it shows you step by step how to get that done
http://www.15seconds.com/issue/020417.htm
>
"kferron" <kevin.ferron@.gmail.comwrote in message
news:1163569554.261797.217630@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

yes, it is, but it has nothing to do with vs.net, but rather the
webserver (most likely IIS). The idea is that you would register your
new extension in IIS, and have it assign the ISAPI trunk to point to
the .net framework.. Once you find where the extensions are registered
you can probably mimic the way the .aspx extension is currently
registered

~kcf

_thedebugger wrote:

Quote:

Originally Posted by

Dear friends,
>
I am web developer, working with vs.net 2005.
I want to create my own extenstion like .aspx, which will server only
aspx
code. but user cannot see that extension.
>
like my web application will be
http://myserver.com/default.prt
>
is that possible?
>
Sachin



To create your own extension, add this to web.config :

<httpHandlers>
<add verb"*" path"*.abcd" type"System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
<compilation>
<buildProviders>
<add extension".abcd" type"System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>

...and map the extension .abcd to aspnet_isapi.dll in the
Application's configuration section in the Internet Service Manager.

That will cause ASP.NET to process the .abcd extension
in the exact same way it processes files with the .aspx extension.

That means that, if the page is named "whatever.abcd", the corresponding
codebehind pages would need to be named : "whatever.abcd.cs" or "whatever.abcd.vb".

See an example, using the extension .juan, running at :

http://asp.net.do/test/version.juan
Note that this is an ASP.NET 2.0-specific solution.
In ASP.NET 1.1, it's actually a bit simpler to do.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"_thedebugger" <sachin.korgaonkar@.cyquator.esselgroup.comwrote in message
news:uZ3xReHCHHA.5064@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

Dear friends,
>
I am web developer, working with vs.net 2005.
I want to create my own extenstion like .aspx, which will server only aspx code. but user cannot
see that extension.
>
like my web application will be
http://myserver.com/default.prt
>
is that possible?
>
Sachin


That article is outdated.
The method described in it will *not* work in ASP.NET 2.0.

I just posted an ASP.NET 2.0-specific solution which does work.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
===================================
"Onwuka Emeka" <bugzee20@.hotmail.comwrote in message
news:%236QaVmJCHHA.5012@.TK2MSFTNGP06.phx.gbl...

Quote:

Originally Posted by

You can implement HttpModules and Httphandlers to achieve that. you can take a look at this
article
it shows you step by step how to get that done
http://www.15seconds.com/issue/020417.htm
>
"kferron" <kevin.ferron@.gmail.comwrote in message
news:1163569554.261797.217630@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

>yes, it is, but it has nothing to do with vs.net, but rather the
>webserver (most likely IIS). The idea is that you would register your
>new extension in IIS, and have it assign the ISAPI trunk to point to
>the .net framework.. Once you find where the extensions are registered
>you can probably mimic the way the .aspx extension is currently
>registered
>>
>~kcf
>>
>>
>_thedebugger wrote:

Quote:

Originally Posted by

>>Dear friends,
>>>
>>I am web developer, working with vs.net 2005.
>>I want to create my own extenstion like .aspx, which will server only aspx
>>code. but user cannot see that extension.
>>>
>>like my web application will be
>>http://myserver.com/default.prt
>>>
>>is that possible?
>>>
>>Sachin


>>


>
>


Dear all,

thank you very much for your help.
specially Onwuka's link was great help.

Regards
_thedebugger
[Sachin Korgaonkar]

"kferron" <kevin.ferron@.gmail.comwrote in message
news:1163585517.203222.238750@.m7g2000cwm.googlegro ups.com...

Quote:

Originally Posted by

>
Yes.
>
However, even as the resource you have mentioned states, "Since we are
creating a handler for handling files of a new extension, we also need
to tell IIS about this extension and map it to ASP.NET."
>
As I stated, there are numerous ways, but one thing all of the ways
will require, is configuring the webserver to dispatch, or at least let
pass through the request to the asp.net libraries for handling.
>
>
~kcf
>
Onwuka Emeka wrote:

Quote:

Originally Posted by

>You can implement HttpModules and Httphandlers to achieve that. you can
>take
>a look at this article
>it shows you step by step how to get that done
>http://www.15seconds.com/issue/020417.htm
>>
>"kferron" <kevin.ferron@.gmail.comwrote in message
>news:1163569554.261797.217630@.b28g2000cwb.googlegr oups.com...

Quote:

Originally Posted by

yes, it is, but it has nothing to do with vs.net, but rather the
webserver (most likely IIS). The idea is that you would register your
new extension in IIS, and have it assign the ISAPI trunk to point to
the .net framework.. Once you find where the extensions are registered
you can probably mimic the way the .aspx extension is currently
registered
>
~kcf
>
>
_thedebugger wrote:
>Dear friends,
>>
>I am web developer, working with vs.net 2005.
>I want to create my own extenstion like .aspx, which will server only
>aspx
>code. but user cannot see that extension.
>>
>like my web application will be
>http://myserver.com/default.prt
>>
>is that possible?
>>
>Sachin
>


>

0 comments:

Post a Comment