GenaShepin

Was wondering if someone can help me with this.

I wrote a console application in .Net that reads a Serial port, was wondering if there is a way to call this application from a client script so I can get this Serial Port value into my Web Page, and then submit to server.

I tried this using VBScript:
Cmd = "C:\MyExecutable.exe"
set objShell = CreateObject(Cmd)

GOT A ACTIVEX COMPONENT CAN'T CREATE OBJECT

Tried:
Cmd = "C:\MyExecutable.exe"
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute Cmd, "", "", "open", 1

GOT A PERMISSION DENIED ERROR.

I figure there must be a way to do this, but not completely sure.
Do I need to compile the executable a certain way
Do I need to register it somewhere as a Safe control
Do I need to specify anything in the browser to allow this (only this of course) executable to run.
Or is it just not possible

Would greatly appreciate if someone can give me some advice with this..




Re: Internet Explorer Web Development Calling .Net executable from a browser

RaffiJ

i'm looking to do something similar but to open excel. let me know if you figure this out.



Re: Internet Explorer Web Development Calling .Net executable from a browser

PaulAllsopp

@Gena: You will need to convert your application into a COM object.

Read the documentation from MS on their site or in the VS online help.

Because you are creating an object that would not normally be on people systems, what you will need to do is upload the object to a site and in the object declaration on the page, add a codebase attribute. This will cause IE to download the component from the net where you uploaded it to, if they do no have it on their system.

Look at a flash object in a page and you will see what I mean by a codebase attribute.





Re: Internet Explorer Web Development Calling .Net executable from a browser

PaulAllsopp

To open excel on a persons system simply create an object instance of the excel object, and pass that object the data you want to appear.

To do this you need the classid of the excel COM, which you can get from the registry, looking in the classes folder.

You will also be able to get this from MS site. Try a search for "embedding excel into webpages" or somthing similar.





Re: Internet Explorer Web Development Calling .Net executable from a browser

RaffiJ

Thanks for your Reply Paul.

Actually I dont want to embed it in IE, I want to have the full Excel app launch and open up a file on a file share. I tried to use ShellExecute but I receive an Permissioned Denied error.