[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.remoting

I suck at config files - plz help

TIBM

6/10/2004 4:48:00 PM

Hello. I used remoting as the distributed system in a 3-tier architecture; I actually used the factory pattern and things are looking good.
However, I didn't fancy config files in the beginning and now it's come back to haunt me.
So, basically, I just need to ask a very basic question about how to use config files for my application.

In my Global.asax.vb, all I have is (for a singleton factory remote object):
Dim memFactory As IMemberFactory
memFactory = CType(Activator.GetObject( _
GetType(IMemberFactory), _
"tcp://192.168.40.40:9000/MemberFactory.rem"), _
IMemberFactory)
What do I need to put in my webconfig file? What am I going to have in the global.asax.vb file?

In my server console host, I have:
Dim channel As New TcpChannel(9000)
ChannelServices.RegisterChannel(channel)
RemotingConfiguration.RegisterWellKnownServiceType( _
GetType(Member), _
"MemberFactory.rem", _
WellKnownObjectMode.Singleton)
What should I have into a config file, and how should I call those settings?

What I find weird about config files is that they define settings which is ok, but how do they solve assignment (eh memFactory = CType...)?!

Thanks in advance.
TIBM
6 Answers

Sooraj PM

6/13/2004 5:41:00 AM

0

Hi

The client activated type example:

The web.config content:
<system.runtime.remoting>
<application name = "NameOfApplication">
<client url = "tcp://localhost:12345">
<activated type ="NameSpace.Class,Class"/>
</client>
<channels>
<channel ref = "Tcp"/>
</channels>
</application>
</system.runtime.remoting>

The Code:

Dim CustObject As NameSpace.Class
Dim CustomerMessage As String
RemotingConfiguration.Configure(name of config file)
CustObject = Activator.CreateInstance(GetType(NameSpace.Class))


Sooraj PM
Micorosft India Community Star


"TIBM" wrote:

> Hello. I used remoting as the distributed system in a 3-tier architecture; I actually used the factory pattern and things are looking good.
> However, I didn''t fancy config files in the beginning and now it''s come back to haunt me.
> So, basically, I just need to ask a very basic question about how to use config files for my application.
>
> In my Global.asax.vb, all I have is (for a singleton factory remote object):
> Dim memFactory As IMemberFactory
> memFactory = CType(Activator.GetObject( _
> GetType(IMemberFactory), _
> "tcp://192.168.40.40:9000/MemberFactory.rem"), _
> IMemberFactory)
> What do I need to put in my webconfig file? What am I going to have in the global.asax.vb file?
>
> In my server console host, I have:
> Dim channel As New TcpChannel(9000)
> ChannelServices.RegisterChannel(channel)
> RemotingConfiguration.RegisterWellKnownServiceType( _
> GetType(Member), _
> "MemberFactory.rem", _
> WellKnownObjectMode.Singleton)
> What should I have into a config file, and how should I call those settings?
>
> What I find weird about config files is that they define settings which is ok, but how do they solve assignment (eh memFactory = CType...)?!
>
> Thanks in advance.
> TIBM

grue

6/16/2007 8:30:00 AM

0

On Fri, 15 Jun 2007 11:29:33 +0200, =?ISO-8859-1?Q?Bj=F6rn_Ritzl?=
<nospam@nospam.org> tried to confuse everyone with this message:

>Slash wrote:
>> I cant really express how much hatred do spambots bring me... they
>> steal our work, annoy infinitely exploration over our websites and all
>> things we make for pure fun and love are their target to attain a
>> commercial advantage. They are a pest, and I wish the worse for all
>> the people behind this kind of marketing *
>>
>> Sorry for the rambling, I felt I had to say it.
>>
>> Roguebasin is currently under attack again, and we definitively need
>> to take steps toward preventing this kind of events... I know Bjorn
>> must be pretty busy as usual , but for now I suggest locking public
>> edition until we can implement spambot protection; this is just
>> crappy...
>
>Ok, RogueBasin is finally updated to the latest version (1.6.10) that
>can run PHP4. Account creation and anonymous edits are still disallowed
>though. I'd like to try out the new MediaWiki version before allowing
>account creation (w. captcha) again.
>

Looks like anons are still messing things up. Also, the logo is missing...

--
|Don't believe this - you're not worthless ,gr---------.ru
|It's us against millions and we can't take them all... | ue il |
|But we can take them on! | @ma |
| (A Wilhelm Scream - The Rip) |______________|

Pedro Martins

6/18/2007 6:28:00 AM

0

Timofei Shatrov wrote:
> On Fri, 15 Jun 2007 11:29:33 +0200, =?ISO-8859-1?Q?Bj=F6rn_Ritzl?=
> <nospam@nospam.org> tried to confuse everyone with this message:
>
>> Slash wrote:
>>> I cant really express how much hatred do spambots bring me... they
>>> steal our work, annoy infinitely exploration over our websites and all
>>> things we make for pure fun and love are their target to attain a
>>> commercial advantage. They are a pest, and I wish the worse for all
>>> the people behind this kind of marketing *
>>>
>>> Sorry for the rambling, I felt I had to say it.
>>>
>>> Roguebasin is currently under attack again, and we definitively need
>>> to take steps toward preventing this kind of events... I know Bjorn
>>> must be pretty busy as usual , but for now I suggest locking public
>>> edition until we can implement spambot protection; this is just
>>> crappy...
>> Ok, RogueBasin is finally updated to the latest version (1.6.10) that
>> can run PHP4. Account creation and anonymous edits are still disallowed
>> though. I'd like to try out the new MediaWiki version before allowing
>> account creation (w. captcha) again.
>>
>
> Looks like anons are still messing things up. Also, the logo is missing...
>

Umm, yes, strange... *Now* it should work

/Bj?rn

Pedro Martins

6/18/2007 7:04:00 AM

0

Timofei Shatrov wrote:
> On Fri, 15 Jun 2007 11:29:33 +0200, =?ISO-8859-1?Q?Bj=F6rn_Ritzl?=
> <nospam@nospam.org> tried to confuse everyone with this message:
>
>> Slash wrote:
>>> I cant really express how much hatred do spambots bring me... they
>>> steal our work, annoy infinitely exploration over our websites and all
>>> things we make for pure fun and love are their target to attain a
>>> commercial advantage. They are a pest, and I wish the worse for all
>>> the people behind this kind of marketing *
>>>
>>> Sorry for the rambling, I felt I had to say it.
>>>
>>> Roguebasin is currently under attack again, and we definitively need
>>> to take steps toward preventing this kind of events... I know Bjorn
>>> must be pretty busy as usual , but for now I suggest locking public
>>> edition until we can implement spambot protection; this is just
>>> crappy...
>> Ok, RogueBasin is finally updated to the latest version (1.6.10) that
>> can run PHP4. Account creation and anonymous edits are still disallowed
>> though. I'd like to try out the new MediaWiki version before allowing
>> account creation (w. captcha) again.
>>
>
> Looks like anons are still messing things up. Also, the logo is missing...
>

Oh, yeah, I've lost the logo I'm afraid. Anyone have it available or
should we run a new competition? :-)

/Bj?rn

psmithnews

6/18/2007 10:50:00 AM

0

Bj?rn Ritzl <nospam@nospam.org> writes:
> Timofei Shatrov wrote:
>> Also, the logo is missing...
>
> Oh, yeah, I've lost the logo I'm afraid. Anyone have it available or
> should we run a new competition? :-)

Wikihack pinched a copy:

http://nethack.wikia.com/wiki/Image:RogueBasi...

--
: Dylan O'Donnell http://www.spod-central.or... :
: "The sun has gone. It must be brought. You have a rock." :
: -- Dan Schmidt, "For a Change" :

Pedro Martins

6/18/2007 1:36:00 PM

0

Dylan O'Donnell wrote:
> Bj?rn Ritzl <nospam@nospam.org> writes:
>> Timofei Shatrov wrote:
>>> Also, the logo is missing...
>> Oh, yeah, I've lost the logo I'm afraid. Anyone have it available or
>> should we run a new competition? :-)
>
> Wikihack pinched a copy:
>
> http://nethack.wikia.com/wiki/Image:RogueBasi...
>

Thanks. The logo is back on the site now!

/Bj?rn