WCF Error

WCF Error

Old forum URL: forums.lhotka.net/forums/t/5649.aspx

bgilbert posted on Wednesday, October 22, 2008

I'm trying to set up a service host on a server. I got the website to run on my local machine, but cannot seem to get the authentication piece when moving it to a remote server. I can call up the service in a browser and get the default page without a login. However, when I try to get to it from within my ClickOnce project, I get the error "That assembly does not allow partially trusted callers". My UI project is marked as full trust, however. I've tried both wsHttpBinding and basicHttpBinding. I'm stumped!

Using CSLA 3.5.2, VS 2008, Win2003 Server.

bgilbert replied on Thursday, October 23, 2008

I'm on the verge of giving up. Anyone have any thoughts on this?

¡ǝɯ ƃuıʃʃıʞ sı ɟɔʍ

RockfordLhotka replied on Thursday, October 23, 2008

The exception you are getting is a Code Access Security exception. CAS is blocking some partially trusted assembly from calling a different assembly that requires fulltrust.

Almost certainly this is occurring entirely on the client - before any attempt is being made to go across the network.

OR it could be occurring after the call has gone across the network, and some assembly on the web server is not happy running in partial trust.

You say your client is fulltrust, so perhaps the exception is on the server? Is the web site running in fulltrust?

Is this with the data portal? I ask, because the data portal carries server-side exceptions back to the client - so you have to look closely at the full stack trace of the exception to determine if the exception occurs on the client or the server.

bgilbert replied on Friday, October 24, 2008


Thanks for your help. I got this to work.

As you suggested, I had to set the assemblies to full trust on the server. In order to do this, they needed to be added to the GAC on the server, which also required that they be strongly named.

Thanks for your suggestions.

Copyright (c) Marimer LLC