asmx - call web methods directly from other project -
i working .net solution project , there couple projects in side of solution. 1 of projects has asmx file. now, question is possible call web methods in asmx file directly other projects in same solution instead of adding web reference of it?
thanks.
asmx files placed in asp.net projects not suitable referenced other projects. reason recommend refactoring functionality class library referenced web service , other projects directly call methods:
var result = new someclass().somemethod();
and in web service:
[webmethod] public string somemethod() { return new someclass().somemethod(); }
Comments
Post a Comment