0

I am trying to hide my server signature Microsoft IIS:7 from my websites. I searched too much, lots of links, code suggestions and articles, but none of them works for my Asp.net MVC project. I found a suggestion here Removing/Hiding/Disabling excessive HTTP response headers in Azure/IIS7 without UrlScan

that maybe a Nuget package named NWebsec do it. I added this package to the project and and then it added some new codes to my web.config. The problem is that the project works fine in offline mode, but when I upload the published files in host server, it has error on line 24 which it is this

<authentication mode="None" />

I think it may have some conflict with something named owin which it added. Appreciate any help for this question or any other way suggested to remove my host name from my website.

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
neda Derakhshesh
  • 1,103
  • 2
  • 20
  • 43
  • Please update question with error that you are getting on line 24 – Mohsin Mehmood Jun 23 '18 at 17:49
  • @MohsinMehmood thank you very much for your care. the error is `Configuration Error` and the explain is `It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.` – neda Derakhshesh Jun 25 '18 at 08:49
  • @MohsinMehmood I did `` but still no more information for what the error is . I really need Help please – neda Derakhshesh Jun 25 '18 at 08:50
  • Is your application configured as a separate website in IIS or as a Virtual Directory or sub application under IIS website? – Mohsin Mehmood Jun 25 '18 at 08:52
  • it is a separate website in the GoDaddy host. but the host is a kind which it supports different websites and domains and one host. thank you very much. I really need help. @MohsinMehmood – neda Derakhshesh Jun 25 '18 at 08:53
  • Ok `` do you really need it? Does your website uses any authentication? You can try removing it from web.config – Mohsin Mehmood Jun 25 '18 at 09:06
  • @MohsinMehmood thank you nice suggestion. I removed it and now it has 404 Error. Page not found. let me check in offline to be sure what is the error – neda Derakhshesh Jun 25 '18 at 09:50
  • @MohsinMehmood my purpose of all these efforts is to find a way to turn my server signature off. it is Microsoft IIS 7 and I want to hide it , I appreciate any other way if it works really. I searched a lot and tried many ways but none of them works. Appreciate if you could help me in this way – neda Derakhshesh Jun 25 '18 at 09:54
  • @MohsinMehmood it works fine in offline after removing `` – neda Derakhshesh Jun 25 '18 at 10:09

0 Answers0