473,395 Members | 1,689 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,395 software developers and data experts.

Could not start application from Network,...

Dear NG,
i have some code/assembly here that must be executable from a network share.
But it only works if i run it as a Administrator or another privileged user.
But it
does not execute and silently fails when i try to run it as a standard user.
I tried
this to make the assembly work with normal users, but it did not work:

Caspol.exe -m -cg LocalIntranet_Zone FullTrust

The application should be executable that way:
\\servername\share$\program.exe

When i try to run it with non-priv standard user the application
fails silently and i get nothing else that makes any sense.

The Codebase where the exception araises (debugged):

using System;

namespace AppInit
{
static class Program
{
[STAThread]
static void Main(string[] args)
{
AppDomainSetup ads = new AppDomainSetup();
string appDir = AppDomain.CurrentDomain.BaseDirectory;
//System.Environment.CurrentDirectory;

ads.ShadowCopyFiles = "true";
ads.ApplicationBase = appDir;
ads.PrivateBinPath = appDir + "\\bin;";
ads.ShadowCopyDirectories = ads.PrivateBinPath + ";" +
ads.ApplicationBase;
//EXCEPTION HERE!!!!
AppDomain domain = AppDomain.CreateDomain("TEK WorkSpace", null,
ads); // Exception is thrown here

}
}
}
}

Some ideas,...?
Code must be executable over the network!
Code must be executable with a non-privilegded standard user!

Thanks for any help and ideas!

Beste Grüsse / Best regards / Votre bien devoue

Kerem Gümrükcü
-----------------------
"This reply is provided as is, without warranty express or implied."

Jul 12 '07 #1
2 3188
Kerem,

Well, there are two things going on here. There is CAS, which would
restrict what your app can do since it is run from the network. This seems
to be recitfied by calling caspol and telling it to give assemblies from the
Local Intranet Zone full trust (although you really should make this
dependent on something based on the assembly, not the whole zone).

The second is whether or not the regular user has rights to write to the
directories specified for the ShadowCopyDirectories property. Does a
standard user have rights to write to this directory?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Kerem Gümrükcü" <ka*******@hotmail.comwrote in message
news:Oo****************@TK2MSFTNGP03.phx.gbl...
Dear NG,
i have some code/assembly here that must be executable from a network
share.
But it only works if i run it as a Administrator or another privileged
user. But it
does not execute and silently fails when i try to run it as a standard
user. I tried
this to make the assembly work with normal users, but it did not work:

Caspol.exe -m -cg LocalIntranet_Zone FullTrust

The application should be executable that way:
\\servername\share$\program.exe

When i try to run it with non-priv standard user the application
fails silently and i get nothing else that makes any sense.

The Codebase where the exception araises (debugged):

using System;

namespace AppInit
{
static class Program
{
[STAThread]
static void Main(string[] args)
{
AppDomainSetup ads = new AppDomainSetup();
string appDir = AppDomain.CurrentDomain.BaseDirectory;
//System.Environment.CurrentDirectory;

ads.ShadowCopyFiles = "true";
ads.ApplicationBase = appDir;
ads.PrivateBinPath = appDir + "\\bin;";
ads.ShadowCopyDirectories = ads.PrivateBinPath + ";" +
ads.ApplicationBase;
//EXCEPTION HERE!!!!
AppDomain domain = AppDomain.CreateDomain("TEK WorkSpace",
null,
ads); // Exception is thrown here

}
}
}
}

Some ideas,...?
Code must be executable over the network!
Code must be executable with a non-privilegded standard user!

Thanks for any help and ideas!

Beste Grüsse / Best regards / Votre bien devoue

Kerem Gümrükcü
-----------------------
"This reply is provided as is, without warranty express or implied."

Jul 12 '07 #2

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comschrieb
im Newsbeitrag news:uD**************@TK2MSFTNGP02.phx.gbl...
Kerem,

