You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Request/responseInspector middleware for ASP.NET Core. like Glimpse.
Rin captures HTTP requests to ASP.NET Core app and provides viewer for captured data. It's useful tool to debug your Web application (e.g. Web sites, API apps).
✅ Features
Capture requests and responses
Rin captures HTTP traffics between the ASP.NET Core app and any clients.
You can replay a request easily using cURL and LINQPad.
Save request/response body
Copy request as cURL and C#
Integrate with ASP.NET Core MVC
Record timings of view rendering and action execution
In-View Inspector (like MiniProfiler)
📝 Requirements
.NET Core 3.1+
ASP.NET Core 3.1+
Modern browser (e.g. Microsoft Edge, Google Chrome, Firefox, Safari...)
WebSocket connectivity
⚡ QuickStart
Install NuGet Package
Using Visual Studio
Dependencies ->Manage NuGet Packages... -> Search and installRin andRin.Mvc (if your project is built with ASP.NET Core MVC) package.
Using dotnet command
dotnet add package Rindotnet add package Rin.Mvc
Using Package Manager
Install-Package RinInstall-Package Rin.Mvc
Setup and configure Rin
Program.cs
publicstaticIWebHostBuilderCreateWebHostBuilder(string[]args)=>WebHost.CreateDefaultBuilder(args).ConfigureLogging(configure=>{// Add: Enable Rin Loggerconfigure.AddRinLogger();}).UseStartup<Startup>();
Startup.cs
publicclassStartup{ ...publicvoidConfigureServices(IServiceCollectionservices){ ...services.AddControllersWithViews()// Add(option): Enable ASP.NET Core MVC support if the project built with ASP.NET Core MVC.AddRinMvcSupport();// Add: Register Rin servicesservices.AddRin();} ... public voidConfigure(IApplicationBuilderapp,IHostingEnvironmentenv){if(env.IsDevelopment()){// Add: Enable request/response recording and serve a inspector frontend.// Important: `UseRin` (Middlewares) must be top of the HTTP pipeline.app.UseRin();// Add(option): Enable ASP.NET Core MVC support if the project built with ASP.NET Core MVCapp.UseRinMvcSupport();app.UseDeveloperExceptionPage();// Add: Enable Exception recorder. this handler must be after `UseDeveloperExceptionPage`.app.UseRinDiagnosticsHandler();} ...}}
_Layout.cshtml (for ASP.NET Core MVC)
@injectRin.Mvc.View.RinHelperServiceRinHelper... <environmentinclude="Development"> <linkrel="stylesheet"href="~/lib/bootstrap/dist/css/bootstrap.css" /> <linkrel="stylesheet"href="~/css/site.css" />@* Add: Enable In-View Inspector for ASP.NET Core MVC*@@RinHelper.RenderInViewInspector() </environment>...
Start the application and open Inspector on the web
Launch the app, then openhttp://[Host:Port]/rin/ in the browser, you can see Rin Inspector now.
🔨 Develop and build Rin Inspector (client side)
Rin Inspector (client side) codes is separated from Rin core C# project. If you want to develop Rin (C#) or launch a sample project, you need to build and deploy the artifacts.
[Rin.Frontend, Rin.Mvc.Frontend] Setup and start the development server