Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. Vista and .NET Application running on a shared network

Vista and .NET Application running on a shared network

Scheduled Pinned Locked Moved Windows API
questioncsharpdatabasedotnetsysadmin
1 Posts 1 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    EMSDeveloper
    wrote on last edited by
    #1

    I have a .NET (2.0) application that is on a shared network. I have used caspol (Microsoft .NET Framework 2.0 Configuration) to grant FullTrust permission to the application. When I execute the application on Windows XP it works fine. If I run in on Vista I get the following error: The description for Event ID 1000 from source Application Error cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: EMS.exe 34.0.131.0 463909e3 KERNEL32.dll 6.0.6000.16386 4549d328 e0434f4d 00000000000233ac The substitution string for insert index (%1) could not be found After stepping through the code and creating a test windows app I found that this line is causing problems: AddHandler Application.ThreadException, AddressOf eh.OnThreadException What is Vista doing differently and why would this line cause my application to fail? Here's the full code for a simple windows app that will fail: Imports System.Threading Public Class Main Public Shared Sub Main() Application.EnableVisualStyles() Dim eh As New CustomExceptionHandler AddHandler Application.ThreadException, AddressOf eh.OnThreadException 'If you remove this line the app will run on Vista Dim frm As New Form1 frm.ShowDialog() End Sub Private Class CustomExceptionHandler 'To Handle Application.ThreadExceptions Public Sub OnThreadException(ByVal sender As Object, ByVal t As ThreadExceptionEventArgs) ErrorHandler(t.Exception) End Sub End Class Public Shared Sub ErrorHandler(ByVal ex As Exception) 'Error Handler code here End Sub End Class Thanks, Sean

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups