IIS Configuration for dot isn URL

-1

I build a OData 4 API, based on this example https://docs.microsoft.com/en-us/aspnet/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint It works fine.

Now I want to expand one of my controllers to handle a dot in the name, e.g. http://localhost:63225/api/Customers.Addresses

So I added the Routeprefix

[RoutePrefix("Customers.Addresses")]
public class AddressesController : ODataController
{}

and added to my web.config:

 <system.webServer>
<handlers>
  <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
  <remove name="OPTIONSVerbHandler" />
  <remove name="TRACEVerbHandler" />      
  <!--
  <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
  -->      
  <add name="ExtensionlessUrlHandler-Integrated-4.0" path="/*" verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>

to support the dot in the URL.

But every test I take it returns an Error 500.

I'm using VS2019 and IIS Express.

I don't get tracelogfiles, so no idea what is going wrong.

Suggestions are more than welcome

Update: so I managed to publish the application to IIS which gave me a tracelog stating

1231. 
view trace Warning -SET_RESPONSE_ERROR_DESCRIPTION ErrorDescription Internal Server Error 
1232. view trace Warning -MODULE_SET_RESPONSE_ERROR_STATUS 
ModuleName ManagedPipelineHandler Notification EXECUTE_REQUEST_HANDLER HttpStatus 500 HttpReason Internal Server Error HttpSubStatus 0 ErrorCode Recursie te diep. Stapel is overgelopen. (0x800703e9) 

Does this tell someone?

Jeroen

c#
odata
iis-express
iis-express-10
asked on Stack Overflow Oct 25, 2019 by Jeroen E • edited Oct 26, 2019 by Jeroen E

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0