locked
Issue publishing LS 2013 Application after upgrade RRS feed

  • Question

  • I recently upgraded a project from LS 2012 to LS 2013. It runs fine in debug mode and when I publish locally to an IIS virtual directory, it also runs fine. However, when I publish to another server, I get the error below. This is a Silverlight version running in the browser.  I have also tried copying the files that work fine in a local IIS virtual directory to the server and changing the connection strings, same result.

    I see this error when I browse to the /ApplicationData.svc since the app will not load.

    Server Error in '/Nomad' Application.

    The type 'LightSwitchApplication.Implementation.ApplicationDataDataService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

    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.InvalidOperationException: The type 'LightSwitchApplication.Implementation.ApplicationDataDataService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.

    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: 
    [InvalidOperationException: The type 'LightSwitchApplication.Implementation.ApplicationDataDataService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.]
       System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +108757
       System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1435
       System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +76
       System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +901
    
    [ServiceActivationException: The service '/Nomad/ApplicationData.svc' cannot be activated due to an exception during compilation.  The exception message is: The type 'LightSwitchApplication.Implementation.ApplicationDataDataService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found..]
       System.Runtime.AsyncResult.End(IAsyncResult result) +624522
       System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +196075
       System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +282


    JeffJ

    Tuesday, July 22, 2014 2:09 AM

Answers

  • I was able to solve this problem by changing the Microsoft.Data.Services.dll to Copy Local in the References. It seems that the DataServices dll was not being copied.  As soon as I changed to copy local, the application began working properly.

    JeffJ

    • Marked as answer by JeffLS123 Sunday, August 10, 2014 1:51 AM
    Sunday, August 10, 2014 1:51 AM

All replies

  • Hi JeffJ,

    According to your description above, if you deploy your LS app to IIS, first you need check whether configure a Web Server to host LightSwitch applications properly.

    At the same time follow the deployment steps, and check your procedure.

    In addition, you can also turn on tracing to get the detailed error message and that will help you troubleshoot. Here's info how to debug that message:

    http://blogs.msdn.com/b/lightswitch/archive/2011/09/20/diagnosing-problems-in-a-deployed-lightswitch-application-eric-erhardt.aspx

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by Angie Xu Monday, August 4, 2014 8:29 AM
    • Unmarked as answer by JeffLS123 Sunday, August 10, 2014 1:49 AM
    Wednesday, July 23, 2014 11:28 AM
  • Thank you for your response. I have gone through all of the steps, but still no luck. I thought that the Configuring Your Web Server link might help because I did not specifically use the Web Platform installer to install the LS 2013 perquisites. But, even after installing I am getting the same error.  I had been publish successfully for months using LS2012, but after the upgrade, it is always giving me the error.

    Also, tracing does not help because there is not detail in the trace, just the 500 error. 

    Request Details

    Session Id: Request Type: GET
    Time of Request: 7/23/2014 9:50:08 AM Status Code: 500
    Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)

    and some server variable information, but no details at all.


    JeffJ


    • Edited by JeffLS123 Wednesday, July 23, 2014 1:52 PM
    Wednesday, July 23, 2014 1:49 PM
  •  tracing does not help because there is not detail in the trace, just the 500 error. 

    Request Details

    Session Id: Request Type: GET
    Time of Request: 7/23/2014 9:50:08 AM Status Code: 500
    Request Encoding: Unicode (UTF-8) Response Encoding: Unicode (UTF-8)


    To troubleshoot this issue, how about FIddler in the blog mentioned above.

    Fiddler is a tool that every web developer and IT administrator should have at their disposal.  It logs all web traffic between your computer and the IIS web server.  It will do the tracing that the LightSwitch diagnostics can’t do. 

    Regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, July 28, 2014 7:55 AM
  • I was able to solve this problem by changing the Microsoft.Data.Services.dll to Copy Local in the References. It seems that the DataServices dll was not being copied.  As soon as I changed to copy local, the application began working properly.

    JeffJ

    • Marked as answer by JeffLS123 Sunday, August 10, 2014 1:51 AM
    Sunday, August 10, 2014 1:51 AM