Create page 'on the fly' & Use of Period / Stop / . in url

I

iam247

Hi

I want to create a dynamic web page which is only created when the
users browser requests it. eg

www.mydomain.com/jim.wilson.aspx
or www.mydomain.com/bill.smith.htm

2 questions:

1.
I know that the use of Period / Stop / . is primarily to separate the
page neme from the page type eg mypage.htm or mypage.asp and that the .
is not normally used within a page name.

The use of the Period / Stop / . works ok when I create a page in
Frontpage eg test.page.htm but I have not tested it on a live server.

Will the . work as described above?

2.
Using ASP.net is it practical to create my requirements where the page
is generated 'on the fly' ie Jim.Wilson's page is only generated when
someone requests that specific url?

I know that some sites I visit with an invalid url return a default
message with an index page (rather than a '404'), so I am assuming that
good asp programming could also dynamically generate jim.wilson.aspx

Thanks ColinK
 
H

Harlan Messinger

Hi

I want to create a dynamic web page which is only created when the
users browser requests it. eg

www.mydomain.com/jim.wilson.aspx
or www.mydomain.com/bill.smith.htm

2 questions:

1.
I know that the use of Period / Stop / . is primarily to separate the
page neme from the page type eg mypage.htm or mypage.asp and that the .
is not normally used within a page name.

The use of the Period / Stop / . works ok when I create a page in
Frontpage eg test.page.htm but I have not tested it on a live server.

Will the . work as described above?

The part after the period is called the "extension". I'm not sure what
you mean by "working", but IIS will by default serve files with any of
the extensions .htm, .html, .asp, .aspx as text/html. You can use ASP or
ASP.NET (or any server-side app) to produce response of other types, but
then you have put

Response.ContentType = "[media type]"

in ASP, or the ASP.NET equivalent, into your code, at the top, before
the code has generated any content.

But if the page you've created has ASP.NET code in it, and the extension
is .htm or .html, the code isn't going to be executed either locally or
on a server. You *can* configure IIS to treat .htm or .html files as
ASP.NET pages, but why would you do that instead of just giving them an
..aspx extension?
2.
Using ASP.net is it practical to create my requirements where the page
is generated 'on the fly' ie Jim.Wilson's page is only generated when
someone requests that specific url?

I don't understand your question. The server doesn't send any page until
someone requests it. Further, any page that contains server-side code is
by definition being generated on the fly.
I know that some sites I visit with an invalid url return a default
message with an index page (rather than a '404'), so I am assuming that
good asp programming could also dynamically generate jim.wilson.aspx

I really don't understand the connection here. You can configure IIS to
send a custom page in place of any of the default pages that it sends
for any of the error conditions from 401 on up, including 404. How IIS
is set up to respond to 404 errors has nothing to do with the way you've
built or named your pages.

Because of this last part, I'm starting to think that you haven't asked
your real question--that this is a case where you've got a problem,
you're assuming that the solution takes a particular form, and then you
have questions about how to make that solution happens, which isn't
going to help you if that isn't the right solution in the first place.
What are you really trying to do? If the underlying question is, "How do
I change the way my server responds to a 404 error?", and you've noticed
that IIS seems to require a file whose name ends in .htm and doesn't
work if you provide a file name that ends in .aspx, the answer is that
you are also given a choice between "File" and "URL", and you have to
change it from "File" to "URL" if you want the response to come from an
ASP.NET page instead of a static HTML file.
 
I

iam247

Hi

Thanks for your reply. I obviously did not make myself clear. Lets try
again.

Forget about the 404 - it is only confusing the issue.

GENERATE PAGE ON THE FLY
I am aware that ASP generates the page on the fly, but I believe it is
normally the page content which it generates on the fly - I want the
page name genetated 'on the fly' as well as the content.

eg I have a thousand members in my database but I do not want to have
1000 individual web pages on my server. Jane Smith should be able to
give her friends the following url www.mysystem.com/janesmith.aspx -
the page will only be generated when users request it. When the page is
generated it will also add individual content relating to Jane Smith.

Am I correct that this is a reasonaby straightforward procedure in
ASP.net?

USE OF PERIOD IN PAGE NAME
I would like Jane Smith to be able to set up her user name on my system
as jane.smith rather than janesmith. Assuming my 'on the fly' page
generation above is possible I would like her page name to be
jane.smith.aspx (ie with a period in the page name).

Will she be able to give the following url to users,
www.mysystem.com/jane.smith.aspx - and will users be able to access it
(in other words - will the . in the page name cause any problems)?

I trust I have been clearer this time.

Thanks ColinK


Harlan said:
Hi

I want to create a dynamic web page which is only created when the
users browser requests it. eg

www.mydomain.com/jim.wilson.aspx
or www.mydomain.com/bill.smith.htm

2 questions:

1.
I know that the use of Period / Stop / . is primarily to separate the
page neme from the page type eg mypage.htm or mypage.asp and that the .
is not normally used within a page name.

The use of the Period / Stop / . works ok when I create a page in
Frontpage eg test.page.htm but I have not tested it on a live server.

Will the . work as described above?

The part after the period is called the "extension". I'm not sure what
you mean by "working", but IIS will by default serve files with any of
the extensions .htm, .html, .asp, .aspx as text/html. You can use ASP or
ASP.NET (or any server-side app) to produce response of other types, but
then you have put

Response.ContentType = "[media type]"

in ASP, or the ASP.NET equivalent, into your code, at the top, before
the code has generated any content.

