471,350 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

executing an exe located on anther computer?

Hi all,

I have a question for you. I used a program two days ago. there was a
lan and program was just on one computer. But other computers have its
short cut icon on their desktop. And it runs. When i came home tried
to do same thing on one of my ex-projexts. But i could not be
succesfull. It gives System.Security.SecurityException. How can i
handle this problem. Can it be possible to use an exe located on the
other computer written by .NET c#?

Erman OLCA

Jan 14 '06 #1
5 1305
It's possible, but you would have to turn off security to do it. Very
dangerous thing to allow...
Jan 14 '06 #2
How can i turn off security options? do you mean windows firewall? i
add my exe to allowed program list but it did not make anu effect.

Jan 14 '06 #3
SP
<er********@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
Hi all,

I have a question for you. I used a program two days ago. there was a
lan and program was just on one computer. But other computers have its
short cut icon on their desktop. And it runs. When i came home tried
to do same thing on one of my ex-projexts. But i could not be
succesfull. It gives System.Security.SecurityException. How can i
handle this problem. Can it be possible to use an exe located on the
other computer written by .NET c#?

Erman OLCA


The other computer is considered to be in the Local Intranet if you
reference it by a UNC name or a mapped drive using it's computer name. Any
..Net application running from another computer has to have the security set
accordingly. There is a wizard to trust assemblies or to change the settings
for a zone in Adminstrative Tools (W2K / XP). Note that if the computer has
only the .Net 2.0 runtime (not the SDK) then the wizard is not installed and
caspol has to be used which is a command line utility. For example to fully
trust the Local Intranet zone you can use
%windir%\Microsoft.Net\Framework\v2.0.50727\caspol -cg 1.2 FullTrust.

If the reference to the other computer uses an IP address then it will be
considered part of the Internet zone and I would NOT adjust security to
allow this to run. Change to UNC type reference, e..g
\\SERVER\share\file.exe

SP
Jan 14 '06 #4
First thanks for your reply. Its now ok than. I have an database
connectivity problem now. How can I programmatically discover the IP
address or hostname of the computer on which
my assembly is executing? thanks a lot again for your replies

Jan 15 '06 #5
SP

<er********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
First thanks for your reply. Its now ok than. I have an database
connectivity problem now. How can I programmatically discover the IP
address or hostname of the computer on which
my assembly is executing? thanks a lot again for your replies


I gather what you are trying to do is find the database server that is
located on the same computer that the executable is located. The assembly is
not executing on that computer though but on the computer that you are
running the software on. Application.ExectablePath will give you the path to
the assembly but that might not help you too much. Generally you would put
the settings in the App.config file because the database server might be on
a different computer than the application server.

SP
Jan 15 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Nick Coghlan | last post: by
15 posts views Thread by Nick Coghlan | last post: by
12 posts views Thread by comp.lang.php | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.