Error trying to access WebService

0

I have the following problem, I have a WebService asmx, posted in an IIS, with the authentication configuration set to Anonymous, but when I try to access it, the following error appears:

I need to be able to access this WebService for some testing.

Thank you in advance.

    
asked by anonymous 05.01.2018 / 13:34

1 answer

0

By default IIS does not have the .asmx extension in the default document list of the website, in which case there is no default as a last alternative it will try to display the list of documents in the directory. Since this feature is not enabled by default, you receive the error message displayed in your question.

To access your service you must use the full path of your asmx.

Another alternative, very unusual, but if this address is unique to provide this webservice or that is its main function. You add it to the default document list by following the steps below.

However, it is always recommended to provide the full path of the file, since many programs need to access the endpoint with the extension .asmx plus the query ?wsdl to be able to map the endpoints and reflect the object structure of their contracts .

If you wanted to leave this WS as defult of your site, add it to the list of default documents by following the steps below.

IfyoudonothavedirectaccesstoIISManager,youcantrypassingthestatementtoitsWeb.config

<system.webServer><defaultDocument><files><clear/><addvalue="nome_do_seuWS.asmx"/>
            </files>
        </defaultDocument>
    </system.webServer>
    
05.01.2018 / 15:32