Mar 31
VN:F [1.6.7_924]
Rating: 7.0/7 (1 vote cast)
Asp.net configuration file, web.config (machine.config at server level) applies to the directory in which it appears and all sub – directories. The configuration file hierarchy for a Asp.net site goes as shown below.

Here is a link where you can read more about web.config inheritance. While settings are inherited from the higher level of configuration file, child configuration files are always permitted to override them. Inheritance downward is useful for applying a unique settings for all applications on server but in certain situation a higher config file may want to prevent inheritance in child applications. This can be achieved by using the <location> element as follows.
<location path="." inheritInChildApplications="false">
<system.web>
...
...
</system.web>
</location>
The above code can prevent inheriting the <system.web> element in this case, into the child web application. Please note that this piece of code should be placed in the parent’s web.config file.
Tagged with: Asp.Net • Configuration • How to • Web.config
Oct 30
VN:F [1.6.7_924]
Rating: 6.0/7 (1 vote cast)
If you install IIS after .Net 2.0 or Visual studio 2005, you may receive “Failed to access IIS metabase” error. To resolve this issue either you need to install .Net framework again after IIS or you can do the following…
You can use the aspnet_regiis utility comes with .Net framework 2.0. This is an administrator utility to install or uninstall Asp.Net on local server/machine. To run this utility through command prompt move to C:\Windows\Microsoft.Net\Framework\v2.0.50727 and type (without quotes)
“aspnet_regiis -i ”
This will install the ASP.Net and update and upgrade the scriptmaps at the IIS metabase root and in below the root. In certain cases, a particular user account doesn’t have access to IIS metabase. Such condition will result the same error. However, in this case you can simply grant access to user account using…
“aspnet_regiis –ga (user_account_name)”
Tagged with: Asp.Net • Error • IIS
Oct 25
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)
Recently, I have joined NIIT Technologies Ltd, New Delhi (http://www.niit-tech.com/). It’s well known around the world for its remarkable software services in Travel and Transport domain. It’s been few weeks since I have joined but no project allocated to me yet. So I decided to brush up my skills and drill down in State Management Techniques in ASP.Net. I have planned to cover it all gradually. I have started with ViewState, here are some important points about it.
View state is state management technique at the page level. (between the round-trips on same aspx page.)
Veiw state save the information by serializing it into base64 encoded strings.
View state can be saved in another location such as SQL server database by implementing the cusom PageStatePersister class
You can save the information in ViewState (is a dictonary containing key/values pair) between page round trips.
View state data is first converted in to XML and then encoded using base64 encoding.
View State can store following types of objects:
Strings
Integers
Boolean values
Array objects
ArrayList objects
Hash tables
Custom type converters (see the TypeConverter class for more information)
(To store other types of objects class must be compiled with Serializable attribute.)
MaxPageStateFieldLength (page attribute) specifies the amount of maximum data that can be stored in viewstate. The page split viewstate into multiple hidden fields if the data exceed this limit.
Changes to view state can be made until the PreRenderComplete event. It means that once a page is rendered changes to viewstate will not be saved.
More about ViewState
Tagged with: Asp.Net
Aug 16
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)
Finally, much awaited dasBlog v2.0 is released. I have been waiting this for a long time. The new version can now be hosted on ASP.Net 2.0 with Medium Trust. (download dasblog v2.0)
In the past, dasBlog can be hosted on Asp.Net 2.0 but only with Full Trust. This limitation of dasBlog create hosting issues as most of hosting companies doesn’t allowed .Net applications to run with Full Trust for security sake. Those who have faced this trust problem know what this new version mean (figured out in my previous post.) This release completely supports Asp.Net 2.0. Now I can integrate those application which I wanted to but couldn’t due to the version incompatibility.
Umm, I got some work this weekend.
Tagged with: Asp.Net • dasBlog • Medium Trust • Release • Update
Aug 14
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)
Points to remember about APP_CODE Directory
- Asp.net handles the files in bin and app_code folder in a special way.
- The compiled classes (dll) placed in bin folder are automatically available to all the pages in application. We don’t need to register the assemblies to use them. Asp.net automatically detects the new version of assembly and start using the new one.
- Assemblies in the bin folder have application scope. They cannot access the resources outside the current web application.
- The access levels of assemblies are determined by the trust level specified by the local computer.
- By default code run in full trust under visual studio development environment.
- We can store and create as many folder and files (class files) in app_code folder. But Asp.net still compile all in a single assembly.
- As Asp.net compiles all the code (App_code) in a single assembly, all files must be of same programming language. Ex – App_Code folder cannot contain code in both VB.Net and C#. However we can make settings in web.config to configure the code subdirectories in different compliable units. The configuration is specified by creating a “codeSubDirectories” element in the compilation element of the Web.config file. Ex –
<compilation debug=”false”>
<codeSubDirectories>
<add directoryName=”VBCode” />
<add directoryName=”CSCode” />
</codeSubDirectories>
</compilation>
Tagged with: App_Code • Asp.Net • Assemblies • Bin • codeSubDirectories • Dll • Special folders • Web.config
Apr 08
VN:F [1.6.7_924]
Rating: 0.0/7 (0 votes cast)
Ado.Net provides much more than just retrieving and submitting data. We can create in memories representation of tables. This is not limited we can define the Parent and Child relation between those tables. My New article will show how to use Data Relation between two Data Tables to show the records on the basis of Master Child relationship.
Tagged with: Asp.Net • Garage Code
Recent Comments