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 / Remoting / April 2006

Tip: Looking for answers? Try searching our database.

Webservice call to Remoting Singleton

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill Strong - 20 Apr 2006 14:36 GMT
I am designing a system that uses an ASP.NET webservice to call methods on a
remoting singleton (I need the singleton to keep alive some specific COM
instances as the COM components exist and the budget to migrate them
doesn't).

I believe I either have an architecture problem or a configuration problem.
I can make one call with the webservice but any subsequent calls return a
remoting exception saying:

"Attempt to redirect activation of type 'A.S, A' which is already redirected"

I am using a configuration file and calling
RemotingConfiguration.Configure(web.config) either in the webservice
constructor or in the particular method being called prior to calling the
singleton method. I assume there is something wrong with this approach but
can find no reference on how to setup the remoting connection in this
situation. Is there another way I should be using to get the remoting system
up and running? I've been assuming that the webservice is starting fresh with
each call but apparently that is not the case.

Any help would be most appreciated.

Thanks,
Bill Strong
David C - 21 Apr 2006 02:03 GMT
Hi Bill,

Initialise the remoting configuration in the Application_Start method in the
global.asax rather than in every method call.

DC

> I am designing a system that uses an ASP.NET webservice to call methods on a
> remoting singleton (I need the singleton to keep alive some specific COM
[quoted text clipped - 20 lines]
> Thanks,
> Bill Strong
Bill Strong - 21 Apr 2006 14:05 GMT
Hi David,

Great! I added a Global.asmx file to my project, added the following
directive to the top of the file:

<%@ Import Namespace="System.Runtime.Remoting" %>

and called RemotingConfiguration.Configure(webconfig_path & filename) in the
Application_Start subroutine and it seems to work fine.

A workaround I came up with prior to receiving your reply was to check
ChannelServices.RegisteredChannels.Length < 1 in the Sub New() and if true,
call RemotingConfig. Your suggestion of course is much better.

Thanks again,
Bill

> Hi Bill,
>
[quoted text clipped - 27 lines]
> > Thanks,
> > Bill Strong

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.