views:

141

answers:

2

I have a WCF service serving image per request. Accessing the service via localhost is fast but accessing through ip or domain address (as other clients will) is very slow. Images are approximately 1MB in size.

Any thoughts?

A: 

Data transfer rates at localhost will be crazy-fast compared to transfer rates over the internets. Have you timed the transfers and computed the expected duration per the bandwidth available? A 1MB file download at localhost will happen faster than you can blink, but it will take a few seconds from a low-bandwidth connection (if the endpoint from which you are getting the file is 500Kb/s up).

Here is a bandwidth/transfer time calculator - Hope this helps you narrow down the cause of the problem!

Scott Fletcher
The localhost and the domain address resolve to the same develop machine. The client is also located on that machine. So client/service communication should never leave the intranet and should be the same speed regardless of whether endpoint is specified as an internal ip, localhost or the external domain address, or am I missing something?
Goran
+1  A: 

Editing hosts file fixed the problem. The solution was to comment out ipv6 definition:

#   ::1             localhost
Goran