WCF DNS Problem-Help [Resolved]

Posted by Ogipansrk under WCF on 12/22/2011 | Points: 10 | Views : 16780 | Status : [Member] | Replies : 2
Hello World !

I have a simple Interface with one method named Login which is oneway , which by implementing writes a simple text to a file.

Iam using netTcpBinding ,When adding a reference to service I am getting DNS problem.

Here is my webconfig
-----------------------------

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="MessagePatternConsoleHost.Service" behaviorConfiguration="MetadataBehavior">
<host>
<baseAddresses>

<add baseAddress="http://localhost:9091/logger"/>
<add baseAddress="net.tcp://locahost:9092/logger"/>
</baseAddresses>
</host>
<endpoint address=""
binding="netTcpBinding"
contract="MessagePatternConsoleHost.IService" >
<identity>
<dns value="localhost"/>
</identity>
</endpoint>

<endpoint address="mex"
binding="mexTcpBinding"
contract="IMetadataExchange"/>
</service>

</services>
<behaviors>
<serviceBehaviors>
<behavior name="MetadataBehavior">

<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>


This is myStack
------------------------
No DNS entries exist for host locahost.

Server stack trace:
at System.ServiceModel.Channels.DnsCache.Resolve(String hostName)
at System.ServiceModel.Channels.SocketConnectionInitiator.GetIPAddresses(Uri uri)
at System.ServiceModel.Channels.SocketConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.BufferedConnectionInitiator.Connect(Uri uri, TimeSpan timeout)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IService.LoggedIn()
at ServiceClient.LoggedIn()

Inner Exception:
No such host is known
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at System.ServiceModel.Channels.DnsCache.Resolve(String hostName)


Thanks in Advance.




Responses

Posted by: Ogipansrk on: 1/11/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
I Have spelled URL Wrongly.
Problem Solved!!!!!!!!!!!!!


Ogipansrk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 12/22/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
if you take these URI's

http://localhost:9091/logger

and

net.tcp://locahost:9092/logger

are you able to access them?



Thank you for posting at Dotnetfunda
[Administrator]

Ogipansrk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response