[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.remoting

Client without config file

laughridge

6/29/2004 9:01:00 PM

Hello,
I have created an remoting application which worked quite well until I
realized that I needed to secure my network transmission someway. To
do this I created a custom sink which encryts and decrypts the message
for transmission. I have used a config file for the server portion but
I would like to stay away from a config file on the client end.
Currently here is the code which is in my server config file:

<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="http" port="1235">
<serverProviders>
<provider
type="CustomSinks.CustomServerSinkProvider, CustomSinks"
customSinkType="LameEncryption.LameEncryptionServerSink,
SampleSinks" />
<formatter ref="soap" />
</serverProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>

As you can see it calls the custom sink of
Lameencryption.lameencryptionserversink, sample sinks to do the
encryption. Now on my client I currently have this code to start the
remoting:

httpportval = 1234
HttpString = "http://" & httpName & ":" & Httpportval &
"/4micros.soap"

Dim mgr As IMicrosManager =
CType(Activator.GetObject(GetType(IMicrosManager), HttpString),
IMicrosManager)


So I would assume that I need to change something here in the client
which would tell the program how to use the custom sink. I have the
book "Advanced .NET Remoting in VB .NET" if you want to refer to a
page number, otherwise, I would love some assistance. Thanks!

Kevin
5 Answers

Richard Bell

6/30/2004 1:01:00 PM

0

Ingo Rammer''s (excellent) book has a good section on this which should help
you. Just out of interest, did you consider using SSL via IIS?

"Kevin Laughridge" <laughridge@teeitup.com> wrote in message
news:27ddb237.0406291301.7c807ad2@posting.google.com...
> Hello,
> I have created an remoting application which worked quite well until I
> realized that I needed to secure my network transmission someway. To
> do this I created a custom sink which encryts and decrypts the message
> for transmission. I have used a config file for the server portion but
> I would like to stay away from a config file on the client end.
> Currently here is the code which is in my server config file:
>
> <configuration>
> <system.runtime.remoting>
> <application>
> <channels>
> <channel ref="http" port="1235">
> <serverProviders>
> <provider
> type="CustomSinks.CustomServerSinkProvider, CustomSinks"
> customSinkType="LameEncryption.LameEncryptionServerSink,
> SampleSinks" />
> <formatter ref="soap" />
> </serverProviders>
> </channel>
> </channels>
> </application>
> </system.runtime.remoting>
> </configuration>
>
> As you can see it calls the custom sink of
> Lameencryption.lameencryptionserversink, sample sinks to do the
> encryption. Now on my client I currently have this code to start the
> remoting:
>
> httpportval = 1234
> HttpString = "http://" & httpName & ":" & Httpportval &
> "/4micros.soap"
>
> Dim mgr As IMicrosManager =
> CType(Activator.GetObject(GetType(IMicrosManager), HttpString),
> IMicrosManager)
>
>
> So I would assume that I need to change something here in the client
> which would tell the program how to use the custom sink. I have the
> book "Advanced .NET Remoting in VB .NET" if you want to refer to a
> page number, otherwise, I would love some assistance. Thanks!
>
> Kevin


Kevin

6/30/2004 2:17:00 PM

0

I will not have IIS on the machines running this program so I cannot go
that route and I would like to avoid using a config file so that no
person can change the config file to get around the security. Any other
ideas? Thanks!

*** Sent via Devdex http://www.... ***
Don''t just participate in USENET...get rewarded for it!

Sunny

6/30/2004 2:48:00 PM

0

Hi,

a little out of topic, but it seems that with the current framework
there are some problems with using config files. Maybe you should
consider using programmatic configuration.

Take a look at this article:

http://www.genuinechannels.com/Content.aspx?id=88&...

Sunny


In article <27ddb237.0406291301.7c807ad2@posting.google.com>,
laughridge@teeitup.com says...
> Hello,
> I have created an remoting application which worked quite well until I
> realized that I needed to secure my network transmission someway. To
> do this I created a custom sink which encryts and decrypts the message
> for transmission. I have used a config file for the server portion but
> I would like to stay away from a config file on the client end.
> Currently here is the code which is in my server config file:
>
> <configuration>
> <system.runtime.remoting>
> <application>
> <channels>
> <channel ref="http" port="1235">
> <serverProviders>
> <provider
> type="CustomSinks.CustomServerSinkProvider, CustomSinks"
> customSinkType="LameEncryption.LameEncryptionServerSink,
> SampleSinks" />
> <formatter ref="soap" />
> </serverProviders>
> </channel>
> </channels>
> </application>
> </system.runtime.remoting>
> </configuration>
>
> As you can see it calls the custom sink of
> Lameencryption.lameencryptionserversink, sample sinks to do the
> encryption. Now on my client I currently have this code to start the
> remoting:
>
> httpportval = 1234
> HttpString = "http://" & httpName & ":" & Httpportval &
> "/4micros.soap"
>
> Dim mgr As IMicrosManager =
> CType(Activator.GetObject(GetType(IMicrosManager), HttpString),
> IMicrosManager)
>
>
> So I would assume that I need to change something here in the client
> which would tell the program how to use the custom sink. I have the
> book "Advanced .NET Remoting in VB .NET" if you want to refer to a
> page number, otherwise, I would love some assistance. Thanks!
>
> Kevin
>

Allen Anderson

6/30/2004 4:33:00 PM

0

check out some examples on how to do this without using config files
here.

http://www.glacialcomp.../ArticleDetail.aspx?articleID=Re...

Allen Anderson
http://www.glacialcomp...
mailto: allen@put my website base here.com

On 29 Jun 2004 14:01:04 -0700, laughridge@teeitup.com (Kevin
Laughridge) wrote:

>Hello,
>I have created an remoting application which worked quite well until I
>realized that I needed to secure my network transmission someway. To
>do this I created a custom sink which encryts and decrypts the message
>for transmission. I have used a config file for the server portion but
>I would like to stay away from a config file on the client end.
>Currently here is the code which is in my server config file:
>
><configuration>
> <system.runtime.remoting>
> <application>
> <channels>
> <channel ref="http" port="1235">
> <serverProviders>
> <provider
> type="CustomSinks.CustomServerSinkProvider, CustomSinks"
> customSinkType="LameEncryption.LameEncryptionServerSink,
>SampleSinks" />
> <formatter ref="soap" />
> </serverProviders>
> </channel>
> </channels>
> </application>
> </system.runtime.remoting>
></configuration>
>
>As you can see it calls the custom sink of
>Lameencryption.lameencryptionserversink, sample sinks to do the
>encryption. Now on my client I currently have this code to start the
>remoting:
>
>httpportval = 1234
>HttpString = "http://" & httpName & ":" & Httpportval &
>"/4micros.soap"
>
>Dim mgr As IMicrosManager =
>CType(Activator.GetObject(GetType(IMicrosManager), HttpString),
>IMicrosManager)
>
>
>So I would assume that I need to change something here in the client
>which would tell the program how to use the custom sink. I have the
>book "Advanced .NET Remoting in VB .NET" if you want to refer to a
>page number, otherwise, I would love some assistance. Thanks!
>
>Kevin

Kevin

7/1/2004 3:07:00 PM

0


Thanks for the help, It close but not exaclty. In your example it shows
how to use an interface to create the client object which is what I have
done. Now I just need to programmincly state how the custom sink chain
should work and be used. I have it working in a config file for the
server but I would like the client side to be hard coded. Thanks again
for the help, any other ideas?

Kevin



*** Sent via Devdex http://www.... ***
Don''t just participate in USENET...get rewarded for it!