Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

ClickOnce .Exe runs briefly, then disappears

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ivan.no.spam@gmail.com - 26 Jan 2006 17:04 GMT
My network-drive deployed Clickonce application worked for a while when
deployed onto the machine on which it was developed (it still works
fine on other machines). Now, when run (on the development machine),
the .exe instantiates briefly (I can see it in the task manager process
list), then just disappears (i.e. no longer in the task manager process
list) - no exceptions are raised. The bizarre thing is that if I copy
the entire name-mangled application folder (c:\document and
settings\...\local settings\Apps\2.0\... ) from its deployment
destination, and paste it somewhere else on the hard drive (c:\temp,
for example), the .exe works fine. The application is designated as a
full trust application (My Project -> Security), and I successfully
execute

Dim p As New
System.Security.PermissionSet(Security.Permissions.PermissionState.Unrestricted)
p.Demand()

early on in the code, so it doesn't appear to be a security issue. Any
ideas?
Naveen - 26 Jan 2006 18:50 GMT
If it is a partially trusted click once application it wont be visible
in the task manager. But you will see a process called Applaunch.exe,
which acts as a shim for the click once application.

You can read more about this here

http://blogs.msdn.com/shawnfa/archive/2005/11/30/498610.aspx
Nicole Calinoiu - 28 Jan 2006 12:39 GMT
Depending on how where you're executing your unrestricted permission demand,
you may not actually be testing whether your application is fully trusted.
When Demand is called for a standard CAS permission, the stack frame in
which the method is called is not evaluated for the demanded permission.
(i.e.: The method from which you call Demand gets skipped over.)  If you're
making the demand from your application's Main method, there won't be any
stack frame evaluated from your application's assembly, and the demand will
pass even if your assembly is not granted unrestricted permissions.  To
ensure that at least one method from your assembly is included in the
demand, simply move the Demand call into another method that can be called
from your Main method.  e.g.:

Sub Main()

     DemandFullTrust()
     '...

End Sub

Private Sub DemandFullTrust()

     Dim p As New
System.Security.PermissionSet(Security.Permissions.PermissionState.Unrestricted)
     p.Demand()

End Sub

> My network-drive deployed Clickonce application worked for a while when
> deployed onto the machine on which it was developed (it still works
[quoted text clipped - 15 lines]
> early on in the code, so it doesn't appear to be a security issue. Any
> ideas?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.