.NET Questions (CLOSED)

Questions and Answers on any aspect of .NET. Now closed.

This discussion group is now closed.

Have a question about .NET development? Try stackoverflow.com, a worldwide community of great developers asking and answering questions 24 hours a day.

The archives of .NET Questions contain years of Q&A. Even older .NET Questions are still online, too.

deployment issue with winform app & CasPol

I've been stuck on trying to deploy a simple winform .exe with some .dll files needed (ODP .dlls) to a network share, but I'm running into strange problems with certain windows xp workstations in terms of trust. 

On some windows xp machines, when I run the .net 1.1 wizard to "Trust an Assembly" on my machine or on a coworkers, we are able to succesfully grant trust to this .exe file as well as the .dll files.  But on a lot of other workstations, we get a message box saying that the file we are adding trust to must be an assembly (this message pops up on both the .dll files and the .exe). 

So I ran the CasPol command and just gave the whole directory containing the files full trust.  But after doing that, I'm now getting a message box saying "Windows cannot access the specified device, path or file.  You may not have the appropriate permissions to access the item".  This same windows account has rwx permissions on this folder, as well as the parent folder.

I really don't want to go with the whole windows installer package because this app is so simple -- no registry settings, no config file, only 1 form that spits out some data from 1 table.  It just seems overkill to me.

Anyone deal with similiar problems deploying an .exe & .dll files to a network share?  Been trying the google.  Thanks.
grover
Monday, January 15, 2007
 
 
You can't run .NET exe's off of a network drive. Try copying them local and then running them.
anon
Monday, January 15, 2007
 
 
Problem turned out to be a permissions thing after all.

You can run a .NET exe over a share though.
grover
Monday, January 15, 2007
 
 
"You can run a .NET exe over a share though. "

Only if you are willing to track down errors due to permission settings. And the error messages are just about worthless if you ask me.
dood mcdoogle
Monday, January 15, 2007
 
 
Yes, you can run .NET assemblies from a network share, given the correct permission settings - I do it all the time.

Grover, the error message pointed you towards a Windows permission problem, even though thst Windows account had RWX permissions to the folder. Can you elaborate on what the permission problem was, and how you fixed it?
Mark Pearce Send private email
Tuesday, January 16, 2007
 
 
It was definitely the windows permissions.  We were looking at the wrong user account, which did not have appropriate perms on the directory.

It was a monday...
grover
Tuesday, January 16, 2007
 
 
Mark, a full-fledged WinForms application needs a ton of permissions that are only available to "fully trusted" assemblies by default, and also by default only assemblies run from a local disk are fully trusted.

If you succeeded in running a .NET exe from a shared drive it was because that executable didn't do very much, or because your system administrator has greatly increased permissions for .NET assemblies run from local network locations.
Chris Nahr Send private email
Wednesday, January 17, 2007
 
 
Also, the generic "application error" dialog that pops up when security permissions are denied is indeed a shining example of user hostility.  It's utterly incomprehensible and doesn't give a user the slightest clue as to the real issue.

I've opened an MSDN feedback entry to request a friendlier dialog, though so far nothing much has happened:

 https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=98080
Chris Nahr Send private email
Wednesday, January 17, 2007
 
 
(That's for release mode exes, by the way.  In debug mode you get at least a stack trace with a SecurityException.  In release mode you just get a machine-level stack dump!)
Chris Nahr Send private email
Wednesday, January 17, 2007
 
 
>> If you succeeded in running a .NET exe from a shared drive it was because that executable didn't do very much, or because your system administrator has greatly increased permissions for .NET assemblies run from local network locations. <<

I don't get security exceptions because I give FullTrust (via a group policy pushed to a set of machines) to all assemblies signed with my strong name.

Re debug versus release executables, I always use a custom debug build (GenerateTrackingInfo=1 and AllowOptimize=1). Then I use an .ini file (how quaint) to tell the JIT compiler whether or not to optimise the native code.
http://msdn2.microsoft.com/en-us/library/9dd8z24x(VS.71).aspx

This technique is very useful when you need to debug issues that only appear in production.
Mark Pearce Send private email
Wednesday, January 17, 2007
 
 
Hmmm - forum mangled that link. Here's a better one:
http://tinyurl.com/2zbml6
Mark Pearce Send private email
Wednesday, January 17, 2007
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz