2013-04-24 1 views
1
내가 새로운 웹 사이트 (안 웹 프로젝트를) 만들었습니다

, 솔루션 탐색기에서 잘 프로젝트를 클릭 발견하고 서비스 참조 다음서비스 참조가

I는 웹 서비스 제공자의 주소를 추가했습니다 추가 클릭 수 없습니다 새 폴더 App_WebReferences이 만들어졌습니다. 여기에는 세 개의 파일 (두 개의 .svcinfo와 하나의 .wsdl)이있는 ServiceReference1 폴더가 들어 있습니다.

var srv = new ServiceReference1.PaymentIFBindingSoapClient(); 
double result = srv.verifyTransaction(refNum, "10004738"); 

가 컴파일에 오류가없고 로컬 호스트에서 실행 :

는 지금은 인도 내 공급자로이 코드를 사용합니다.

*Server Error in '/' Application. 
Compilation Error 
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 
**Compiler Error Message:** CS0246: The type or namespace name 'ServiceReference1'  could not be found (are you missing a using directive or an assembly reference?) 
Source Error: 

Line 69:    ///WebService Instance 
Line 70:    // 
Line 71:    var srv = new ServiceReference1.PaymentIFBindingSoapClient(); 
Line 72:    
Line 73:    double result = srv.verifyTransaction(refNum, "10004738"); 

Source File: d:\domains\olomrayaneh.net\wwwroot\ebook\check_payment.aspx.cs Line: 71 

Show Detailed Compiler Output: 
Show Complete Compilation Source: 

Version Information: Microsoft .NET Framework Version:2.0.50727.3643; ASP.NET  Version:2.0.50727.3634* 

나는이 문제에 갇혀했습니다 내가 서버에 내 FTP로 내 웹 사이트에 파일을 업로드 하지만 .. 나는이 오류 메시지를 얻을. 뭐가 문제 야!? 어떻게 해결해야합니까?

using ServiceReference1; 

다음 오류 메시지 라인은 같은 메시지와 함께이 라인 변경 :

은 내가이 줄을 추가하려고한다는 말을한다!

그리고 localhost 실행 중 오류 메시지가 다시 표시되지 않습니다!

<system.serviceModel> 
       <bindings> 
    <basicHttpBinding> 
    <binding name="PaymentIFBindingSoap" closeTimeout="00:01:00" 
       openTimeout="00:01:00" receiveTimeout="00:10:00"  sendTimeout="00:01:00" 
    allowCookies="false" bypassProxyOnLocal="false"  hostNameComparisonMode="StrongWildcard" 
    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
    useDefaultWebProxy="true"> 
    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
     maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
    <security mode="Transport"> 
     <transport clientCredentialType="None" proxyCredentialType="None" 
     realm="" /> 
     <message clientCredentialType="UserName" algorithmSuite="Default" /> 
    </security> 
    </binding> 
    <binding name="PaymentIFBindingSoap1" closeTimeout="00:01:00" 
    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
    allowCookies="false" bypassProxyOnLocal="false"  hostNameComparisonMode="StrongWildcard" 
    maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
    messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" 
    useDefaultWebProxy="true"> 
    <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
     maxBytesPerRead="4096" maxNameTableCharCount="16384" /> 
    <security mode="None"> 
     <transport clientCredentialType="None" proxyCredentialType="None" 
     realm="" /> 
     <message clientCredentialType="UserName" algorithmSuite="Default" /> 
    </security> 
    </binding> 
    </basicHttpBinding> 
    </bindings> 
     <client> 
    <endpoint  address="https://acquirer.samanepay.com:2789/payments/referencepayment.asmx" 
    binding="basicHttpBinding" bindingConfiguration="PaymentIFBindingSoap" 
    contract="ServiceReference1.PaymentIFBindingSoap" name="PaymentIFBindingSoap" /> 
    </client> 
     </system.serviceModel> 

답변

2

감사합니다. 해결했습니다.

문제가 내가 wwwroot 폴더 아래에 하위 폴더에 모든 데이터를 복사 한 것이 었습니다

,

하지만 wwwroot 폴더의 루트에 App_WebReference 폴더를 복사해야합니다!

+0

하위 폴더에서도 작동해야합니다. 해야 할 일은 하위 폴더에 응용 프로그램을 만드는 것입니다. http://technet.microsoft.com/ko-kr/library/cc772042(v=ws.10).aspx – Kai

+0

당신은 인생을 풍미합니다.)) –

0

는 일반적으로 모든 서비스 참조가에 저장됩니다 서버 참조를 추가 한 후,이 라인은 web.config 파일에 추가 -

내 웹 사이트의 web.config 3.5

닷넷 프레임 워크 구축이다 프로젝트의 web.config 파일과이 파일은 정상적으로 배포되지 않습니다. 로컬 파일에서 추가하지 않으면 서버 web.config 파일에 서비스에 대한 참조가 포함되어 있는지 확인하십시오.

+0

답해 주셔서 감사합니다. 내 질문에 web.config 변경 사항을 추가했습니다. 확인하시기 바랍니다. 내가 더 할 일이있어? – user1422847

+0

web.config와 서버 web.config를 비교하면 모든 설정이있는 것처럼 보입니다. 작동합니까? – Kai

+0

내 web.config를 서버에 업로드했습니다. 그러나 문제는 켜져 있습니다! 끔찍한 !! 2 일 검색 후 아무런 해결책도 없습니다! 덕분에 다시 . – user1422847

관련 문제