If you have an ASP.NET website nested under another in IIS, you will likely get a server error unless both sites have exactly the same dependencies. This is because IIS, by default, applies web.config settings hierarchically to sub-sites. You can use this fact to your advantage, to prevent you having to repeat the same settings in the child site's web.config.
However, often, you will need certain configuration settings to apply only to the parent site. To restrict specific web.config sections to apply to the parent application only, wrap the relevant sections in the parent site's web config file within:
<location path="." inheritinchildapplications="false">
// your configuration sections
</location>
You can have as many of these location tags in your web.config as you like.
Note: Visual Studio 2005 will throw an error on the inheritInChildApplications attribute. To get round this you will need to add your location elements to web.config after you publish the site (or use VS 2008)
Thursday, 29 October 2009
Thursday, 9 April 2009
MS SQL Server How To - Creating relationships in a database diagram
This one had me scratching my head for 5 minutes, so I thought I would share it.
If you want to create relationships in your SQL Server 2005 database diagram:
If you want to create relationships in your SQL Server 2005 database diagram:
- Right-click the table that contains the foreign key (FK) in the forthcoming relationship.
- To create the relationship, click the ellipsis (...) box to the right of "Tables and Columns Specification". (This is quite hard to see.)
- In the Tables and Columns dialog, you can now select the tables, FK, and PK (Primary Key) that will participate in the relationship.
Monday, 19 January 2009
Empty div height issues in IE6
Sometimes your website will need to use empty divs for display purposes - e.g.: showing an image to make the top/bottom of an element look curved.
Typically, you would use an empty div, and set it's background image in css; but for floated or cleared elements, height is ignored. IE6 assumes that the element has text inside it, causing it to be slightly taller than the curved-top bg-image.
To correct this, explicitly set font-size:0; in css for the element with the curved bg-image.
Note - you must use an end tag to avoid any problems with the left or right padding. E.g.:
<div id="container_top_curve"></div>
Typically, you would use an empty div, and set it's background image in css; but for floated or cleared elements, height is ignored. IE6 assumes that the element has text inside it, causing it to be slightly taller than the curved-top bg-image.
To correct this, explicitly set font-size:0; in css for the element with the curved bg-image.
Note - you must use an end tag to avoid any problems with the left or right padding. E.g.:
<div id="container_top_curve"></div>
Labels:
Debugging,
Internet Explorer
Subscribe to:
Posts (Atom)