473,701 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Still Need desperate help to start with ASP NET - simplified problems - HELP!!

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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String

Dim MyWebPage As String = String.Empty

MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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

Jul 2 '06 #1
16 2532
You appear to be trying to reinvent the wheel. This is what web servers are
for, and IIS can do what you need with 1 line of code in an asp.net page.

Look at the request and response objects in the asp.net section of the
framework.
http://www.asp.net/QuickStart/aspnet...x#writingpages

If your looking to create your own webserver, then you'll need to examine
other examples.
http://www.csharphelp.com/archives/archive152.html

--
Regards

John Timney (MVP)
<pa***********@ libero.itwrote in message
news:11******** **************@ j8g2000cwa.goog legroups.com...
>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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String

Dim MyWebPage As String = String.Empty

MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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

Jul 2 '06 #2
No I am not reinventing it. This is a simplified example. The point
here is I want
to talk with a win application. Not to IIS. In this example it seems
not necessary
but I need to talk to a Win app that does huge processing before and
after
receiving dome data from asp page. I have removed the processing
problem just
to get to the essence of the problem.

You have seen only the surface of the question and not got the real
point.
See my previous posting, in case. Thanks anyway.

-Pam

John Timney (MVP) ha scritto:
You appear to be trying to reinvent the wheel. This is what web servers are
for, and IIS can do what you need with 1 line of code in an asp.net page.

Look at the request and response objects in the asp.net section of the
framework.
http://www.asp.net/QuickStart/aspnet...x#writingpages

If your looking to create your own webserver, then you'll need to examine
other examples.
http://www.csharphelp.com/archives/archive152.html

--
Regards

John Timney (MVP)
<pa***********@ libero.itwrote in message
news:11******** **************@ j8g2000cwa.goog legroups.com...
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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String

Dim MyWebPage As String = String.Empty

MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #3
You are definitely overcomplicatin g 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( GenerateRespons ePage(Textbox.T ext))
pa***********@l ibero.it 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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String

Dim MyWebPage As String = String.Empty

MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #4
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 overcomplicatin g 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( GenerateRespons ePage(Textbox.T ext))
pa***********@l ibero.it 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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String

Dim MyWebPage As String = String.Empty

MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #5
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.Diagnost ics.Process.Sta rt(). 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.
pa***********@l ibero.it 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 overcomplicatin g 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( GenerateRespons ePage(Textbox.T ext))
pa***********@l ibero.it 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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String
>
Dim MyWebPage As String = String.Empty
>
MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #6
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.Diagnost ics.Process.Sta rt(). 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.
pa***********@l ibero.it 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 overcomplicatin g 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( GenerateRespons ePage(Textbox.T ext))
>
>
pa***********@l ibero.it 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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String

Dim MyWebPage As String = String.Empty

MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #7
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.
pa***********@l ibero.it 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.Diagnost ics.Process.Sta rt(). 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.
pa***********@l ibero.it 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 overcomplicatin g 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( GenerateRespons ePage(Textbox.T ext))


pa***********@l ibero.it 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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String
>
Dim MyWebPage As String = String.Empty
>
MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #8
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.
pa***********@l ibero.it 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.Diagnost ics.Process.Sta rt(). 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.
>
>
pa***********@l ibero.it 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 overcomplicatin g 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( GenerateRespons ePage(Textbox.T ext))
>
>
pa***********@l ibero.it 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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String

Dim MyWebPage As String = String.Empty

MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #9
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.

pamelaflue...@l ibero.it 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.
pa***********@l ibero.it 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.Diagnost ics.Process.Sta rt(). 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.


pa***********@l ibero.it 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 overcomplicatin g 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( GenerateRespons ePage(Textbox.T ext))


pa***********@l ibero.it 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 GenerateRespons ePage(ByVal ThisIsWhatRecei vedFromClient As
String) As String
>
Dim MyWebPage As String = String.Empty
>
MyWebPage &= "<html>"
MyWebPage &= vbCrLf & "<Body>"
MyWebPage &= vbCrLf & "Received from client: <br>"
MyWebPage &= vbCrLf & ThisIsWhatRecei vedFromClient
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 "ThisIsWhatRece ivedFromClient" ) by the user who is using IE
on the client side. As an answer the Server sends back a page generated
by
the function "GenerateRespon sePage" 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 "GenerateRespon sePage" (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
Jul 2 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1979
by: MARTIN DAVIES | last post by:
I hope you can help. My Linux MYSQL 3.23.52 database server is working OK generally. However, in a database I have a field name that ends with a # (hash UK as opposed to £ which is a pound UK) i.e. If I "select * from emptable" it works fine and the empnumber# field is listed correctly with all the other fields.
13
2138
by: EggsAckley | last post by:
Hi: I have a file that I have been told is a SQL Server backup from a server somewhere. The file is about 200MB in size I am trying to create the database on my local server using RESTORE. I created the backup device, associated it with a backup name etc., copied the file into the backup dir. When I run the RESTORE command, Query Analyzer tells me the database
5
1555
by: Galen Somerville | last post by:
Tooo many examples. I'm confused. VB6 ActiveX.dll with no windows or controls. Interfaces with a device that returns an x size byte array every x milliseconds for x counts. Sends a message to VB2005 main thread on each count. VB2005 has to start the thread and set several variables in the thread before loop starts. VB2005 then has to respond to messages and draw on screen until last count
8
2190
by: john | last post by:
To test a new piece of software designed to help with (among other things) eCommerce WWW site development. The software is fairly easy to use but you must fit a profile. Retail price is 120 GBP and I'll email full releases to anyone who helps FOC of course: Profile: I'm looking for someone who fits a profile - You must be willing to spend some time with the software and report back
2
3299
by: john sun | last post by:
Hi, Dear gurus, In the web deployment project, there is one option called "Output Assemblies page". The first choice is "Merge all outputs to a single assembly", According to MSDN, "Merges all the output assemblies from the compiler into a single assembly. This setting is equivalent to the -o assemblyname option of
3
1451
by: santa19992000 | last post by:
New to .NET ASP, need to start a project (web project) using .NET ASP, do I have to buy any Software to install, how can I start, appreciated for any oinputs ot any links about how to learn .NET ASP. Thanks in advance. SR.
2
4259
by: DR | last post by:
How to create a CLR DLL for Sql Server 2005? Is it just any .net class library that you can load into Sql Server 2005 or is there some special project type that I need to start with?
2
18714
by: siva125 | last post by:
i use row_number() in my sql query to generate number from 1...,but i need to start with row number from 100,101 like wise i using sql4.2 navigator ,i use auto increment it show error what to do insert into ideal_ctry(select row_number() over (order by description asc)) as ncode but i need start with 100,101...
0
1368
by: neeraj1m | last post by:
Having multiple databases in my environment...As a DBA,I need to start and stop each DB individually weekly for backup.Can anyone please provide me the script or some command fuction to perform start and stop without logging to each database individually. Your timely help wud be highly appreciated.
0
8649
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9221
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9082
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8975
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7822
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6567
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4661
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2398
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2035
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.