Block Malicious Bots and Spiders in web.config
Last Updated on Thursday, 13 June 2013 04:29 Written by Rodolfo Hernandez Friday, 14 June 2013 12:00
Search engines bots, crawlers and spiders helps your site getting discovered by users. However, some search engines are very aggressive and consume a lot of server bandwidth. And sometimes, bots and spiders can be malicious and try to extract sensitive data. In this article I will give you a step by step guide on How to block malicious bots and spiders in web.config
1. Open the web.config file of your site or ASP application
2. Look for the <security> tag:
Learn MoreHow to Block IP Addresses in web.config
Last Updated on Tuesday, 30 April 2013 01:54 Written by Rodolfo Hernandez Monday, 6 May 2013 12:00
If you want to restrict website access to certain IP address, you have to do it in the web.config file. The Web.config allows you to restrict access to a page, directory, all sub directories, or even the whole website. In this article I will give you a step by step guide on how to blog IP addresses in web.config
1. Open the web.config file of your project.
Learn MoreHow to Conditionally Load Google Analytics in a Web Application
Last Updated on Wednesday, 27 February 2013 08:44 Written by David Bauernschmidt Saturday, 2 March 2013 12:00
If you are a developer that uses Google Analytics in your ASP.net web applications then you know that loading up the Google Analytics in your web page should not happen when you are building the application. In the past I have always just commented out the section for Google Analytics until publishing the site. Then I would go in and uncomment the lines. This works if you do not forget to uncomment the lines in production. (This happened to me).
I decided that there had to be a better way to automatically do this. After searching the internet and pulling together prior knowledge of how an asp.net web site works I decided to use the web.config to help me. First add the following lines to your web.config production transformation file. (See here if you do not understand the transformation idea).
Learn MoreHow to Set the Default Page in web.config
Last Updated on Saturday, 16 February 2013 11:36 Written by David Bauernschmidt Saturday, 16 February 2013 12:00
On most hosted sites the vendor does not allow you to directly make changes to IIS, instead they normally give you some sort of control panel or user interface to do all that you need. The down side is that you normally have to go to each tab or screen make the change and then wait or restart IIS to see the changes. Although this is fine in most cases there are times when you constantly make the same changes to each site you deploy. Until IIS 7 you were hard pressed to do anything other than contact provider to make the changes for you.
Along came IIS 7 with the distributed configuration options. This allows you to make changes to the server without having permission to directly effect IIS. If you put these settings into a web.config file that runs on something less than IIS 7 the server will ignore these setting so you will be fine.
Learn MoreTest Email Delivery Methods in web.config Using ASP.net
Last Updated on Wednesday, 9 January 2013 11:18 Written by David Bauernschmidt Tuesday, 8 January 2013 12:00
Among the most common items in a web site is the implementation of email. There are many ways of implementing email from a web site. You can use a multitude of technologies to accomplish this. This article is not to discuss different methods but to look at one method which is asp.net. You could just set the settings (server, login, password, etc) in code and use the standard SMTP code that so many sites put together, however; I have found this to be cumbersome when you are deploying the site to production. Furthermore; after you publish to production any further testing will mingle the production emails among the testing emails. So what can you do to make this an easier transition? If you are familiar with VS 2012 transformation then you can see where I am going. If not then be prepared to learn something new today.
Learn More
Recent Comments