.NETGURU
A WebService as a web server?
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.aspnet.webservices.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...

Erik Cassel (VIP)
I have a rich client app that displays HTML from an ASP.NET server. The
client needs to send fairly complex information to the server in order for
the server to render the page.

Encoding the information into the URL (as request values) would make for
very long and cumbersome request strings.

It seems to me the most elegant and maintainable solution is for the client
to send strongly-typed data to a WebService.

The WebService would:

1)    load/create the Page
2)    Use the data from the client to configure the page
3)    Render the Page
4)    Send the rendered HTML stream back to the client as a return value

I found a great article
(http://aspnet.4guysfromrolla.com/articles/091102-1.aspx) that does this for
Controls (ascx). But I want to render an entire aspx page.

Basically, I’m looking for a WebService that acts as a WebServer!

Is there some other way to do this that I haven’t thought of? I suppose the
client could manually generate an XML representation of the data, encode it
into a custom header, and send it off to the web server. Again, this seems
like re-inventing the wheel.

Any ideas?

Reply to this message...
 
    
Denis Kondratyev
Do u mean "screen scrapping"? U can find good article "Screen Scraping with
C# for ASP.NET" in http://www.codeproject.com/aspnet/weather.asp.

"Erik Cassel" <Click here to reveal e-mail address> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ ×
ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ:
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Trebek
You can always try and work something out with the HttpRuntime and
HttpWorkerRequests. This would allow you retrieve the html without having
the dependency of maintaining a separate web service.

Although I've only done this for research purposes, it worked well in
testing I've done.

HTH,

Alex

"Erik Cassel" <Click here to reveal e-mail address> wrote in message
news:Click here to reveal e-mail address...
[Original message clipped]

Reply to this message...
 
    
Erik Cassel (VIP)
Trebek,

Thanks for your response. However, I think all this lets me do is simulate
IIS and pass a URL and query string on to HttpRuntime. In my case I already
have a full ASP.NET web server running.

Let me explain it this way:

The client is a small C++ WebBrowser app that displays HTML from an ASP.NET
web server.

The C++ app sends data to the web server, and the server returns HTML. In a
traditional web server architecture, the client would send the server a URL
with information encoded in the query string.

In my case, the query string would be potentially >1K of data, and it would
be ugly to parse and maintain.

I was hoping to use an elegant protocol like SOAP (web services) to send the
data and receive the resulting HTML.

-Erik

"Trebek" wrote:

[Original message clipped]

Reply to this message...
 
 
System.Web.HttpRuntime
System.Web.Services.WebService




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification