I have added following two lines but still legend is not showing up..
[HTML]
esri.config.defaults.io.proxyUrl = "/proxy/proxy.ashx";
esri.config.defaults.io.alwaysUseProxy = true;[/HTML]
I can see that its accessing proxy and it is configure correctly but when it tries to get layerinfo, its not using proxy so cant get legend info because of cross origin issue.."is not allowed by Access-Control-Allow-Origin."