0

I want to increase size of web.config file from 250KB without changing the registry key. I'm running a Windows Azure Website, so I can't change the registry key (correct me if I'm wrong).

I've already split up the main web.config file using configSource on ipSecurity (the reason for the size of the file is a large list of IP addresses.)

QUESTION ONE:

Does splitting up the web.config file get around the 250KB limit, or do all the bits added together have to be less than or equal to 250KB. If the former is true, is it possible to split ipSecurity into smaller chunks?

QUESTION TWO:

The size of the file containing the contents of ipSecurity is 536KB. It contains about 9100 IP address ranges. What are the impacts of having a web.config file this big?

QUESTION THREE:

How does one increase size of web.config file from 250KB without changing the registry key?

QUESTION FOUR:

Is there a simpler way to allow or deny access to a country for a Windows Azure Website than a large web.config file of IP address ranges?

nmit026
  • 3,024
  • 2
  • 27
  • 53

1 Answers1

1

First: only 1 question per question on S.O. please.

No, you can't change a registry key when using App Service. If you want to do so, you need to use a Virtual Machine.

But why store all these IPs in the config file? Have you tried saving them in a database and validating in code? This question shows how to get the user IP address in code: How can I get the client's IP address in ASP.NET MVC?

CSharpRocks
  • 6,791
  • 1
  • 21
  • 27
  • Bummer. It's a list of IP address ranges I need to deny/allow access to. If I can't use the web.config file, which is easier and more convenient, I guess I'm looking at getting those IP addresses into the DB and then checking them against the request IP address in an HTTP module. Not sure how much slower that will be (will run on _every_ request). Will have to test. Maybe I'll look at switching to a Cloud Service instead of a Web App. What do you think? – nmit026 Dec 12 '17 at 20:11