久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

ASP.NET MVC:如何使用 .(期間)結(jié)束

ASP.NET MVC: How to Route Search Term with . (Period) at the end(ASP.NET MVC:如何使用 .(期間)結(jié)束)
本文介紹了ASP.NET MVC:如何使用 .(期間)結(jié)束的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

限時(shí)送ChatGPT賬號(hào)..

當(dāng)我嘗試發(fā)出搜索詞以 .(句點(diǎn))結(jié)尾的請(qǐng)求時(shí),我從 .Net MVC 收到 404 響應(yīng).這是我正在使用的路線(xiàn):

I get a 404 response from .Net MVC when I try to make a request where my search term ends with a . (period). This is the route that I'm using:

routes.MapRoute(
                "Json",
                "Remote.mvc/{action}/{searchTerm}/{count}",
                new { controller="Remote", count=10}
            );

在搜索詞中帶有 . 的搜索工作正常,只是不能以它結(jié)束.有關(guān)如何路由此搜索請(qǐng)求的任何想法?

The search works fine with a . inside the search term, it just cannot end with it. Any thoughts on how to route this search request?

推薦答案

我已經(jīng)解決了一個(gè)類(lèi)似的問(wèn)題(我遇到了/music/R.E.M. 之類(lèi)的路徑問(wèn)題)我在 system.webServer/handlers 部分添加了以下行(根據(jù)您的情況進(jìn)行了調(diào)整):

I have solved a similar issue (I had trouble with paths like /music/R.E.M.) I've added the following line into the system.webServer/handlers section (adjusted for your case):

 <add name="UrlRoutingHandler" type="System.Web.Routing.UrlRoutingHandler, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" path="Remote.mvc/*" verb="GET"/>

我也注意到了,

<httpRuntime relaxedUrlToFileSystemMapping="true" />

僅當(dāng)句點(diǎn) (.) 位于斜杠中間的某處時(shí)才有效(例如/abc/de/f),并且當(dāng)句點(diǎn)看起來(lái)像文件類(lèi)型分隔符時(shí)無(wú)效(例如/abc/de/fg).

does work only if the period (.) is somewhere in the middle pair of slashes (e.g. /abc/d.e/f) and does not work when the period looks like a file type separator (e.g. /abc/de/f.g).

這篇關(guān)于A(yíng)SP.NET MVC:如何使用 .(期間)結(jié)束的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進(jìn)行身份驗(yàn)證并跨請(qǐng)求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權(quán)不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護(hù)進(jìn)程或服務(wù)器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪(fǎng)問(wèn)令牌和刷新令牌) - IT屋-程序員軟件開(kāi)發(fā)技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪(fǎng)問(wèn)令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調(diào)用時(shí) Azure KeyVault Active Directory AcquireTokenAsync 超時(shí))
主站蜘蛛池模板: 欧美日韩精品一区二区三区四区 | 欧美日韩久久精品 | 91www在线观看 | 亚洲视频中文字幕 | 天堂一区二区三区四区 | 久久久久久黄 | 国产在线视频在线观看 | 超碰在线人| 日本粉嫩一区二区三区视频 | 国产精品区二区三区日本 | 日本精品网站 | 天天草天天干天天 | 国产在线一区二区三区 | 日日夜夜天天 | 在线视频国产一区 | 免费在线播放黄色 | 国产精品中文字幕在线观看 | 日韩欧美高清 | 北条麻妃一区二区三区在线视频 | 亚洲精品久久久久久国产精华液 | 亚洲成人毛片 | 国产一二区免费视频 | 日韩欧美在线视频播放 | 国产精品免费观看 | 久久精品中文 | 成人在线视频免费看 | 免费观看黄网站 | 欧美精品久久久久久久久久 | 日韩一区二区三区在线视频 | 国产视频观看 | 久久专区 | 午夜色播 | 国产精品九九九 | 亚洲一区二区三区在线 | 亚洲国产一区二区三区在线观看 | 中文一区二区 | 久久久久久久一区二区三区 | 久在线 | 91精品国产色综合久久不卡98口 | 免费黄色录像片 | 日韩av在线一区二区三区 |