Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C# Capabilities

Status
Not open for further replies.

hedgefighter

Programmer
Oct 5, 2006
5
0
0
US
I'm trying to make an app on a client that can communicate with my web server when the client points their web browser to my site. I want to be able to exchange information between the server and the client app. Is there any way to do this? Thanks a lot.
 
I'm trying to make an app on a client that can communicate with my web server when the client points their web browser to my site

Do you the interaction to take place using an application you will develop or a web browser or both? Please explain the problem in more details.

Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
I will developed the client application. I will also have access to the web server. So, I will be able to program whatever is necessary on the server end. The only trick is that I want the user (who will run my client-side application) to be able to use any web browser (IE, Firefox, etc.). Essentially this is what I want: A person running my app goes to my website. A program on the web server is triggered and then begins exchanging information with my application.
 
Thinking about it, I guess the only part I need help with is how to trigger an executable on a web server from the client's web browser.
 
" Thinking about it, I guess the only part I need help with is how to trigger an executable on a web server from the client's web browser "


Very easy.
It is in VB.NET and not with C#. I might be able later to convert it to C#. I have used this piece of code successfully. NOTE that the project must be a class library... a DLL.

Code:
imports ref=system.reflection


dim dll as ref.assembly
dll=ref.assembly.loadfrom("[URL unfurl="true"]http://localhost/...")[/URL]

dim formtype as type
formtype=dll.gettype("Remotedllone.form1")

dim o as object
o=activator.createinstance(formtype)

dim frm as form
frm=directcast(o,form)

frm.show()
 
using System.Reflection;

Assembly dll = Assembly.LoadFrom("address");

Type formtype = dll.GetType("Remotedllone.form1");

Form1 frm = (Form1)Activator.CreateInstance(formtype);

frm.Show();


That should be basically the C# Equivalent. I use code like this to create plugins for my apps...
 
Form1 frm = (Form1)Activator.CreateInstance(formtype);

should be

Form frm = (Form)Activator.CreateInstance(formtype);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top