locked
WCF Deployment problems 2 RRS feed

  • Question

  • I deployed on IIS 7 a WCF Ria Services Business App.I connect to sql server using SQL SERVER authentication. My deployment method is VS2010 Publish method. I got the following 2  errors

    1)

    An error occurred while loading data through the 'GetPM_ChiaveAssistito' query on DomainContext of type 'IssContext' and the error was not handled.  If this error is expected, then you must handle the LoadedData event on the DomainDataSource and call LoadedDataEventArgs.MarkErrorAsHandled() to avoid this exception.

    2)

    An error occurred while loading data through the 'GetPM_ChiaveISMAR' query on DomainContext of type 'IssContext' and the error was not handled.  If this error is expected, then you must handle the LoadedData event on the DomainDataSource and call LoadedDataEventArgs.MarkErrorAsHandled() to avoid this exception.

     

    Load operation failed for query 'GetPM_ChiaveISMAR'. String initialization format does not conform to the specification that start at index 0.

       su System.Windows.Controls.DomainDataSource.RaiseLoadedData(LoadedDataEventArgs e)
       su System.Windows.Controls.DomainDataSource.DomainContext_Loaded(LoadedDataEventArgs e, LoadContext loadContext)
       su System.Windows.Controls.DomainDataSource.LoadData_Callback(LoadOperation loadOperation)
       su System.ServiceModel.DomainServices.Client.LoadOperation.<>c__DisplayClass4`1.<Create>b__0(LoadOperation`1 arg)
       su System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()
       su System.ServiceModel.DomainServices.Client.OperationBase.Complete(Exception error)
       su System.ServiceModel.DomainServices.Client.LoadOperation.Complete(Exception error)
       su System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
       su System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<Load>b__17(Object )

    I also installed WCF Ria Services on the server also that copy locally WCF assemblies.

    My web.config file is the following.

    <?xml version="1.0" encoding="utf-8"?>
    <!--
      Per ulteriori informazioni su come configurare l'applicazione ASP.NET, visitare il sito Web all'indirizzo
      http://go.microsoft.com/fwlink/?LinkId=169433
      -->
    <configuration>
      <system.webServer>
        <modules runAllManagedModulesForAllRequests="true">
          <add name="DomainServiceModule" preCondition="managedHandler" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </modules>
        <validation validateIntegratedModeConfiguration="false" />
      </system.webServer>
      <system.web>
        <httpModules>
          <add name="DomainServiceModule" type="System.ServiceModel.DomainServices.Hosting.DomainServiceHttpModule, System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </httpModules>
        <compilation debug="true" targetFramework="4.0">
          <assemblies>
            <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
          </assemblies>
        </compilation>
      </system.web>
      <connectionStrings>
        <!--<add name="ISSEntities" connectionString="metadata=res://*/ISS.csdl|res://*/ISS.ssdl|res://*/ISS.msl;provider=System.Data.SqlClient;provider connection string="Data Source=10.0.250.66;Initial Catalog=ISS;Persist Security Info=True;User ID=sa;Password=sqlAdmin4sql02;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />-->
        <add name="ISSEntities" connectionString="metadata=res://*/ISS.csdl|res://*/ISS.ssdl|res://*/ISS.msl;provider=System.Data.SqlClient;provider connection string="Data Source=skin;Initial Catalog=ISS;User ID=sa;Password=t4p1dm;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
      </connectionStrings>
      <system.serviceModel>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
      </system.serviceModel>
    </configuration>

    Can anyone give me any advice?

    Thank you for any help.

    Marco Paci

    Sunday, January 30, 2011 2:25 AM

Answers