none
WCF SERVICE ON REMOTE WEBSITE Error: Could not load type System.Security.Permissions.StorePermission from assembly...

    Question

  • Hello,
    like to receive more information about this error message I get when I try to launch a service WCF that will use a website with Silverlight. WCF that will use a website with Silverlight.

    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    Could not load type 'System.Security.Permissions.StorePermission ' from assembly 'System, Version=2.0.0.0, Culture=neutral,

    PublicKeyToken=b77a5c561934e089'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace

    for more information about the error and where it originated in the code.

    Exception Details: System.TypeLoadException: Could not load type 'System.Security.Permissions.StorePermission ' from

    assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and

    location of the exception can be identified using the exception stack trace below. 

    Stack Trace:


    [TypeLoadException: Could not load type 'System.Security.Permissions.StorePermission ' from assembly 'System,

    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.]
       System.ServiceModel.AsyncResult.End(IAsyncResult result) +11531006
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +194
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean

    flowContext) +176
       System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +23
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082

    The service called 'customerservice.svc' resides in the main folder of my website that is approved for Framework 3.5.
    In localhost I can run the service; on a remote website no. Why? You can I be helpful?
    Thank you very much.

    Thursday, February 19, 2009 9:32 AM

Answers

All replies

  • Sounds like your web service is running in 2.0 mode? That StorePermission class should be in the system.dll, so it is either a permission error or you have the wrong version of system.dll on the server. You might try the WCF forums for better luck.

    Thursday, February 19, 2009 10:36 AM
  • yes, I think that we servizion run in 2.0 mode because at the end if errore ther is:

    " Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082 "

    But I have completed version 3.5 of the framework.

    Who can help me?

    Friday, February 20, 2009 4:02 AM
  • Probably find out more in the ASP.Net forums. I think 2.0.50727.3082 is the right runtime for .NET 3.5. So probably more likely a permissions error.

    Friday, February 20, 2009 2:36 PM