I faced a problem with passing filename including extension to Service Stack method. Here is what I want to achieve:
[Route("/files/{FileName}")]
public class GetFile : IReturn<Stream>
{
public string FileName { get; set; }
}
As a FileName I need to pass something like "SomeFile.extension". I tried
[Route("/files/{FileName}.{Extension}")]
public class GetFile : IReturn<Stream>
{
public string FileName { get; set; }
public string Extension { get; set; }
}
with no luck also. As a response I get
HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Does anyone know how to allow file extensions in Service Stack routes?
Thank you in advance.