473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 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 1355
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tom | last post by:
How can you figure out exactly where in the classpath a class is located ? For example, assume that my computer has a class "com.MyCompany.MyClass" that is physically located in the jar-file...
0
by: Nick Coghlan | last post by:
Anyone playing with the CPython interpreter's new command line switch might have noticed that it only works with top-level modules (i.e. scripts that are directly on sys.path). If the script is...
15
by: Nick Coghlan | last post by:
Python 2.4's -m command line switch only works for modules directly on sys.path. Trying to use it with modules inside packages will fail with a "Module not found" error. This PEP aims to fix that...
1
by: Ryan.Mohammed | last post by:
I have a problem where the code that serializes and deserializes an object is actually not the start application but loaded by reflection and located in a subdirectory of the start application. ...
0
by: google | last post by:
Hi everyone, >From my WinForms app I am executing an external process. It turns out that I have replaced the EXE of the external process with a newer version and my WinForms app is still...
1
by: deshpandevd | last post by:
My WORD & EXCEL FILES are located on Server. I want to open them on clients computer i find out path of file in following manner string filepath = AppDomain.CurrentDomain.BaseDirectory +...
1
by: deshpandevd | last post by:
My WORD & EXCEL FILES are located on Server. I want to open them on clients computer i find out path of file in following manner string filepath = AppDomain.CurrentDomain.BaseDirectory +...
12
by: comp.lang.php | last post by:
I am using CLI PHP to run a PHP script, c:\wamp\php\php.exe, but instead of executing my script, it's actually displaying the raw code instead. How can I run my code using CLI PHP? I installed...
1
by: johnlim20088 | last post by:
Hi, Currently I have 6 web projects located in Visual Source Safe 6.0, as usual, everytime I will open solution file located in my local computer, connected to source safe, then check out/check in...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...

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.