, 솔루션 탐색기에서 잘 프로젝트를 클릭 발견하고 서비스 참조 다음서비스 참조가
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>
하위 폴더에서도 작동해야합니다. 해야 할 일은 하위 폴더에 응용 프로그램을 만드는 것입니다. http://technet.microsoft.com/ko-kr/library/cc772042(v=ws.10).aspx – Kai
당신은 인생을 풍미합니다.)) –