.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

Calling an ASPX page with no web server

I am writing a database documentation tool to produce static html pages.
Ideally I want to generate the page by calling an aspx page and writing out the results to a file.  It's the repeater functionality that is of particular interest.
A repeater for job categories and within that a repeater for job header information and within that repeaters for job steps etc.
Is there a way for my application to run the aspx file itself rather than having to install the ASPX file on a web server?
Dave Poole Send private email
Sunday, January 06, 2008
 
 
No. I'd suggest running it from a web server on your workstation and using wget or a similar tool to crawl the site and save the output.
clcr
Sunday, January 06, 2008
 
 
It is possible to host the ASP.NET runtime within your own application. This is how the Codesmith code generator works, for example.

There's an old article in MSDN magazine somewhere in their archives. Also, if you can dig up the old Cassini sample, this is an example of a custom server hosting ASP.NET.

Having said that, I concur with the previous poster. If the end result is static pages, it'd be easier to just host a server on your workstation and crawl it with wget or something similar.
Chris Tavares Send private email
Sunday, January 06, 2008
 
 
For that matter, it might be worth using a standalone HTML preprocess or or some other template system. Nested repeating controls are IMHO one of the biggest warts on ASP.NET. Just about every other system ever devised for outputting a nested list is clearer.

Nested repeaters will do the job but they're hardly elegant. Outputting nested lists shouldn't require an event handler and some casts.
clcr
Sunday, January 06, 2008
 
 
Why not just write a service or standalone program that generates xml output from the database, and then use xslt to transform it into html?  I don't see where using asp.net makes what you're trying to do any easier.
Jason Send private email
Sunday, January 06, 2008
 
 
plus, if you take a dependency on ASP.NET, then nobody can view the generated docs unless they are also running ASP.NET locally. 

SqlSpec (http://www.elsasoft.org) is a doc generator for all DBMS on the market today.  It creates xml and transforms it via xslt exactly as suggested above.
Jesse Send private email
Sunday, January 06, 2008
 
 
I would second the other posts about using xml/xslt.  You could also use NVelocity, a template engine, if you need a little more expressive power in the template.
Ted
Wednesday, January 09, 2008
 
 
Dave that's totally do-able. I recall a aspnet online magazine cover the use case. Let me see if I can find it. Hold on.
Li-fan Chen Send private email
Friday, January 11, 2008
 
 
http://discuss.joelonsoftware.com/default.asp?dotnet.12.479334.15

It's in one of my responses ("running from a form"), please kindly look at the sites referred.
Li-fan Chen Send private email
Friday, January 11, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz