Click here to Skip to main content
15,890,717 members
Home / Discussions / C#
   

C#

 
AnswerRe: [HELP] XAML/WPF C# Pin
OriginalGriff31-May-14 20:19
mveOriginalGriff31-May-14 20:19 
AnswerRe: [HELP] XAML/WPF C# Pin
Richard MacCutchan31-May-14 21:09
mveRichard MacCutchan31-May-14 21:09 
AnswerRe: [HELP] XAML/WPF C# Pin
ZurdoDev2-Jun-14 1:39
professionalZurdoDev2-Jun-14 1:39 
Questionwcf endpoint issue Pin
Nico Haegens31-May-14 5:12
professionalNico Haegens31-May-14 5:12 
AnswerRe: wcf endpoint issue Pin
OriginalGriff31-May-14 20:20
mveOriginalGriff31-May-14 20:20 
GeneralRe: wcf endpoint issue Pin
Nico Haegens1-Jun-14 4:47
professionalNico Haegens1-Jun-14 4:47 
AnswerRe: wcf endpoint issue Pin
Richard MacCutchan31-May-14 21:07
mveRichard MacCutchan31-May-14 21:07 
GeneralRe: wcf endpoint issue Pin
Nico Haegens31-May-14 23:20
professionalNico Haegens31-May-14 23:20 
Exception happens as soon as I create the client(call the constructor).
The exception is in dutch but I'll do my best to translate:
Kan het eindpuntelement met naam lezingen en contract LezingenService.ILezingenService niet vinden in het configuratiegedeelte van de ServiceModel-client. Dit wordt mogelijk veroorzaakt doordat geen configuratiebestand is gevonden voor de toepassing, of doordat geen einpuntelement dat overeenkomt met deze naam kan worden gevonden in het client-element.
Translated to english this means:
Can't find the endpoint with the name lezingen and contract LezingenService.ILezingenService in the configuration section of the ServiceModel client. This could be caused by a missing configuration file for the application or because no endpoint was found in the client element with this name.
I'll provide you with the app.config files:
Below service app.config:
XML
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
  </configSections>
  <connectionStrings>
    <add name="LezingenService.Properties.Settings.home" connectionString="Data Source=localhost;Initial Catalog=Programmeren4_TaakMVVM;Integrated Security=True"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
    <add key="ClientSettingsProvider.ServiceUri" value="" />
  </appSettings>
  <system.web>
    <compilation debug="true" />
    <membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
      </providers>
    </membership>
    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
      </providers>
    </roleManager>
  </system.web>
  <!-- When deploying the service library project, the content of the config file must be added to the host's 
  app.config file. System.Configuration does not support config files for libraries. -->
  <system.serviceModel>
    <services>
      <service name="LezingenService.LezingenService" behaviorConfiguration="LezingenService.LezingenBehaviour">
        <endpoint name="lezingen" binding="wsDualHttpBinding" address="" contract="LezingenService.ILezingenService">
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8733/Design_Time_Addresses/LezingenService/Service/" />
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="LezingenService.LezingenBehaviour">
          <!-- To avoid disclosing metadata information, 
          set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True" />
          <!-- To receive exception details in faults for debugging purposes, 
          set the value below to true.  Set to false before deployment 
          to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="True" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

Below client app.config:
XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <wsDualHttpBinding>
                <binding name="lezingen" />
            </wsDualHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:8733/Design_Time_Addresses/LezingenService/Service/"
                binding="wsDualHttpBinding" bindingConfiguration="lezingen"
                contract="LezingenService.ILezingenService" name="lezingen">
                <identity>
                    <dns value="localhost" />
                </identity>
            </endpoint>
        </client>
    </system.serviceModel>
</configuration>

Below how I call the constructor:
C#
InstanceContext context = new InstanceContext(this);
LezingenServiceClient client = new LezingenServiceClient(context, "lezingen");

Stacktrace of the exception:
bij System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)
bij System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName, Configuration configuration)
bij System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)
bij System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
bij System.ServiceModel.DuplexChannelFactory`1..ctor(Object callbackObject, String endpointConfigurationName, EndpointAddress remoteAddress)
bij System.ServiceModel.ConfigurationEndpointTrait`1.CreateDuplexFactory()
bij System.ServiceModel.ConfigurationEndpointTrait`1.CreateChannelFactory()
bij System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
bij System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
bij System.ServiceModel.ClientBase`1..ctor(InstanceContext callbackInstance, String endpointConfigurationName)
bij System.ServiceModel.DuplexClientBase`1..ctor(InstanceContext callbackInstance, String endpointConfigurationName)
bij Model.LezingenService.LezingenServiceClient..ctor(InstanceContext callbackInstance, String endpointConfigurationName) in d:\Programmeren4\TaakLezingen\Model\Service References\LezingenService\Reference.cs:regel 626
bij Model.CursistDepository..ctor() in d:\Programmeren4\TaakLezingen\Model\CursistDepository.cs:regel 33
GeneralRe: wcf endpoint issue Pin
Richard MacCutchan1-Jun-14 0:42
mveRichard MacCutchan1-Jun-14 0:42 
GeneralRe: wcf endpoint issue Pin
OriginalGriff1-Jun-14 1:00
mveOriginalGriff1-Jun-14 1:00 
GeneralRe: wcf endpoint issue Pin
Richard MacCutchan1-Jun-14 1:08
mveRichard MacCutchan1-Jun-14 1:08 
GeneralRe: wcf endpoint issue Pin
OriginalGriff1-Jun-14 1:15
mveOriginalGriff1-Jun-14 1:15 
GeneralRe: wcf endpoint issue Pin
Richard Deeming2-Jun-14 1:42
mveRichard Deeming2-Jun-14 1:42 
QuestionHelp me ! How to write a Printer Driver in C# Pin
LY MINH HOANG30-May-14 10:18
LY MINH HOANG30-May-14 10:18 
AnswerRe: Help me ! How to write a Printer Driver in C# Pin
Eddy Vluggen30-May-14 10:34
professionalEddy Vluggen30-May-14 10:34 
AnswerRe: Help me ! How to write a Printer Driver in C# Pin
Dave Kreskowiak30-May-14 10:38
mveDave Kreskowiak30-May-14 10:38 
JokeRe: Help me ! How to write a Printer Driver in C# Pin
Mycroft Holmes30-May-14 12:49
professionalMycroft Holmes30-May-14 12:49 
AnswerRe: Help me ! How to write a Printer Driver in C# Pin
Richard MacCutchan30-May-14 23:49
mveRichard MacCutchan30-May-14 23:49 
QuestionCode Review? Pin
Zachery Hysong30-May-14 4:38
Zachery Hysong30-May-14 4:38 
AnswerRe: Code Review? Pin
Eddy Vluggen30-May-14 10:36
professionalEddy Vluggen30-May-14 10:36 
AnswerRe: Code Review? Pin
Richard MacCutchan30-May-14 22:03
mveRichard MacCutchan30-May-14 22:03 
QuestionHow to download Workspaces project? Pin
agent_kruger30-May-14 4:19
professionalagent_kruger30-May-14 4:19 
AnswerRe: How to download Workspaces project? Pin
Pete O'Hanlon30-May-14 5:10
mvePete O'Hanlon30-May-14 5:10 
GeneralRe: How to download Workspaces project? Pin
agent_kruger30-May-14 17:44
professionalagent_kruger30-May-14 17:44 
GeneralRe: How to download Workspaces project? Pin
Richard MacCutchan30-May-14 22:02
mveRichard MacCutchan30-May-14 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.