2017-03-01 7 views
0

Visual Studio 2015로 마이그레이션 된 기존 프로젝트가 있습니다. 모든 것이 제대로 작동하고, asmx 작업 만 찾을 수 없습니다. 나는 무엇이 잘못되었는지 이해하지 못합니까? 내 프로젝트는 IIS 내부에서 실행됩니다. IIS에서 가상 디렉터리를 만들려고했는데 IIS에서 웹 사이트를 열면 asmx가 제대로 작동합니다.VS2015 asmx 메서드를 찾을 수 없습니다.

내가 시도한 것은 프로젝트에 .asmx 파일을 삭제 한 다음 추가하는 것입니다. 아무것도 바뀌지 않았다.

IIS 내에서만 작동하지 않습니다 (프로젝트가 Visual Studio에서 직접 실행될 때). 오류 메시지 :

자원을로드하지 못했습니다 :

enter image description here

코드 :

서버 (찾을 수 없음) (404) 의 상태 http://localhost:53358/wf/wsSearchCAMERC.asmx/GetBAUSERSearch1

설정으로 대응

namespace fCatEve 
    { 
     /// <summary> 
     /// Summary description for wsSearchCAMERC 
     /// </summary> 
     [WebService(Namespace = "fCatEve")] 
     [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 
     [System.ComponentModel.ToolboxItem(false)] 
     // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
     [System.Web.Script.Services.ScriptService] 
     public class wsSearchCAMERC : System.Web.Services.WebService 
     { 

    [WebMethod] 
     public string[] GetBAUSERSearch1(string prefixText, int count, string contextKey) 
     { 
     // code omitted for clarity 
     } 
     } 
     } 

답변

0

복사 - 붙여 넣기 방법으로 문제를 해결했습니다. asmx ~ MVC 기본적으로 비동기 컨트롤러입니다. 이제는 .asmx에서와 같은 링크를 사용하여 해당 메소드를 호출 할 수 있습니다.