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 / ASP.NET / Web Services / February 2005

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
OfurGørn - 28 Jan 2005 14:11 GMT
...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
Kevin Yu [MSFT] - 01 Feb 2005 02:28 GMT
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
Signature

=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


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.