[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.dotnet.framework.remoting

Remoting from a user control hosted in IE

mfeingold

10/20/2004 1:19:00 PM

I have a control which uses .net remoting to access some server. It works
just fine. Now I need to host this control in an html page in IE. I gave the
control full trust through the .Net configuration tool, but it still does not
work. The Remoting infrastructure is initialized, but an attempt to create a
remoted object fails with an exception "permission denied'.
Any thoughts?
6 Answers

Sam Santiago

10/20/2004 3:35:00 PM

0

I have never tried it, but have you seen this link:

Configuring Internet Explorer Applications
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconfiguringieapplic...

Thanks,

Sam
--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"mfeingold" <mfeingold@discussions.microsoft.com> wrote in message
news:5F6E68B3-2CFF-4231-A012-40316A80DC31@microsoft.com...
> I have a control which uses .net remoting to access some server. It works
> just fine. Now I need to host this control in an html page in IE. I gave
the
> control full trust through the .Net configuration tool, but it still does
not
> work. The Remoting infrastructure is initialized, but an attempt to create
a
> remoted object fails with an exception "permission denied'.
> Any thoughts?


mfeingold

10/20/2004 4:47:00 PM

0


"Sam Santiago" wrote:

> I have never tried it, but have you seen this link:
>
> Configuring Internet Explorer Applications
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconfiguringieapplic...
>

This particular one - no. But I am doing the same thing. Not in these words,
but.... And the configuration files from this article do not seem to have
anything specific for running from IE. As I mentioned the remoting itself
works when ran from a windows app.
I suspect that's because the article is old and refers to .net 1.0. In 1.1
MS tightened security right before the 1.1 release, which involves in
particular some additional security related things to be done when running
code from IE.
I went through this for file access on the local computer, but remoting
threw me off again.
Thank you for the link anyway

mfeingold

10/21/2004 4:24:00 PM

0

I made some progress: After asserting some permissoins I can connect from the
control to the server. The callback connection still does not work

"mfeingold" wrote:

> I have a control which uses .net remoting to access some server. It works
> just fine. Now I need to host this control in an html page in IE. I gave the
> control full trust through the .Net configuration tool, but it still does not
> work. The Remoting infrastructure is initialized, but an attempt to create a
> remoted object fails with an exception "permission denied'.
> Any thoughts?

Sam Santiago

10/21/2004 9:12:00 PM

0

Great. Can you share the permission you changed?

Thanks,

Sam

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"mfeingold" <mfeingold@discussions.microsoft.com> wrote in message
news:6FA94ABD-8400-4DC7-ABC8-FFBC5AE9979A@microsoft.com...
> I made some progress: After asserting some permissoins I can connect from
the
> control to the server. The callback connection still does not work
>
> "mfeingold" wrote:
>
> > I have a control which uses .net remoting to access some server. It
works
> > just fine. Now I need to host this control in an html page in IE. I gave
the
> > control full trust through the .Net configuration tool, but it still
does not
> > work. The Remoting infrastructure is initialized, but an attempt to
create a
> > remoted object fails with an exception "permission denied'.
> > Any thoughts?


mfeingold

10/21/2004 10:49:00 PM

0

Most certainly.
You need:
1) SecurityPermission(SecurityPermissionFlag.RemotingConfiguration) to
configure the remoting,
2) SocketPermission(NetworkAccess.Connect, TransportType.Tcp, server.Host,
server.Port) to connect to the tcp port
3) SecurityPermission(SecurityPermissionFlag.SerializationFormatter) to be
able to serialize.
You also need to apply the AllowPartiallyTrustedCaller attribute to the
assembly.

With all of this done it allowed me to connect one way. And yet another
problem - when creating the remote object IE sits there with blind screen for
20 sec or so
obviuosly waiting for somethnig to time-out, but than it wakes up and seems
to work fine.

To be honest with you as much as I admire .net remoting I am ready to give
up and replace it with plain old style socket code.

Sam Santiago

10/22/2004 12:44:00 AM

0

I think your main difficulty is in using IE as a client for remoting. When
using a standard client or from the server side in a web application it's
not quite as much trouble.

Thanks,

Sam

--
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTe...
_______________________________
"mfeingold" <mfeingold@discussions.microsoft.com> wrote in message
news:86B78983-D64D-4F8B-8B8F-57D062B0266E@microsoft.com...
> Most certainly.
> You need:
> 1) SecurityPermission(SecurityPermissionFlag.RemotingConfiguration) to
> configure the remoting,
> 2) SocketPermission(NetworkAccess.Connect, TransportType.Tcp, server.Host,
> server.Port) to connect to the tcp port
> 3) SecurityPermission(SecurityPermissionFlag.SerializationFormatter) to be
> able to serialize.
> You also need to apply the AllowPartiallyTrustedCaller attribute to the
> assembly.
>
> With all of this done it allowed me to connect one way. And yet another
> problem - when creating the remote object IE sits there with blind screen
for
> 20 sec or so
> obviuosly waiting for somethnig to time-out, but than it wakes up and
seems
> to work fine.
>
> To be honest with you as much as I admire .net remoting I am ready to give
> up and replace it with plain old style socket code.