Property httpRequest 'nicht vorhanden
Ich erhalte diese Fehlermeldung, wenn ich einen Build außerhalb von Visual Studio ausführe:
"Eine Eigenschaft mit dem Namen 'httpRequest' ist nicht vorhanden"
Wenn ich den gleichen Code in Visual Studio ausführe, funktioniert er. Hat jemand eine Idee, was ich falsch mache?
Meine app.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="CacheServiceEndpoint" />
<binding name="consultaWebServicePortBinding" maxBufferPoolSize="524288" maxBufferSize="10485760"
maxReceivedMessageSize="10485760">
<readerQuotas maxDepth="32" maxStringContentLength="10485760"
maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport" />
</binding>
<binding name="consultaWebServicePortBinding1" />
</basicHttpBinding>
<customBinding>
<binding name="CustomBinding_ICacheService">
<binaryMessageEncoding />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://....svc"
binding="basicHttpBinding" bindingConfiguration="CacheServiceEndpoint"
contract="Cache.ICacheService" name="CacheServiceEndpoint" />
<endpoint address="http://.../binary"
binding="customBinding" bindingConfiguration="CustomBinding_ICacheService"
contract="Cache.ICacheService" name="CustomBinding_ICacheService" />
<endpoint address="https://..."
binding="basicHttpBinding" bindingConfiguration="consultaWebServicePortBinding"
contract="ABC.consultaWebService" name="consultaWebServicePort" />
</client>
</system.serviceModel>
</configuration>
Was mache ich, um einen Anruf zu tätigen:
svc = new consultaWebServiceClient ("consultaWebServicePort");
svc.Endpoint.Behaviors.Add (new CustomEndpointBehavior (user, psw));
Vielen Dank