_From @maheshmore2691 on Friday, September 13, 2019 3:09:20 PM_
Hi,
I know that this is not related to .NET core but still wanted to confirm that is there any way to fix it in .NET core.
Visual studio: 2019
.NET core: 2.2
Language: C#
```C#
Accessing path: http://baseUrl/api/test/test.master
[HttpGet("{userName}")]
public ActionResult<string> Get(string userName)
{
return userName;
}
Accessing path: http://baseUrl/api/test/test.master
`[HttpGet]
public ActionResult
{
return userName;
}
```
I know that these are the file extensions which are not allowed to access as resources. But is there any other way to make it work other than accepting a parameter as a query string. Can I make it work with attribute routing?
Any lead would be appreciated.
Thanks
_Copied from original issue: dotnet/core#3366_
@maheshmore2691 you're likely running in to IIS"s request filtering. https://docs.microsoft.com/en-us/iis/manage/configuring-security/use-request-filtering#filter-based-on-file-extensions has some documentation on configuring it.
/cc @shirhatti \ @jkotalik
Yeah that seems correct. IIS interprets test.master as an extension rather than a path. As @pranavkm mentioned, you can configure which extensions you allow through IIS.
Closing as answered.
@pranavkm Thanks for the quick and detailed answer.
So to make it work either I have to change the IIS configuration on the server or I have to change the endpoint to accept a parameter as a query string.