Marshal.GetActiveObject throws an exception in a C# webservice but

Discussion in 'ASP .Net Web Services' started by OfurGørn, Jan 28, 2005.

  1. OfurGørn

    OfurGørn Guest

    ....it does not throw the exception in a C# form. The same code works
    perfectly in C# forms application. It seems like the computer noes not let
    ASPNET get into the ROT, where the object I want is. I have experienced with
    changing users, impersonating and so on, but with no luck.
    I test which user I am before the faulty code, with

    WindowsIdentity.GetCurrent().Name

    where I was the user ASPNET when I started, but now I am "myself" who,
    incidentally am running the process I am trying to reach.

    the exceptions are:
    "System.NullReferenceException: Object reference not set to an instance of
    an object", when I run a method from the object I am trying to load.
    "System.Runtime.InteropServices.COMException (0x800401E3): Operation
    unavailable at System.Runtime.InteropServices.Marshal.GetActiveObject(Guid&
    rclsid, UInt32 reserved, Object& ppunk) at
    System.Runtime.InteropServices.Marshal.GetActiveObject(String progID)", when
    I try to access the external object itself with Marshal.GetActiveObject()

    Like I typed before, exactly the same code works in the windows forms
    version of C#, but with the web service this seems impossible.

    This error is driving me mad !!! I have been trying to fix this but am
    afraid that I've become so frustrated that I cannot see the solution now -
    typically a simple solution....

    ________________________
    Gunnar Gudmundsson
     
    OfurGørn, Jan 28, 2005
    #1
    1. Advertisements

  2. Hi Gunnar,

    Thanks for your posting. Regarding on this issue, I've found another
    duplicated thread in this group and some other community members and I have
    posted reply there. I'd appreciate if you have a look there. In addition,
    if you feel convenient that we continue to discuss in that thread, please
    feel free to post there.

    Kevin Yu
    =======
    "This posting is provided "AS IS" with no warranties, and confers no
    rights."
     
    Kevin Yu [MSFT], Feb 1, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob Dob
    Replies:
    4
    Views:
    6,443
    Rob Dob
    Mar 30, 2006
  2. Chris Miller
    Replies:
    4
    Views:
    14,567
    Chris Smith
    Nov 22, 2003
  3. Martin Bradley

    RMI Marshal exception & ArrayList

    Martin Bradley, Jan 14, 2006, in forum: Java
    Replies:
    3
    Views:
    2,219
    Raymond DeCampo
    Jan 15, 2006
  4. David Nicolson

    win32com.client.GetActiveObject()

    David Nicolson, Sep 19, 2005, in forum: Python
    Replies:
    1
    Views:
    769
    Roger Upole
    Sep 19, 2005
  5. Replies:
    2
    Views:
    468
  6. Replies:
    10
    Views:
    763
    Aaron Watters
    Jun 18, 2008
  7. OfurGørn
    Replies:
    28
    Views:
    1,237
    [MSFT]
    Feb 17, 2005
  8. Michael Davis

    Ruby 1.8 and Marshal.load/Marshal.dump

    Michael Davis, Oct 10, 2003, in forum: Ruby
    Replies:
    0
    Views:
    295
    Michael Davis
    Oct 10, 2003
Loading...