how can you use mshtml DOM object to grab rendered asp.net page?

R

Randall Arnold

Something I forgot to respond to:

If simple things like automating Office apps and copying html elements
cannot be handled by asp.net, then I have no choice but to call it quits. I
will have to tell my customers that what they want (a web-based quality
reporting system) is a complete impossibility. That won't sit too well with
some. To put it bluntly, this is what I was hired for, and if it can't be
done, I have to update my resume and prepare to lose the sweetest gig I ever
landed.

: (

Randall Arnold
 
R

Randall Arnold

The suggestion to run CACLS was in the form of numerous commands that added
user rights via a batch file run on the desktop, not from the web page per
se. This was in order to allow IIS to execute aspx pages on the desktop. I
don't recall the exact error, but a google search on it led me to (brace
yourself) an MSKB article that purported to have the fix. I dutifully
performed the suggested steps (create DOS batch file with CACLS commands)
that Microsoft delineated. Each execution was followed by a system message
that nothing happened. The other suggestion was to add the username
attribute. Visual Web developer's server says the attribute is invalid.

Sigh.

As for Office not being designed to be automated as I am attempting, then
what are Interops for? What's with all the advertisements alluding to such
a capability? Where is Office going next-- seeing as how at least one
(ahem) MS competitor is poised to offer this sort of thing (and then some)?

My head quit spinning. It just hurts now.

Randall Arnold
 
J

Jim Cheshire

Randall said:
The suggestion to run CACLS was in the form of numerous commands that
added user rights via a batch file run on the desktop, not from the
web page per se. This was in order to allow IIS to execute aspx
pages on the desktop. I don't recall the exact error, but a google
search on it led me to (brace yourself) an MSKB article that
purported to have the fix. I dutifully performed the suggested steps
(create DOS batch file with CACLS commands) that Microsoft
delineated. Each execution was followed by a system message that
nothing happened. The other suggestion was to add the username
attribute. Visual Web developer's server says the attribute is
invalid.


Can you tell me what KB article? I'll have a look and get it updated or
pulled if it's misleading.

As for Office not being designed to be automated as I am attempting,
then what are Interops for? What's with all the advertisements
alluding to such a capability? Where is Office going next-- seeing
as how at least one (ahem) MS competitor is poised to offer this sort
of thing (and then some)?


Interop is for calling COM components from managed code. You can certainly
use interop to automate Office from a Windows app. However, Office
applications are not designed for automation in a non-interactive
environment. If a competitive product is going to offer that, I'd watch
out. It's a design nightmare and a bad decision on their part in my opinion.
Applications with a UI should not be automated via a Web application.

One other thing you might want to keep in mind. Web applications should
ALWAYS be designed to run with no one logged in at the console. Give that a
thought and you might understand better what I'm talking about. This is not
an ASP.NET design issue. :)

--
Jim Cheshire
================================
Blog: http://blogs.msdn.com/jamesche

Latest entry:
Getting the PID and TID of a COM Call

Describes how to get the PID of the
dllhost process a COM call is executing
in and how to locate the thread as well.
 
R

Randall Arnold

I'll have to search on that MSKB article again, and post a link.

On one hand I understand what you're getting at re automating Office, but on
the other hand I'm still puzzled. In the intranet scenario I described,
there's no way any of the webform apps would be run with no one logged in.
That defies the very purpose, ie, for users to view production statistics
relevant to their particular operation (or all stats for upper level
managers)-- this access is restricted by function. It would operate much
like many of the industrial web apps out there, only specifically in an
intranet environ. Log in, click a few SQL parameters, export a report.
Done. Using Winforms is problematic due to security issues here: IT is
antagonistic toward developers like myself which means odds are I will never
have the rights to install a Windows app, nor will they manage that effort.
Which means that, up until now, this sort of activity has been done in ad
hoc "cowboy" fashion and that is what I'm trying to avoid. Too many
unmanaged and unsupported Access and Excel "applications" here. I want to
do better.

To me the original premise was so simple I'm blown away by what I've
encountered. All I wanted was to enable users to log in, see their metrics,
and generate a report that could be shared in meetings (we typically use
Excel and Powerpoint for this). The work involved is right now so
cumbersome and prone to error that automating it is not only a luxury but
pretty much a necessity. When I agreed to develop this it seemed like such
a straightforward application, based on what's seen all over the Internet,
so I dived right in. Now I'm disillusioned, and perplexed by how other
developers pull off what they do in web apps. The only thing I can hope for
now is that the Aspose products work as advertised, and that the manager
here will come up with the cash for them...

Randall
 
R

Randall Arnold

Ok, I'm breathing easier now.

I figured out how to add the user permissions in order to run aspx pages on
my laptop under IIS.

I have also determined that I can achieve my reporting goal by utilizing mht
(html archive) pages as the common denominator. I will add an asp.net
mht-generator component to my solution and layout web pages exactly as they
should appear within the published destinations (rendering some elements
invisible at time of export if need be). I will use vbscript client-side
(instead of interops and vb.net server side) to instantiate Word,
Powerpoint, et al and load the generated mht along with some scripted
formatting where needed.

Not exactly what I was shooting for, but it will work. I think. Tests so
far are good.

Thanks for putting up with my exasperated rants.

Randall Arnold
 

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,774
Messages
2,569,598
Members
45,157
Latest member
MercedesE4
Top