Re: shell() strange problem
You cannot run an exe from a website like that. Imagine the consequences!
You found the reason yourself.
Code:
win32...blah blah permission error
Browsers don't have permission to execute programs directly.
Re: shell() strange problem
Here's about as close as you can come. It impersonates the permissions to read the root folder on your computer, and return file info.
http://siokonline.com/publix/publish.htm
Re: shell() strange problem
oops, i realised the following. The EXEs are actually running like in "invisible mode", what ever the AppWinStyle parameter is. I can see the specific exe instance in the processes tab of the windows task manager. But it seems that it is sleeping or something (takes zero cpu usage!!!).
By running the exe from the windows explorer as i said previously, it runs fine. The only difference between the two ways of running, is the user. From a web form, the user that runs the exe is the ASPNET user, and in the other hand from Windows Explorer the user is the local machine user.
I am a bit confused.
Re: shell() strange problem
I added a link to my last post. Check it out, and run it on your system to see if it runs or not...
Re: shell() strange problem
I understand what you are saying, but i am talking for my personal server, not something untrusted. And not for the public.
The exe is run from the SERVER, not the client. Lets say is an extension of the web form code, nothing more or less. Is just like i preferred to do some file handling from within a vb6 program, and then the result to handle it better from the rest vb.net program.
sub button_click()
'vb.net commands
'shell and wait for the vb6 code (exe)
'vb.net commands to get the result of that exe
'continue executing the event, then return the page to the client
end sub
That is the scenario.
What permissions and where to set them?
Quote:
Originally Posted by
dglienna
You cannot run an exe from a website like that. Imagine the consequences!
You found the reason yourself.
Code:
win32...blah blah permission error
Browsers don't have permission to execute programs directly.
Re: shell() strange problem
You can't. The browser can't interact with the OS by shelling a command, or starting a process.
You could rewrite your vb6 app as an aspx web app with code-behind that runs locally
Re: shell() strange problem
djlienna, thanks for the answers but you didnt understand, maybe my mistake.
The problem is solved.
I was talking about SERVER-SIDE code, it has nothing to do with browser's facts. I can do what ever I want at server-side, to my server's files and folders and services.
About the problem, the reason of the shell misbehavior was indeed some permissions. When I load the web from another computer on the local network, everything worked fine. Is just like the asp.net service not letting me debug the web form by running both server and client on the same computer.