How to encode ASPX and ASCX files into DLL

G

Guest

Hello All,
Would someone be able to tell me whether it is possible to encode an ASPX
page or an ASCX user control into a DLL and later have the webapplication
get the page out to the requesting client.
Thanks.
 
N

Natty Gur

Hi,

If you mean encode the page to HTML and save it ...

Basically its possible. But I cant get why you need to do so, you can
use OutputCache to do it for you.

Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
 
G

Guest

I am actually looking to compile the aspx or the ascx file into a DLL and
then having the application dynamically create the controls that are
specified in these files when the stored aspx/ascx file is actually being
requested. (I wonder if there exist a technique similar to that of storing
images into the DLL and then dynamically retrieving the images as the web
client requests it.).

The reasoning behind doing things this way is to prevent the user from
modifying/tampering with the aspx/ascx files.

I don't know if I would need to tap into the functionality of the aspx
parser in the asp.net ISAPI extension. Perhaps I can have access to the
generated control objects specified in the webform after the parser has
completed the parse process.

Thanks.
 
M

mikeb

I am actually looking to compile the aspx or the ascx file into a DLL and
then having the application dynamically create the controls that are
specified in these files when the stored aspx/ascx file is actually being
requested. (I wonder if there exist a technique similar to that of storing
images into the DLL and then dynamically retrieving the images as the web
client requests it.).

The reasoning behind doing things this way is to prevent the user from
modifying/tampering with the aspx/ascx files.

ASP.NET in Whidbey will fully support that model; however it won't be
available for production use for a while.

In the meantime, if you specify Debug='true' in the @Page directive for
the .aspx page, the parsed C# (or VB.NET) source remains available in
the temporary directory. You could pull that source file out of there,
and compile it yourself.

I'm sure there's a better way of doing this, probably by using some
undocumented classes in the framework, but this might be a n easy way
for you to experiment while you're figuring out a better method.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top