C# WebService Setting Service Reference Question

-1

I have C# write a Windows Forms program (Program_1), and a web service (ASMX) project (Project 1).

Computer B's project 1 was executed directly by Visual Studio.

When I use Program_1 from Computer A to refer to Project 1 on Computer B, Visual Studio on Computer B will display the following error message:

An exception of type 'System.ArgumentOutOfRangeException' occurred in System.Web.dll, but the user code did not process it

Additional Information: There is no character that this Unicode character can correspond to in the multi-byte destination code page. (Exception occurred in HRESULT: 0x80070459)

But the strange thing is:

  1. I use Program_1 to set service on computer B. Project 1 on computer B is normal.

  2. I use Program_1 to set the service reference on computer B. Project 1 on computer A is normal.

  3. I use Program_1 on the A computer to set the service reference. Project 1 on the A computer is normal.

  4. That is, only the setting service from computer A refers to project 1 on computer B. The above-mentioned error occurs.

Does anyone know how this situation can be resolved?

My project 1 is set in web.config as follows:

 <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="MyProjectSoap" />
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://127.0.0.1/WebService/MyProject.asmx" binding="basicHttpBinding" bindingConfiguration="MyProjectSoap" contract="WS_MyProject.CIMSoap" name="MyProjectSoap" />
    </client>
  </system.serviceModel>

The settings for the web service in app.config of my program_1 are as follows:

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="MyProjectSoap" maxReceivedMessageSize="2147483647" />
  </basicHttpBinding>
</bindings>
    <client>
          <endpoint address="http://127.0.0.1/WebService/MyProject.asmx" binding="basicHttpBinding"
                bindingConfiguration="MyProjectSoap" contract="WS.MyProject" name="MyProjectSoap" />
    </client>
</system.serviceModel>
c#
soap
wsdl
asmx
asked on Stack Overflow Dec 13, 2019 by arthurbonnie1977 • edited Dec 13, 2019 by marc_s

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0