私はこれを理解しようとしていますが、私の問題に対する答えが見つかりません。私が抱えている問題は、次の URL にあります。
localhost:343434/Lev/Details/1/4/CON/2
この URL は「'/' アプリケーションでのサーバー エラー」を返します。私のアクションがこれらのパラメーターを含む値を返すことはわかっています。
ただし、同じルートを使用し、他のパラメーターを使用する場合:
localhost:343434/Lev/Details/3/4/FHS/5
アクションを呼び出して結果を返します。「'/' アプリケーションのサーバー エラー」は、「CON」を使用している場合にのみ表示されます。
出力は次のとおりです。
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Lev/Details/1/4/CON/2
そして、これが私のルートです:
routes.MapRoute(
"LevRoute",
"{controller}/{action}/{id}/{source}/{levtyp}/{Levid2}/{page}/{order}",
new { controller = "Lev", action = "Details", page = UrlParameter.Optional, order = UrlParameter.Optional }
);
事前に助けてくれてありがとう!