Thanks for your response and the further description.
Regarding on the further issue description and comments, here are some of
my understanding:
It runs fine on c:, but when I copy mancfu3.exe and mancfu3.exe.manifest to
my network i: drive, it fails with a security exception. If I build it
without the /clr it works properly on i:
==================================
So the "i:" is a network drive on a remote machine(just like a UNC share),
correct? If so, this behavior can be explained by the .NET framework's Code
Access security feature. First, when you use " /clr" switch, that means the
output application is a managed .net application when not use the " /clr"
switch, the output exe is a pure unmanaged (win32) application. And only
.net managed application(assembly) will utlize the CAS (code access
security). And CAS is a security restriction based on code( unlike the
win32 OS security whch based on user/role). So CAS will grant different
code different permissions and privileges. For your case, when you put the
application on a local drive, it is considered a local application (in
CAS), so it have fulltrust permision to run. While you put it on the
remote/network drive, it is considered from remote location(in CAS) which
doesn't have FullTrust as local code, so any accessing to local computer's
protecetd resource(such as file, registry ... ) will fail. For a general
introduction on CAS in .net client applcation, you can have a look at the
following msdn article:
#Code Access Security and Distribution Features in .NET Enhance Client-Side
Apps
http://msdn.microsoft.com/msdnmag/issues/02/06/rich/default.aspx
. When I try and run the security
tool on the mancfu3.exe on c:, it says that it can not provide the
information due to a loading error.
============================
Well, as for this issue(we've started discussing from the begining of the
thread), since I found that this is a cpp application compiled with "/clr"
option, this could be the cause of the issue because cpp application is not
.net's natural/intrinsic language, such library like <stdio.h> is not
managed library, so the compiled output (exe) is not a pure managed
application. While the .net configuration tool is concentrating on pure
managed application (does not contains any unstandard extensions like c++
extension).
Anyway, I'll also perform some test on my local side according to your
description and let you know the further results.
Thanks for your continual understanding and patience.
Regards,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)