But if the page you've created has ASP.NET code in it, and the extension
is .htm or .html, the code isn't going to be executed either locally or
on a server. You *can* configure IIS to treat .htm or .html files as
ASP.NET pages, but why would you do that instead of just giving them an
.aspx extension?
2.
Using ASP.net is it practical to create my requirements where the page
is generated 'on the fly' ie Jim.Wilson's page is only generated when
someone requests that specific url?

I don't understand your question. The server doesn't send any page until
someone requests it. Further, any page that contains server-side code is
by definition being generated on the fly.
I know that some sites I visit with an invalid url return a default
message with an index page (rather than a '404'), so I am assuming that
good asp programming could also dynamically generate jim.wilson.aspx

I really don't understand the connection here. You can configure IIS to
send a custom page in place of any of the default pages that it sends
for any of the error conditions from 401 on up, including 404. How IIS
is set up to respond to 404 errors has nothing to do with the way you've
built or named your pages.

Because of this last part, I'm starting to think that you haven't asked
your real question--that this is a case where you've got a problem,
you're assuming that the solution takes a particular form, and then you
have questions about how to make that solution happens, which isn't
going to help you if that isn't the right solution in the first place.
What are you really trying to do? If the underlying question is, "How do
I change the way my server responds to a 404 error?", and you've noticed
that IIS seems to require a file whose name ends in .htm and doesn't
work if you provide a file name that ends in .aspx, the answer is that
you are also given a choice between "File" and "URL", and you have to
change it from "File" to "URL" if you want the response to come from an
ASP.NET page instead of a static HTML file.
 
A

Adrienne Boswell

Gazing into my crystal ball I observed (e-mail address removed) writing in


Please don't top post - response moved
Harlan said:
Hi

I want to create a dynamic web page which is only created when the
users browser requests it. eg

www.mydomain.com/jim.wilson.aspx
or www.mydomain.com/bill.smith.htm

2 questions:

1.
I know that the use of Period / Stop / . is primarily to separate
the page neme from the page type eg mypage.htm or mypage.asp and
that the . is not normally used within a page name.

The use of the Period / Stop / . works ok when I create a page in
Frontpage eg test.page.htm but I have not tested it on a live
server.

Will the . work as described above?

The part after the period is called the "extension". I'm not sure
what you mean by "working", but IIS will by default serve files with
any of the extensions .htm, .html, .asp, .aspx as text/html. You can
use ASP or ASP.NET (or any server-side app) to produce response of
other types, but then you have put

Response.ContentType = "[media type]"

in ASP, or the ASP.NET equivalent, into your code, at the top, before
the code has generated any content.

But if the page you've created has ASP.NET code in it, and the
extension is .htm or .html, the code isn't going to be executed
either locally or on a server. You *can* configure IIS to treat .htm
or .html files as ASP.NET pages, but why would you do that instead of
just giving them an .aspx extension?
2.
Using ASP.net is it practical to create my requirements where the
page is generated 'on the fly' ie Jim.Wilson's page is only
generated when someone requests that specific url?

I don't understand your question. The server doesn't send any page
until someone requests it. Further, any page that contains
server-side code is by definition being generated on the fly.
I know that some sites I visit with an invalid url return a default
message with an index page (rather than a '404'), so I am assuming
that good asp programming could also dynamically generate
jim.wilson.aspx

I really don't understand the connection here. You can configure IIS
to send a custom page in place of any of the default pages that it
sends for any of the error conditions from 401 on up, including 404.
How IIS is set up to respond to 404 errors has nothing to do with the
way you've built or named your pages.

Because of this last part, I'm starting to think that you haven't
asked your real question--that this is a case where you've got a
problem, you're assuming that the solution takes a particular form,
and then you have questions about how to make that solution happens,
which isn't going to help you if that isn't the right solution in the
first place. What are you really trying to do? If the underlying
question is, "How do I change the way my server responds to a 404
error?", and you've noticed that IIS seems to require a file whose
name ends in .htm and doesn't work if you provide a file name that
ends in .aspx, the answer is that you are also given a choice between
"File" and "URL", and you have to change it from "File" to "URL" if
you want the response to come from an ASP.NET page instead of a
static HTML file.


Hi

Thanks for your reply. I obviously did not make myself clear. Lets try
again.

Forget about the 404 - it is only confusing the issue.

GENERATE PAGE ON THE FLY
I am aware that ASP generates the page on the fly, but I believe it is
normally the page content which it generates on the fly - I want the
page name genetated 'on the fly' as well as the content.

eg I have a thousand members in my database but I do not want to have
1000 individual web pages on my server. Jane Smith should be able to
give her friends the following url www.mysystem.com/janesmith.aspx -
the page will only be generated when users request it. When the page
is generated it will also add individual content relating to Jane
Smith.

Am I correct that this is a reasonaby straightforward procedure in
ASP.net?

USE OF PERIOD IN PAGE NAME
I would like Jane Smith to be able to set up her user name on my
system as jane.smith rather than janesmith. Assuming my 'on the fly'
page generation above is possible I would like her page name to be
jane.smith.aspx (ie with a period in the page name).

Will she be able to give the following url to users,
www.mysystem.com/jane.smith.aspx - and will users be able to access it
(in other words - will the . in the page name cause any problems)?

I trust I have been clearer this time.

Thanks ColinK

No, the 404 is essential to what you are trying to do. If I type in
www.example.com/something.asp, the server at example.com looks to see
what page I want and tries to serve it up. If it does not exist (404),
then it can send me to a custom 404 page, or if it is set up to do so,
it can look at the page name requested, and generate something from
there.

As far as your naming conventions go, I am not sure of that (although I
doubt it can be done exactly in that way), and I would suggest you go to
a microsoft group, microsoft.public.dotnet.framework.aspnet is probably
what you need.
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top