Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/cache.php on line 36

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-includes/theme.php on line 507

Deprecated: Assigning the return value of new by reference is deprecated in /home/tryangle/public_html/blog/wp-content/plugins/codesnippet/codesnippet.php on line 248
Tryangled Dev » 2008 » October » 10

Archive for October 10th, 2008

Master Pages and CSS StyleSheets

Friday, October 10th, 2008

A common problem that often arises from using Master Pages is the confusion about how to reference a CSS StyleSheet from a page within a Master Page. The problem is that the <head> section of the markup is located in the Master Page, so the reference to the StyleSheet cannot be made… seemingly. The trick is to add some code to the Page Load event of the page that need access to the StyleSheet.

This little snippet of code comes in handy during these situations:

Dim link As New HtmlLink
link.Href = “LocationOfMyStyleSheet.css”
link.Attributes.Add(HtmlTextWriterAttribute.Rel.ToString(), “stylesheet”)
Page.Header.Controls.Add(link)

Posted by

Advantages of ASP.NET

Friday, October 10th, 2008

A single CLR operating system process can contain multiple application domains. There are advantages to having application domains within a single process.

1.

Lower system cost - many application domains can be contained within a single system process.
2.

Each application domain can have different security access levels assigned to them, all within a single process.
3.

Code in one AppDomain cannot directly access code in another AppDomain.
4.

The application in an AppDomain can be stopped without affecting the state of another AppDomain running in the same process.
5.

An Exception in on AppDomain will not affect other AppDomains or crash the entire process that hosts the AppDomains.

Posted by

AppDomain concept in ASP.Net

Friday, October 10th, 2008

Asp.Net introduces the concept of an Application Domain which is shortly known as AppDomain. It can be considered as a Lightweight process which is both a container and boundary. The .NET runtime uses an AppDomain as a container for code and data, just like the operating system uses a process as a container for code and data. As the operating system uses a process to isolate misbehaving code, the .NET runtime uses an AppDomain to isolate code inside of a secure boundary.

The CLR can allow the multiple .Net applications to be run in a single AppDomain.

The CLR isolates each application domain from all other application domains and prevents the configuration, security, or stability of a running .NET applications from affecting other applications.An AppDomain can be destroyed without effecting the other Appdomains in the process.

Mulitple Appdomains can exist in Win32 process. As we discussed the main aim of AppDomain is to isolate applications from each other and the process is same as the working of operating system process. This isolation is achieved by making sure than any given unique virtual address space runs exactly one application and scopes the resources for the process or application domain using that address space.

Win32 processes provide isolation by having distinct memory addresses. The .Net runtime enforces AppDomain isolation by keeping control over the use of memory. All memory in the App domain is managed by the run time so the runtime can ensure that AppDomains Do not access each others memory.

Posted by