How to share a webservice through FTP?

0

Contextualization

I'm developing an application in C # to access a webservice test that I created. This webservice is simple, it only has a method that returns a string.

The webservice I created through Visual Studio, through an Asp.net project. I added a webservice to the project and implemented the method that returns a string.

ASP.Net Project

Project Structure

Filesgeneratedbytheproject

IntheAsp.netprojectfolder,thefilesweregeneratedasprintbelow:

Thehighlightedfile(testWS)isin.asmxformat.

WebserviceMethod

ProjectexecutedbyVisualStudio

Noticethatthemethod(testingRetornoWebService)appearsatthetopofthepage.

AfterIclickthemethodlink,thefollowingpageappears:

WhenIclickthecallbuttononthispage,IgetthemessagethatthemethodtestingRetornoWebServicereturns,whichis"WebService working correctly".

The problem

I put the "testWS.asmx" file in the WebService folder of my FTP to try to request it via browser. However, I can not.

I'm in the dilemma if I need to share all the Asp.net project files I've created or need to do something completely different.

The error print follows:

AfterinsertingintotheWeb.Configfilethetagthatenablesthedisplayoftheerrormessage,Igetthefollowingpagewhentryingtorequestthe"testWS.asmx" file from the browser:

Web.configcode

<configuration><system.web><customErrorsmode="Off"/><customErrors mode="Off"/>
    <compilation debug="true" targetFramework="4.6.1"/>
    <httpRuntime targetFramework="4.6.1"/>
    <httpModules>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
    </httpModules>
  </system.web>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"
        type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/>
    </compilers>
  </system.codedom>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <remove name="ApplicationInsightsWebTracking"/>
      <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
        preCondition="managedHandler"/>
    </modules>
  </system.webServer>
</configuration>

FTP Web

The files I generated when I published the project in ASP.Net are as follows in FTP:

I uploaded all the files generated in the ASP.Net project publishing process by Visual Studio.

    
asked by anonymous 09.10.2016 / 22:44

1 answer

1

You need to publish your webservice and configure IIS to have access to it.

link

    
07.12.2018 / 12:36