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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit KumarPosted Oct 25, 2023, 1:16 PM
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/
Pratik DholuPosted Oct 25, 2023, 12:16 PM
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"); }
Vishal JoshiPosted Oct 25, 2023, 12:12 PM
Add the above to your global.asax.cs file
Thanks
Vishal Joshi