Re: Error with Remoting Events in ASP.NET application: Type Initializer error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Does the exception have any inner exceptions?

<RobbieGotNeeds@xxxxxxxxxxxx> wrote in message
news:1112627321.155174.123730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I have a Windows service that checks the availability of something.
> I use remoting to publish events, and I've gotten multiple
> Windows forms applications to subscribe to these events.
>
> Now, I want my ASP.NET web application to subscribe to these
> events as well. In my ASP.NET application I have a static
> class constructor which basically sets up stuff for the app to
> run OK. Now, I copied the same code from my Windows forms
> clients to the static class constructor of my ASP.NET app, and
> I added the event methods. I made these static too since these
> will be available to all instances. The code compiled OK,
> and the ASP.NET app loads without error. However, when my
> Windows service fires an event, the Windows service program traps an
> error:
>
> The type initializer for "..." threw an exception.
>
> It seems that my Windows service program (the server that hosts the
> remoting object) knows about the ASP.NET application events that are
> subscribed to it, but somehow is choking on them with the above error.
> (It returns the same error everytime the event fires.) Why is this?
> The only difference between my test Windows Forms client
> and my ASP.NET client is that I connect to my remoting object in the
> static
> class constructor and my event metods are also staic.
>
> Am I missing something fundamental here? Any ideas?
>


.



Relevant Pages

  • Re: Remoting or windows service
    ... the client and the server. ... Does vs.net provide a way to work with the client end and the ... BTW your rundown on the differences between remoting and services was ... > user (which means that a Windows service can run even if there is no user ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Remoting Problem
    ... I tried a very simple remoting solution in which I am just throwing an ... exception from the remote object for example: ... But my another Windows service, which is unfortunately in production is ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Displaying a popup from a windows service using .NET remoting
    ... A Windows Service that acts as a remoting server. ... A client UI piece that launches with each login (i.e. in the same ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: System.ServiceModel.Security.SecurityNegotiationException
    ... Thought I have added Authentication to PeerOrChainTrust as follows at client: ... The error message does indicate that the "identity" of the endpoint hasn't ... I've also replied you in another WCF windows service hosted thread. ... But it is still throwing the same exception. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Remoting a Windows Service Application
    ... the best configuration for remoting is using a Windows Service ... The web service just as remoting are available all the time (if you have IIS ... so you must use .NET as client too. ...
    (microsoft.public.dotnet.languages.vb)