Base solution for your next web application
Open Closed

POST and PUT method in API not working (ASP.NET CORE) - WebDAVModule on IIS not installed #11637


User avatar
0
pliaspzero created

Hi,

we have a problem on customer server that in ASP.NET CORE API POST and PUT method not working.

See below my web.config - WebDAVModule on IIS not installed - any hints what to check further?

<?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <httpRuntime maxRequestLength="1048576" maxQueryStringLength="2097151" /> </system.web> <system.webServer> <modules> <remove name="WebDAVModule" /> </modules> <handlers> <remove name="WebDAV" /> <add name="aspNetCore" path="" verb="" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> </handlers> <security> <requestFiltering> <requestLimits maxAllowedContentLength="1073741824" maxQueryString="2097151" /> <fileExtensions> <add fileExtension=".html" allowed="true" /> </fileExtensions> </requestFiltering> </security> <aspNetCore processPath="dotnet" arguments=".\WFMOne.Web.Host.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" startupTimeLimit="3600" requestTimeout="23:00:00" hostingModel="InProcess"> <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Production" /> <environmentVariable name="COMPLUS_ForceENC" value="1" /> <environmentVariable name="ASPNETCORE_HTTPS_PORT" value="44338" /> </environmentVariables> </aspNetCore> <httpProtocol> <customHeaders> <remove name="X-Powered-By" /> </customHeaders> </httpProtocol> </system.webServer> </configuration> <!--ProjectGuid: 9fc37c62-2105-4d32-9724-7323b959504b-->


3 Answer(s)
  • User Avatar
    0
    pliaspzero created

    Additional info: I had to remove folowing line due to erro:

    HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid.

    Detailed Error Information: Module RequestFilteringModule Notification BeginRequest Handler aspNetCore Error Code 0x800700b7 Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'verb' set to 'POST'

  • User Avatar
    0
    pliaspzero created

    Additional info 2: ASP.NET CORE runs in Application with own Application Pool

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @pliaspzero

    If WebDAVModule is installed on IIS, sometimes it doesn't work removing it from web.config. Could you uninstall WebDAVModule if it is installed on IIS. If not, are there any error messages you can share ?