mvc routing generates iis 7.5 error forbidden

前端 未结 3 1099
执念已碎
执念已碎 2021-01-27 22:41

I my WebApplication I have an ASPX WebForms Page here:

~/ASPWebforms/MyFolder/Default.aspx

If I use this code:

    p         


        
3条回答
  •  天涯浪人
    2021-01-27 23:01

    Try setting up the route using one of the overloads that sets default values like so:

                routes.MapPageRoute(
                        "SomeRoute",
                        "Test/{reportname}",
                        "~/ASPWebforms/MyFolder/{reportname}.aspx",
                        false,
                        new RouteValueDictionary(new {reportname = "Default"})
                );
    

    Not massively confident it will sort your problem but with it working with your original example it could well do.

提交回复
热议问题