[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Can a remote object be a WebService as well?

Julia

9/6/2004 2:40:00 PM

Hi,

Can a Remote object be a WebService as well?
i want to able to connect to a remote object either using .NET remoting
and HTTP\SOAP

so I wonder if I can create a singleton(statefull) object hosted in IIS
which can be xml web service
,NET remoted object,singleton and support COM+ transaction management all in
the same time

The object should served single user


Thanks.

----------------------------------------------------------------------------
----------------------------------
My orginial post which didnt get answers in several news groups:
----------------------------------------------------------------------------
----------------------------------
I need help with architecture design,please:

I have a server which constantly downloading messages from the internet
and store them inside a data base.

the server have two administrators options:
one is a local windows application,and the second is a web application
The administrator can either delete messages,add new messages,and send
messages

i am new to .NET remoting,so here is my idea in general:


1.Create singleton MessagesServer remotable object which act as my server
and hosted by some exe application
2.For Windows admin application, just connect to the singleton object and
admin it
3.For the web admin application,using ASP,NET pages,connect to the
MessagesServer and admin it
(I cannot install .NET components on this machine so i must use server
side code?)


My questions are:


1.Can I create in .NET something similar to COM out proc server (activex
exe),which mean that when the admin application
will create the MessagesServer,than the exe which hosting MessagesServer
will start?

2.Assuming the window admin application is local to the MessagesServer,can
i just pack the MessagesServer object
into the window admin executbale,so it will be local to the window
application.,but remote for the web application?

3.When using Web application,what is the best way to access the data
base,should I do itusing the MessagesServer,for example
MessagesServer.GetMessages() as
ArrayList
or can I go directly to the data base(I guess I will have some
synchronization issues here!?)

4.Regarding locks,assuming i have one thread in the MessagesServer object
which access the data base,and than a request from the
Web application is arrived to write to the data base,can i control the
time in which the request will return to the web application?

5.can the MessagesServer object be a singleton,remotable(for windows
application),hosted by IIS,support transactions using COM+ and exposed as
WebService all at the same time?!?

6.Can you point me to some articles or examples which describe a similar
problem?

7.any books about services components in .Net(preferably in C#)?

The overall architecture is something similar to Exchange server/OWA i
guess.


Thanks.










2 Answers

Sam Santiago

9/6/2004 4:15:00 PM

0

You should be able to if you create a true singleton object that is also
exposed a remote object. If your web services is in the same App Domain as
your singleton object then is could use the object as a typical object.
Otherwise it could also use it as a remote object since the same instance
will be used by all clients. We had a discussion on singletons and
factories in this group a few weeks ago, so search the group for it or I
have some of the discussion here: http://www.SoftiTe.../d....
Also, this article might be helpful:

INFO: Configure .NET Remoting When the Remoting Client Is an ASP.NET
Application or the Client Is Another Remoted Component That Is Hosted by IIS
http://support.microsoft.com/default.aspx?scid=kb;en...

Thanks,

Sam
--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"Julia" <codewizard@012.net.il> wrote in message
news:uWP2Y9BlEHA.536@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> Can a Remote object be a WebService as well?
> i want to able to connect to a remote object either using .NET remoting
> and HTTP\SOAP
>
> so I wonder if I can create a singleton(statefull) object hosted in IIS
> which can be xml web service
> ,NET remoted object,singleton and support COM+ transaction management all
in
> the same time
>
> The object should served single user
>
>
> Thanks.
>
> --------------------------------------------------------------------------
--
> ----------------------------------
> My orginial post which didnt get answers in several news groups:
> --------------------------------------------------------------------------
--
> ----------------------------------
> I need help with architecture design,please:
>
> I have a server which constantly downloading messages from the internet
> and store them inside a data base.
>
> the server have two administrators options:
> one is a local windows application,and the second is a web application
> The administrator can either delete messages,add new messages,and send
> messages
>
> i am new to .NET remoting,so here is my idea in general:
>
>
> 1.Create singleton MessagesServer remotable object which act as my
server
> and hosted by some exe application
> 2.For Windows admin application, just connect to the singleton object and
> admin it
> 3.For the web admin application,using ASP,NET pages,connect to the
> MessagesServer and admin it
> (I cannot install .NET components on this machine so i must use server
> side code?)
>
>
> My questions are:
>
>
> 1.Can I create in .NET something similar to COM out proc server (activex
> exe),which mean that when the admin application
> will create the MessagesServer,than the exe which hosting
MessagesServer
> will start?
>
> 2.Assuming the window admin application is local to the
MessagesServer,can
> i just pack the MessagesServer object
> into the window admin executbale,so it will be local to the window
> application.,but remote for the web application?
>
> 3.When using Web application,what is the best way to access the data
> base,should I do itusing the MessagesServer,for example
> MessagesServer.GetMessages() as
> ArrayList
> or can I go directly to the data base(I guess I will have some
> synchronization issues here!?)
>
> 4.Regarding locks,assuming i have one thread in the MessagesServer object
> which access the data base,and than a request from the
> Web application is arrived to write to the data base,can i control the
> time in which the request will return to the web application?
>
> 5.can the MessagesServer object be a singleton,remotable(for windows
> application),hosted by IIS,support transactions using COM+ and exposed as
> WebService all at the same time?!?
>
> 6.Can you point me to some articles or examples which describe a similar
> problem?
>
> 7.any books about services components in .Net(preferably in C#)?
>
> The overall architecture is something similar to Exchange server/OWA i
> guess.
>
>
> Thanks.
>
>
>
>
>
>
>
>
>
>


Julia

9/7/2004 5:34:00 AM

0

Thanks.


"Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message
news:OAeDpyClEHA.1712@TK2MSFTNGP09.phx.gbl...
> You should be able to if you create a true singleton object that is also
> exposed a remote object. If your web services is in the same App Domain
as
> your singleton object then is could use the object as a typical object.
> Otherwise it could also use it as a remote object since the same instance
> will be used by all clients. We had a discussion on singletons and
> factories in this group a few weeks ago, so search the group for it or I
> have some of the discussion here:
http://www.SoftiTe.../d....
> Also, this article might be helpful:
>
> INFO: Configure .NET Remoting When the Remoting Client Is an ASP.NET
> Application or the Client Is Another Remoted Component That Is Hosted by
IIS
> http://support.microsoft.com/default.aspx?scid=kb;en...
>
> Thanks,
>
> Sam
> --
> _______________________________
> Sam Santiago
> ssantiago@n0spam-SoftiTechture.com
> http://www.SoftiTe...
> _______________________________
> "Julia" <codewizard@012.net.il> wrote in message
> news:uWP2Y9BlEHA.536@TK2MSFTNGP11.phx.gbl...
> > Hi,
> >
> > Can a Remote object be a WebService as well?
> > i want to able to connect to a remote object either using .NET remoting
> > and HTTP\SOAP
> >
> > so I wonder if I can create a singleton(statefull) object hosted in IIS
> > which can be xml web service
> > ,NET remoted object,singleton and support COM+ transaction management
all
> in
> > the same time
> >
> > The object should served single user
> >
> >
> > Thanks.
> >
>
> --------------------------------------------------------------------------
> --
> > ----------------------------------
> > My orginial post which didnt get answers in several news groups:
>
> --------------------------------------------------------------------------
> --
> > ----------------------------------
> > I need help with architecture design,please:
> >
> > I have a server which constantly downloading messages from the
internet
> > and store them inside a data base.
> >
> > the server have two administrators options:
> > one is a local windows application,and the second is a web application
> > The administrator can either delete messages,add new messages,and send
> > messages
> >
> > i am new to .NET remoting,so here is my idea in general:
> >
> >
> > 1.Create singleton MessagesServer remotable object which act as my
> server
> > and hosted by some exe application
> > 2.For Windows admin application, just connect to the singleton object
and
> > admin it
> > 3.For the web admin application,using ASP,NET pages,connect to the
> > MessagesServer and admin it
> > (I cannot install .NET components on this machine so i must use
server
> > side code?)
> >
> >
> > My questions are:
> >
> >
> > 1.Can I create in .NET something similar to COM out proc server (activex
> > exe),which mean that when the admin application
> > will create the MessagesServer,than the exe which hosting
> MessagesServer
> > will start?
> >
> > 2.Assuming the window admin application is local to the
> MessagesServer,can
> > i just pack the MessagesServer object
> > into the window admin executbale,so it will be local to the window
> > application.,but remote for the web application?
> >
> > 3.When using Web application,what is the best way to access the data
> > base,should I do itusing the MessagesServer,for example
> > MessagesServer.GetMessages() as
> > ArrayList
> > or can I go directly to the data base(I guess I will have some
> > synchronization issues here!?)
> >
> > 4.Regarding locks,assuming i have one thread in the MessagesServer
object
> > which access the data base,and than a request from the
> > Web application is arrived to write to the data base,can i control the
> > time in which the request will return to the web application?
> >
> > 5.can the MessagesServer object be a singleton,remotable(for windows
> > application),hosted by IIS,support transactions using COM+ and exposed
as
> > WebService all at the same time?!?
> >
> > 6.Can you point me to some articles or examples which describe a similar
> > problem?
> >
> > 7.any books about services components in .Net(preferably in C#)?
> >
> > The overall architecture is something similar to Exchange server/OWA i
> > guess.
> >
> >
> > Thanks.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
>