Well, there are two things going on here. There is CAS, which would
restrict what your app can do since it is run from the network. This
seems to be recitfied by calling caspol and telling it to give assemblies
from the Local Intranet Zone full trust (although you really should make
this dependent on something based on the assembly, not the whole zone).

The second is whether or not the regular user has rights to write to
the directories specified for the ShadowCopyDirectories property. Does a
standard user have rights to write to this directory?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Kerem Gümrükcü" <ka*******@hotmail.comwrote in message
news:Oo****************@TK2MSFTNGP03.phx.gbl...
>Dear NG,
i have some code/assembly here that must be executable from a network
share.
But it only works if i run it as a Administrator or another privileged
user. But it
does not execute and silently fails when i try to run it as a standard
user. I tried
this to make the assembly work with normal users, but it did not work:

Caspol.exe -m -cg LocalIntranet_Zone FullTrust

The application should be executable that way:
\\servername\share$\program.exe

When i try to run it with non-priv standard user the application
fails silently and i get nothing else that makes any sense.

The Codebase where the exception araises (debugged):

using System;

namespace AppInit
{
static class Program
{
[STAThread]
static void Main(string[] args)
{
AppDomainSetup ads = new AppDomainSetup();
string appDir = AppDomain.CurrentDomain.BaseDirectory;
//System.Environment.CurrentDirectory;

ads.ShadowCopyFiles = "true";
ads.ApplicationBase = appDir;
ads.PrivateBinPath = appDir + "\\bin;";
ads.ShadowCopyDirectories = ads.PrivateBinPath + ";" +
ads.ApplicationBase;
//EXCEPTION HERE!!!!
AppDomain domain = AppDomain.CreateDomain("TEK WorkSpace",
null,
ads); // Exception is thrown here

}
}
}
}

Some ideas,...?
Code must be executable over the network!
Code must be executable with a non-privilegded standard user!

Thanks for any help and ideas!

Beste Grüsse / Best regards / Votre bien devoue

Kerem Gümrükcü
-----------------------
"This reply is provided as is, without warranty express or implied."

Hi Nichoals,

i'll forward this to my developer workmate who asked me
the question. Maybe he will continue this thread.
I could not solve the problem for him so i asked
the newsgroup. He already had left the work when
i asked the Newsgroup,...what he should do instead.

Thank you very much for the quick reply!

Beste Grüsse / Best regards / Votre bien devoue

Kerem Gümrükcü
-----------------------
"This reply is provided as is, without warranty express or implied."


Jul 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: muntyanu | last post by:
Hi All, I got permission issue when accesing network files from the application that was started using Process component. Actually I have my .NET windows service running. From this service I...
4
by: Mike S | last post by:
I'm hoping someone can explain the following. I have installed Visual Studio 2003. Setup several web application projects, compliled and ran them with no problem. All of this was accomplished...
2
by: Daniel Bass | last post by:
Scenario (Hardware) ---------------------- I've got an engineering source server with Win 2k on it. We use it for all the source files for our projects etc... Let's call it "Engineering" for...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
14
by: Gianfranco | last post by:
Hi everybody, First of all, sorry for my english if it isn't perfect ;-p I have an error in an asp.net application. I have win2003 server, with iis 6. I'm developping with visual studio...
6
by: kk | last post by:
hello to all, I want to call an exe file on other system(on the same LAN)though a webservice(by placing the dll).For that i use the following code in C#...... Process ps = new Process();...
4
by: =?Utf-8?B?Tm9yZW1hYw==?= | last post by:
Here is what I am trying to get to: I have a console exe that grabs information from the network and writes to an XML file on the website that web pages then render information from. The console...
11
by: Andrus | last post by:
Managed code .NET 3.5 C# WinForms application runs OK from Vista when in local drive. When application is copied to mapped network drive or started from \\othercmp\c\myapp\myapp.exe folder , it...
11
by: fniles | last post by:
One of our application uses VB6 and Access97 database. Another application uses VB.NET 2005. This morning for about 15 seconds when the application tries to read either a query or a table from the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.