Hi,
How to remove Server: ASP.NET Development Server/11.0.0.0 header on responce level.
below screenshort.

Kindly help me
Regards,
Pratik
Hi,
How to remove Server: ASP.NET Development Server/11.0.0.0 header on responce level.
below screenshort.

Kindly help me
Regards,
Pratik
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vishal JoshiRank #377 · 6.7K reputationPosted Oct 25, 2023, 8:12 AM EDT
protected void Application_PreSendRequestHeaders() { Response.Headers.Remove("Server"); Response.Headers.Remove("X-AspNet-Version"); Response.Headers.Remove("X-AspNetMvc-Version"); }Add the above to your global.asax.cs file
Thanks
Vishal Joshi
Pratik DholuRank #7,836 · 233 reputationPosted Oct 25, 2023, 8:16 AM EDT
I have added below code on global.asax. it is not effected.
protected void Application_PreSendRequestHeaders() { Response.Headers.Remove("Server"); Response.Headers.Remove("X-AspNet-Version"); Response.Headers.Remove("X-AspNetMvc-Version"); }
Amit KumarRank #459 · 5.4K reputationPosted Oct 25, 2023, 9:16 AM EDT
Hi Pratik,
For remove the HTTP headers there are many ways but below url is perfect for you. Please go through the C# corner article. It will help you.
https://www.c-sharpcorner.com/UploadFile/63e78b/remove-unwanted-http-headers-in-Asp-Net/