The processing on the server is very complicate. I have a full featured
application (say thick client)
which does a lot of complicate stuff.
What I wish is to be able to interact with this application through IE
from remote computers.
From what I get, it seems I shoud turn my win application into a Web
service, in order to talk with IE. I have never done web services. Do
you have suggestion on how can I adapt my application to also act as a
web service capable to interact with IE ?
Also there are some nice visual drag drop features which I would like
to deliver to the IE user, creating a smart client within its browser.
So far I suceeded doing the smart client, see:
http://groups.google.it/group/micro...pnet/browse_frm/thread/14d6d0c70aac4884?hl=it
but I do not know how to make it appear within the browser. I have
seen it done but I do not do how to do it! And also I do not know how
to talk back to the server application. Need a lot of help!!
-Pam
Jacob ha scritto:
There are actually a whole bunch of possibilities in the .NET Framework
for doing what you want, but you seem very set on doing it in a desktop
application on the server, which limits your options (or at least
complicates them).
How extensive is the actual processing that you need to have done? The
question is if it is really worth doing in a separate app.
(e-mail address removed) wrote:
That's interesting Jacob. I have actually though about that approach.
But it would be much
neater if I could avoid installations on the client side.
I would like to see * only IE * on the client side and a full
application on the server side.
My problem is I cannot find an easy way to make IE talk with the win
app on the server side
and everytime I ask about it, it seems that none has working examples!
This is quite strange as this problem would seem a really basic one. Or
perhaps I am asking in wrong places...(?)
That IHttpHandler would seem a way to go. But cannot find some
simple explanation on how to integrate that stuff with a win
application.
I have also explored the smart client approach, which probably ios
simila to the applet concept, but then I cannot see an easy way to talk
with the server app.
Another possibily are services, but how do I make it listen to the http
port??
I cannot believe this IE-App talking stuff is so complicate, after all
this is called .NET !
-pam
Jacob ha scritto:
Your program starts in:
Public Shared Sub Main()
End Sub
If you want to pass arguments to the program at startup you can change
that to
Public Shared Sub Main(ByVal Args() As String)
End Sub
Now you can process the entered arguments at startup.
I think what you really want is to make a desktop application that has
an embedded browser. This way you have a two way communication between
browser and program so that you can leave all the client server
communication up to the application and let the browser control handle
the rendering.
(e-mail address removed) wrote:
Thanks Jacob. I didn't get all you are suggesting (I have no idea what
you mean by "have an application that receives the data as arguments in
its startup".) Thanks anyway for the suggestions.
Actually, in other words, what I need is a working example of an ASP
page talking with an object which implements the interface IHttpHandler
within a win application.
For my purposes asp net is totally insufficient. I need to make tal IE
with a win app directly.
Does anybody have some working example or some pointer ?
-Pam
Jacob ha scritto:
You write that there is no IIS involved. This is not true since you are
serving your web page in a browser that requests the page from a
webserver.
Designwise I think it's a bad idea to send the information to be
processed in an external application. When you send the information
back to IIS to send to the client you are going to have to find out
which client sent it (using a session ID I guess). As IIS doesn't
support push technology you have no way of notifying the client that
the information has been successfully processed or it has failed.
But I guess the short and dirty answer to your question is to have an
application that receives the data as arguments in its startup. You the
open the application using System.Diagnostics.Process.Start(). The
process gets the information from the arguments and processes them and
then closes itself down.
Alternatively you pass the information to a database. You processing
app then checks the database every once in a while for new data and
processes it.
Otherwise you need to look into message queueing.
(e-mail address removed) wrote:
I agree that from the example it would seem that ASP is sufficient.
But, as I told you, I have made an oversimplified scenario to make
easier to
answer to the core of the question. You are trying to solve my example,
but my example serves only to show the principle.
I do not just need to send a string back and forth between a IE and
IIS.
I want to tell a win application (server side) what to do from a
browser and viceversa, I want the browser to display what the win
application sends back.
My scheme:
Web client --> Win App (extensive processing) [no IIS involved]
Win App (Extensive processing) --> Web Client
Got it?
Thanks,
-Pam
Jacob ha scritto:
You are definitely overcomplicating this issue. If you want the asp.net
page to return the value to the textbox, you merely use the
Textbox.Text property.
You say you also want to send the Textbox.Text value to an application
running on the server? Why, to feed it into a database? Asp.net can do
that for you. Passing values to other programs is advanced stuff and
you might want to learn the basics first.
Question 3 is obvious -
Response.Write(GenerateResponsePage(Textbox.Text))
(e-mail address removed) wrote:
I am still working with no success on that client/server
problem. I need your help. I will submit simplified versions
of my problem so we can see clearly what is going on.
My model:
A client uses IE to talk with a server.
The user on the client (IE) sees an ASP net page containing
a TextBox. He can write some text in this text box and
push a submit button.
Problem 1. What's the code the ASP NET page?
============================================
A server computer on
http://MyServer/MyApp.exe has a .NET
program running. This is a win application which contains
somewhere the following public function:
Function GenerateResponsePage(ByVal ThisIsWhatReceivedFromClient As
String) As String
Dim MyWebPage As String = String.Empty
MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatReceivedFromClient
MyWebPage &= vbCrLf & "</Body>"
MyWebPage &= vbCrLf & "</html>"
Return MyWebPage
End Function
The win application on the server receives the text submitted in the
text box
(we call it "ThisIsWhatReceivedFromClient") by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateResponsePage" and the browser displays it to the
User
on the client side.
Problem 2. How do I make the win application to
receive the text submitted by the user in the TextBox ?
======================================================
Problem 3. How do I make display the string generated by
the "GenerateResponsePage" (simple html page) on the user
browser ?
============================================================
That all for now. My biggest problems are with problems 2 and 3. I need
a simple
working example to get started. Please help!
-Pam