forum

Home / DeveloperSection / Forums / WCF client application crashes when accessing service

WCF client application crashes when accessing service

Hank Greenberg209519-Jun-2013
Hi Everyone,

I have created a wcf web service with access to ADO.net Entity Framework. Hosts on IIS and have console client. Everything works fine.. on my computer. When I send .exe file to another its just crashes and I cant figure out why. Code of console app:

MyServiceClient client = new MyServiceClient();
Console.WriteLine(client.GetOrders().First().Date_Accepted.ToString());
client.Close();
Console.ReadLine();

My web.config file is default with no changes except of connection string. Client app.config

<configuration>
<startup> 
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
    <bindings>
        <basicHttpBinding>
            <binding name="BasicHttpBinding_IMyService" />
        </basicHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://93.77.254.167:9595/MyService.svc" binding="basicHttpBinding"
            bindingConfiguration="BasicHttpBinding_IMyService" contract="MyServiceReference.IMyService"
            name="BasicHttpBinding_IMyService" />
    </client>
</system.serviceModel>

Thanks in advance for any recommendations or solutions.

Updated on 19-Jun-2013

Can you answer this question?


Answer

1 Answers

Liked By