c# - invoke WCF service method from web browser -


I would like to run my service from a web browser: http: // localhost: 443 / TestService // RunTest / Data / Test This does not work for me

  This page can not be displayed • Make sure the web address is http: // localhost: 443 correct. • Find pages with your search engine • Refresh the page in a few minutes.  

How to solve it - Redefine the end point - How? WCF Service:

  // TestService.svc.cs Public Class TestService: ITestService {Public String RunTest (String Data) {Return String. Format ("You entered: {0}", data); }} // iTunes Service. C [Operation Contract] [WebGet (Response format = Web messform .Jason, EuryTemplate = "/ Runtest / Data / {data}")) String runtext (string data) {Return string.format ("You inserted: {0}", Proxydomain); } //Web.config & lt; System.serviceModel & gt; & Lt; Services & gt; & Lt ;! - This section is optional with default configuration that is included in the .NET Framework 4.5.1 - & gt; & Lt; Service name = "Test service" & gt; & Lt; Host & gt; & Lt; BaseAddresses & gt; & Lt; AddAddress = "http: // localhost: 443 / TestService /" /> Add & lt; / BaseAddresses & gt; & Lt; / Host & gt; & Lt; Endpoint address = "http: // localhost: 443 / test service" binding = "wsHttpBinding" contract = "iTest service" /> & Lt; / Services & gt; & Lt; / Services & gt; & Lt; /system.serviceModel>  

Also when I run it, WCF client is opened with port 54388

In my experience, you will not be able to test directly through the browser, instead you should use the WCF Test client:

You can use it to see if you can access WSDL. An example of a WSDL call in the browser:

  http: // localhost: 8080 / DecisionService / ws / PreTradeChecksRuleApp / 1.0 / PreTradeChecks / 1.0? WSDL  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -