Browser Autocomplete Triggers .NET Action Method

I’m having an odd problem while developing a .NET 6 web app on Azure. In the app, we use a traditional MVC model (i.e., not Razor Pages). For the purpose of testing, we created a sample “TestingController” that we’re going to delete before moving to production (I understand that this is maybe not the ideal testing method, but this is an internal app and everything is pretty tightly integrated).

Anyway, this TestingController has an action method, Documents(), that takes a handler from the services, an id route parameter, and a docid. I was testing the code triggered by this endpoint when I noticed some odd behaviour. Whenever I go to enter the route it my browser by typing / after the base URL, it autocompletes as expected. However, as soon as the route autocompletes it will call the controller action. Keep in mind, this is before I hit Enter or send any requests. Meaning, by the time I do hit Enter, it will be sending the request for the second time. It only happens the first time it autocompletes, and apparently only right after launching the app. It happens consistently but it’s hard to reproduce in other scenarios. It doesn’t appear to be happening to the other routes from what I can tell.

The first time this happened to me, I thought that maybe it was probing the route or something along those lines, maybe for controller discovery or some internal .NET black box that I don’t know about, and somehow it just triggered the breakpoint. But, I can confirm that it is executing the code, because if I put a “Hello, World”, for example, it will print to the console.

Oddly enough, this has happened to me in a different app before, and to this day have not found a suitable answer. The only commonalities I can think of is that both of the autocompleted URLs have query parameters in them. This happens in multiple browsers (I haven’t tried Firefox though). I took a video of it happening but I cannot share it since it has some company information in it.

My best guess was Browser Link in Visual Studio, but I turned that off and it still happens. The only other thing I can think of is, in Chromium-based browsers, when you type in the search bar (the “Omnibox”), it makes two calls to internal SQLLite databases to get the history information. However, I don’t think that would do any preliminary calls to the server or anything. At first I thought it was prefetching the page before you send the request or something to save load time, but that’s just random conjecture. My colleague suggested response caching, but in the same vein, I don’t know if that would make a call directly to the server, I don’t know though. The other methods in the controller have an [HttpGet] with the template (route) string, the one that’s triggering twice has the [HttpGet] only, could that affect anything?

Any idea what could be causing this mysterious behaviour? I obviously don’t want code executing just by typing in URL and not sending the request…

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật