Hi,
How to remove Sever:Microsoft-IIS/10.0 on Response level using C#.
Regards,
Pratik
Hi,
How to remove Sever:Microsoft-IIS/10.0 on Response level using C#.
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
Amit MohantyRank #112 · 20K reputationPosted Nov 8, 2023, 7:48 AM EST
Try this: Use the
Application_PreSendRequestHeadersevent in your Global.asax.cs file to modify the response headers.protected void Application_PreSendRequestHeaders() { Response.Headers.Remove("Server"); // Remove the Server header Response.Headers.Add("Server", "YourCustomServerName"); // Change the Server header to your custom value }