<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Exceptions</title>
        <link>http://geekswithblogs.net/technetbytes/category/6500.aspx</link>
        <description>Exceptions</description>
        <language>ur-PK</language>
        <copyright>Saqib Ullah</copyright>
        <managingEditor>saqibullah@msn.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <item>
            <title>(407) Proxy Authentication Required.</title>
            <link>http://geekswithblogs.net/technetbytes/archive/2007/08/11/114573.aspx</link>
            <description>&lt;font size="1" face="Verdana" color="#ff0000"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;table width="606" height="25" cellspacing="0" cellpadding="0" border="0" align="center" summary="" style="width: 606px; height: 25px;"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td&gt;
            &lt;p align="center"&gt;  &lt;span style="font-size: 8pt; font-family: 'Verdana','sans-serif';"&gt;The remote server returned an error: (407) Proxy Authentication Required.&lt;/span&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;/font&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: 'Verdana','sans-serif';"&gt;This is a very common error message when you try to get a resource on internet through your application. Why you getting this error from your application not from explorer. The reason is very simple either you use LAN that requires proxy setting or you use proxy server.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span id="_ctl0_MainContent_PostFlatView"&gt;&lt;span&gt;&lt;font size="1" face="Verdana"&gt;&lt;strong&gt;Example :&lt;/strong&gt;&lt;/font&gt; &lt;br /&gt;
&lt;table cellspacing="0" cellpadding="0" border="1" style="border: medium none ; background: rgb(221, 217, 195) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse;"&gt;
    &lt;tbody&gt;
        &lt;tr&gt;
            &lt;td width="638" valign="top" style="border: 1pt solid black; padding: 0in 5.4pt; width: 6.65in; background-color: transparent;"&gt;
            &lt;div&gt;&lt;span style="font-size: 9pt; color: teal; font-family: 'Verdana','sans-serif';"&gt;&lt;font size="1"&gt;DataSet&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: 9pt; font-family: 'Verdana','sans-serif';"&gt;&lt;font size="1"&gt; myds = &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: teal;"&gt;DataSet&lt;/span&gt;();&lt;br /&gt;
            &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(51, 153, 102);"&gt;//Set the system proxy with valid server address or IP and port.&lt;br /&gt;
            &lt;/span&gt;System.Net.&lt;span style="color: teal;"&gt;WebProxy&lt;/span&gt; pry = &lt;span style="color: blue;"&gt;new&lt;/span&gt; System.Net.&lt;span style="color: teal;"&gt;WebProxy&lt;/span&gt;(&lt;span style="color: maroon;"&gt;"172.16.0.1"&lt;/span&gt;,8080);&lt;br /&gt;
            &lt;/font&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(51, 153, 102);"&gt;//The DefaultCredentials automically get username and password.&lt;br /&gt;
            &lt;/span&gt;pry.Credentials = &lt;span style="color: teal;"&gt;CredentialCache&lt;/span&gt;.DefaultCredentials;&lt;br /&gt;
            &lt;span style="color: teal;"&gt;GlobalProxySelection&lt;/span&gt;.Select = pry;&lt;br /&gt;
            myds.ReadXml(&lt;span style="color: maroon;"&gt;"http://msdn.microsoft.com/netframework/rss.xml"&lt;/span&gt;, &lt;span style="color: teal;"&gt;XmlReadMode&lt;/span&gt;.Auto);&lt;br /&gt;
            myds.WriteXmlSchema(&lt;span style="color: maroon;"&gt;@"c:\\f.xml"&lt;/span&gt;);&lt;br /&gt;
            &lt;span style="color: blue;"&gt;this&lt;/span&gt;.GridView1.DataSource = myds.Tables[2];&lt;br /&gt;
            &lt;span style="color: blue;"&gt;this&lt;/span&gt;.GridView1.DataBind();&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;/span&gt;&lt;/span&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114573"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114573" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/technetbytes/aggbug/114573.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Saqib Ullah</dc:creator>
            <guid>http://geekswithblogs.net/technetbytes/archive/2007/08/11/114573.aspx</guid>
            <pubDate>Sat, 11 Aug 2007 14:30:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/technetbytes/comments/114573.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/technetbytes/archive/2007/08/11/114573.aspx#feedback</comments>
            <slash:comments>41</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/technetbytes/comments/commentRss/114573.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/technetbytes/services/trackbacks/114573.aspx</trackback:ping>
        </item>
        <item>
            <title>Maximum report processing jobs limit issue in Crystal Report</title>
            <link>http://geekswithblogs.net/technetbytes/archive/2007/07/17/114008.aspx</link>
            <description>&lt;span style="font-size: 8pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;This is a very common error in Crystal Report when its give this following message.&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;/span&gt;&lt;font size="1"&gt;&lt;span style="font-family: Verdana;"&gt;"&lt;/span&gt;&lt;strong style="font-family: Verdana;"&gt;The maximum report processing jobs limit configured by your system administrator has been reached&lt;/strong&gt;&lt;span style="font-family: Verdana;"&gt;."&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
&lt;span style="font-size: 8pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;I have been read about its on lot forums and new groups. &lt;/span&gt;&lt;span style="font-size: 8pt; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Its actually means that Crystal Report print job limit has been reached and you should handle this problem by increasing the job limit in the registry. The basic reason of this problem is Garbag Collector (GC) cannot clear the reference of report document in their collection process its only clear report viewer.&lt;br /&gt;
&lt;/span&gt;&lt;strong style=""&gt;&lt;span style="font-size: 8pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;font size="1" style="font-family: Verdana;"&gt;HKEY_LOCAL_MACHINE\SOFTWARE\CRYSTAL DECISIONS\10.0\REPORT APPLICATION SERVER\SERVER\PrintJobLimit&lt;/font&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;Yesterday we also facing this problem in our application and after lot of discussion in the team we find out a good solution of this problem in the form following factory class because we not facing this problem in whole application.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;
&lt;table width="636" cellspacing="0" cellpadding="0" border="1" style="border: medium none ; background: rgb(191, 191, 191) none repeat scroll 0%; width: 477pt; margin-left: 5.4pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; border-collapse: collapse;" class="MsoTableGrid"&gt;
    &lt;tbody&gt;
        &lt;tr style=""&gt;
            &lt;td width="636" valign="top" style="border: 1pt solid black; padding: 0in 5.4pt; width: 477pt;"&gt;
            &lt;p style="margin-bottom: 0.0001pt; line-height: normal; color: rgb(0, 0, 255);" class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;;"&gt;using System;&lt;br /&gt;
            using System.Collections;&lt;br /&gt;
            using System.Collections.Generic;&lt;br /&gt;
            using System.Text;&lt;br /&gt;
            using CrystalDecisions;&lt;br /&gt;
            using CrystalDecisions.CrystalReports;&lt;br /&gt;
            using CrystalDecisions.CrystalReports.Engine;&lt;br /&gt;
            &lt;br /&gt;
            namespace Test.Utilities&lt;br /&gt;
            {&lt;br /&gt;
                public class ReportFactory&lt;br /&gt;
                {&lt;br /&gt;
                    protected static Queue reportQueue   = new Queue();&lt;br /&gt;
            &lt;br /&gt;
                    protected static ReportClass   CreateReport(Type reportClass)&lt;br /&gt;
                    {&lt;br /&gt;
                        object   report = Activator.CreateInstance(reportClass);&lt;br /&gt;
                        reportQueue.Enqueue(report);&lt;br /&gt;
                        return   (ReportClass)report;&lt;br /&gt;
                    }&lt;br /&gt;
            &lt;br /&gt;
                    public static ReportClass   GetReport(Type reportClass)&lt;br /&gt;
                    {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
            &lt;p style="margin-bottom: 0.0001pt; line-height: normal;" class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: &amp;quot;Courier New&amp;quot;; color: rgb(0, 0, 255);"&gt;&lt;span style=""&gt;            &lt;/span&gt;//75 is   my print job limit.&lt;br /&gt;
                        if   (reportQueue.Count &amp;gt; 75) ((ReportClass)reportQueue.Dequeue()).Dispose();&lt;br /&gt;
                        return CreateReport(reportClass);&lt;br /&gt;
                    }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;
&lt;/table&gt;
&lt;br /&gt;
&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;You can use this&lt;/span&gt;&lt;span style="font-size: 11pt; line-height: 115%; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt; &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ReportFactory &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;class for creating ReportClass object and don’t need to call &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;explicitly &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;dispose&lt;/span&gt;&lt;span style="font-size: 11pt; line-height: 115%; font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt; &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;method on the page because &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Courier New&amp;quot;;"&gt;ReportFactory &lt;/span&gt;&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;class will automatically dispose it when count reach to 75.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-size: 8pt; line-height: 115%; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114008"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=114008" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/technetbytes/aggbug/114008.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Saqib Ullah</dc:creator>
            <guid>http://geekswithblogs.net/technetbytes/archive/2007/07/17/114008.aspx</guid>
            <pubDate>Wed, 18 Jul 2007 06:42:39 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/technetbytes/comments/114008.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/technetbytes/archive/2007/07/17/114008.aspx#feedback</comments>
            <slash:comments>41</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/technetbytes/comments/commentRss/114008.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/technetbytes/services/trackbacks/114008.aspx</trackback:ping>
        </item>
        <item>
            <title>BizTalk Rumtime Error "Biztalk Host instance because it is currently running".</title>
            <link>http://geekswithblogs.net/technetbytes/archive/2007/07/11/113882.aspx</link>
            <description>&lt;p style="font-family: Verdana;"&gt;&lt;font size="1"&gt;When I configuring my BizTalk Server 2006 on WinXP Professional I am facing another problem with the following long text.&lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;
&lt;p style="font-family: Verdana; font-weight: bold; color: rgb(255, 0, 0);"&gt;&lt;font size="1"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Exception:&lt;/span&gt;&lt;br /&gt;
You cannot request an Install, delete or change credentials operation on this Biztalk Host instance because it is currently running. You must stop the BizTalk host Instance before trying it again.&lt;/font&gt;&lt;/p&gt;
&lt;img width="646" height="529" src="/images/geekswithblogs_net/technetbytes/BizTalk/btsPrb.JPG" alt="Microsoft BizTalk Server 2006" /&gt;&lt;br /&gt;
&lt;font size="1" style="font-family: Verdana;"&gt;&lt;span style="font-style: italic;"&gt;Fig. 1 BizTalk In-Process Host BizTalkServerApplication Group.&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;font size="1"&gt;&lt;span style="font-weight: bold; font-family: Verdana;"&gt;Solution:&lt;/span&gt;&lt;/font&gt;&lt;br /&gt;
&lt;font size="1"&gt;&lt;span style="font-family: Verdana;"&gt;One of the simplest solution of this problem is to stop BizTalk Server Application Service from Services Management Console and again apply configuration this time you don't get any exception.&lt;/span&gt;&lt;/font&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113882"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113882" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/technetbytes/aggbug/113882.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Saqib Ullah</dc:creator>
            <guid>http://geekswithblogs.net/technetbytes/archive/2007/07/11/113882.aspx</guid>
            <pubDate>Thu, 12 Jul 2007 09:11:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/technetbytes/comments/113882.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/technetbytes/archive/2007/07/11/113882.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/technetbytes/comments/commentRss/113882.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/technetbytes/services/trackbacks/113882.aspx</trackback:ping>
        </item>
        <item>
            <title>Microsoft.BizTalk.Administration.SnapIn.dll.config Error</title>
            <link>http://geekswithblogs.net/technetbytes/archive/2007/07/06/113729.aspx</link>
            <description>&lt;p class="MsoNormal"&gt;&lt;span style="font-size: 8pt; font-family: Verdana;"&gt;Oh my God I am facing another problem in BizTalk Server 2006 when I open BizTalk Server Administrative Tool. I am facing the following error.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&lt;span style="color: red;"&gt;Error:&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: black;"&gt;Root element is missing. (D:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft Corporation\Microsoft BizTalk Server 2006\Microsoft.BizTalk.Administration.SnapIn.dll.config) (System.Configuration)&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: red;"&gt;Reason:&lt;/span&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;
Microsoft.BizTalk.Administration.SnapIn.dll.config is corrupted.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: red;"&gt;Solution:&lt;br /&gt;
&lt;/span&gt;&lt;span style="color: black;"&gt;Simply delete this file and run BizTalk Server Administrative tool again.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;br /&gt;
&lt;font size="1"&gt;&lt;span style="font-family: Verdana;"&gt;&lt;span style="font-weight: bold;"&gt;Note:&lt;/span&gt;&lt;br /&gt;
The next time you start the BizTalk Server 2006 Administration tool, the  Administration.Snapin.dll.config file will be auto created for you.&lt;/span&gt;&lt;/font&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113729"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=113729" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/technetbytes/aggbug/113729.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Saqib Ullah</dc:creator>
            <guid>http://geekswithblogs.net/technetbytes/archive/2007/07/06/113729.aspx</guid>
            <pubDate>Fri, 06 Jul 2007 15:22:59 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/technetbytes/comments/113729.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/technetbytes/archive/2007/07/06/113729.aspx#feedback</comments>
            <slash:comments>12</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/technetbytes/comments/commentRss/113729.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/technetbytes/services/trackbacks/113729.aspx</trackback:ping>
        </item>
        <item>
            <title>Call assembly from partial trust code</title>
            <link>http://geekswithblogs.net/technetbytes/archive/2007/04/13/111594.aspx</link>
            <description>&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;In my last blog we saw the Web application trust levels, how we configure trust level from the application. &lt;span style="COLOR: black"&gt;Strong-named assemblies must be stored in the GAC (short of global assembly cache). By default, strong-named assemblies will not grant access to partially trusted code, because of the visibility of strong-named assemblies in the global assembly cache is high&lt;/span&gt;. What going on when partial trusted application call the Full trusted assembly. If the calling assembly marks with the APTCA &lt;strong&gt;(short of &lt;/strong&gt;&lt;strong&gt;&lt;span style="COLOR: black"&gt;AllowPartiallyTrustedCallersAttribute) &lt;/span&gt;&lt;/strong&gt;attribute or calling application trust-level set to &lt;strong&gt;Full Trust &lt;/strong&gt;no security exception will throw. Applying the APTCA attribute on the assembly open the luring attacks. It is the responsibilities of the developer to careful evaluates the code and then apply the attribute. Applying the attribute to an assembly without strong-name has no effect.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;[assembly: &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;AssemblyKeyFile&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;("..\\..\\keyPair.snk")] &lt;br /&gt;
[assembly: &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;AllowPartiallyTrustedCallers&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;]&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Note: &lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Apply the above APTCA attribute on the assembly make it callable from the partial trusted caller. Any assembly with AllowPartiallyTrustedCallersAttribute only callable from the fully trusted application.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;br /&gt;
&lt;strong&gt;&lt;u&gt;&lt;font face="Verdana" size="1"&gt;Internal Working&lt;/font&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Very quick questions that come in our mind what is internally going on when APTCA attribute apply to the&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; fully trusted assembly. APTCA in an attribute that simply tell the CLR to remove the implicit LinkDemand. In CAS demand are use to ensure that every caller of the code has been granted (directly or indirectly). Stack walk plays very important role to identify the demanded permission. .Net runtime security walks the call stack, comparing the granted permission of each caller to the permission being demanded. SecurityException throw when the caller found without demanded permission in the stack walk. A Link Demand causes a security check during just-in-time compilation and checks only the immediate caller of the assembly. Permissions are checked only for the immediate caller of code so that why a complete stack walks is not performed.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;            When this type of demand is performed your will be open for luring attacks. MSDN example “If a method in assembly A is protected by a link demand, a direct caller in assembly B is evaluated based on the permissions of Assembly B. However, the link demand will not evaluate a method in Assembly C if it indirectly calls the method in Assembly A using the method in Assembly B.” The link demand apply only the permission direct callers in the immediate calling assembly must have to link to your code.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0.5in"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;When AllowPartiallyTrustedCallerAttribute attribute use on class all security checks function as intended but only block the implicit fully trusted caller demand.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;Particle&lt;/font&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Here is a simple C# class with &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;AssemblyKeyFile&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; attribute (for strong name) in the AssemblyInfo.cs. Still we do not apply &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;AllowPartiallyTrustedCallers &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;on the assembly.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;&lt;font face="Verdana" size="1"&gt;AssemblyInfo.cs file &lt;/font&gt;&lt;/span&gt;&lt;/em&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;[assembly: &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;AssemblyKeyFile&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;("..\\..\\keyPair.snk")]&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;&lt;font face="Verdana" size="1"&gt;TestAPTCA.cs file&lt;/font&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Collections.Generic;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Text;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; TestAPTCA&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;    &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;CallFromWeb&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;    {&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;        &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;string&lt;/span&gt; Hello(&lt;span style="COLOR: blue"&gt;string&lt;/span&gt; name)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;        {&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;            &lt;span style="COLOR: blue"&gt;return&lt;/span&gt; &lt;span style="COLOR: maroon"&gt;"Hello "&lt;/span&gt; + name;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;        }&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;    }&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;Compile the class and place it in GAC by using utility from visual studio .Net command prompt &lt;strong&gt;gacutil&lt;/strong&gt;. &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;e.g. &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt;gacutil-i "C:\[Projectpath]\assemblyname&lt;span&gt;.dll&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;Call Assembly for ASP.Net 2.0 web application&lt;/font&gt;&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;Create simple web application and add reference to the &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt;TestAPTCA assembly into the project. I use button and label controls on the page and here is Default.aspx class file code is below.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;em&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;&lt;font face="Verdana" size="1"&gt;Defualt.aspx.cs file&lt;/font&gt;&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Data;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Configuration;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Web;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Web.Security;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Web.UI;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Web.UI.WebControls;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Web.UI.WebControls.WebParts;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Web.UI.HtmlControls;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; TestAPTCA;           &lt;span style="COLOR: #339966"&gt;//Should Add namespace of &lt;em&gt;TestAPTCA.dll&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;public&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; &lt;span style="COLOR: blue"&gt;partial&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: teal"&gt;_Default&lt;/span&gt; : System.Web.UI.&lt;span style="COLOR: teal"&gt;Page&lt;/span&gt; &lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;{&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;    &lt;span style="COLOR: blue"&gt;protected&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; Button1_Click(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, &lt;span style="COLOR: teal"&gt;EventArgs&lt;/span&gt; e)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;    {&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: teal"&gt;CallFromWeb&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; myObj = &lt;span style="COLOR: blue"&gt;new&lt;/span&gt; &lt;span style="COLOR: teal"&gt;CallFromWeb&lt;/span&gt;();&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;        Label1.Text = myObj.CallMeFromWeb(&lt;span style="COLOR: maroon"&gt;"Saqib"&lt;/span&gt;);&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;    }&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;}&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;One last important change in the web.config file, add trust level code in the &amp;lt;system.web&amp;gt; element.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;xml&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;version&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt;"&lt;span style="COLOR: blue"&gt;1.0&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&lt;font face="Verdana" size="1"&gt;&amp;lt;!--&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;    Note: As an alternative to hand editing this file you can use the &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;    web admin tool to configure settings for your application. Use&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;    the Website-&amp;gt;Asp.Net Configuration option in Visual Studio.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;    A full list of settings and comments can be found in &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;    machine.config.comments usually located in &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;    \Windows\Microsoft.Net\Framework\v2.x\Config &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&lt;font face="Verdana" size="1"&gt;--&amp;gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;configuration&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;            &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;appSettings&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;            &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;connectionStrings&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;/&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;            &amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;system.web&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;                        &amp;lt;&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;trust&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;level&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt"&gt;"&lt;span style="COLOR: blue"&gt;High&lt;/span&gt;"&lt;span style="COLOR: blue"&gt; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&lt;font face="Verdana" size="1"&gt;                        &amp;lt;!--&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;            Set compilation debug="true" to insert debugging &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;            symbols into the compiled page. Because this &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;            affects performance, set this value to true only &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;            during development.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;             &lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;--&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: 0.5in"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;compilation&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;debug&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt;"&lt;span style="COLOR: blue"&gt;true&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&lt;font face="Verdana" size="1"&gt;...&lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;font face="Verdana" size="1"&gt;When you run the application and click the button you will get the following exception.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;Exception Details: &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;System.Security.SecurityException: That assembly does not allow partially trusted callers.&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;The solution of this exception is to add &lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: #339966"&gt;AllowPartiallyTrustedCallers&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt; attribute that is present in the System.Security namespace into &lt;em&gt;AssemblyInfo.cs&lt;/em&gt; file.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Reflection;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Runtime.CompilerServices;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Runtime.InteropServices;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;using&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt"&gt; System.Security;&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;[assembly: &lt;span style="COLOR: teal"&gt;ComVisible&lt;/span&gt;(&lt;span style="COLOR: blue"&gt;false&lt;/span&gt;)]&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;&lt;font face="Verdana" size="1"&gt;// The following GUID is for the ID of the typelib if this project is exposed to COM&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;[assembly: &lt;span style="COLOR: teal"&gt;Guid&lt;/span&gt;(&lt;span style="COLOR: maroon"&gt;"feebc2d0-6460-40cd-9894-1843f50aa1b9"&lt;/span&gt;)]&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt"&gt;&lt;font face="Verdana" size="1"&gt;[assembly: &lt;span style="COLOR: teal"&gt;AssemblyKeyFile&lt;/span&gt;(&lt;span style="COLOR: maroon"&gt;"..\\keyPair.snk"&lt;/span&gt;)]&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;[assembly: &lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: green"&gt;AllowPartiallyTrustedCallers&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;]&lt;/span&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;font face="Verdana" size="1"&gt;...&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana"&gt;&lt;font size="1"&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;Remove trust level code &amp;lt;&lt;/span&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: maroon"&gt;trust&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;level&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: blue"&gt;=&lt;/span&gt;&lt;/strong&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt"&gt;"&lt;span style="COLOR: blue"&gt;High&lt;/span&gt;"&lt;span style="COLOR: blue"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: black"&gt;&amp;gt; from the web.config file and again run the application and this time application run without error. &lt;img alt="" src="/Providers/BlogEntryEditor/FCKeditor/editor/images/smiley/msn/thumbs_up.gif" /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;strong&gt;&lt;span style="FONT-SIZE: 8pt; COLOR: red"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style="MARGIN: 0in 0in 0pt"&gt;&lt;font face="Verdana" size="1"&gt; &lt;/font&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111594"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=111594" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/technetbytes/aggbug/111594.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Saqib Ullah</dc:creator>
            <guid>http://geekswithblogs.net/technetbytes/archive/2007/04/13/111594.aspx</guid>
            <pubDate>Sat, 14 Apr 2007 04:01:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/technetbytes/comments/111594.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/technetbytes/archive/2007/04/13/111594.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/technetbytes/comments/commentRss/111594.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/technetbytes/services/trackbacks/111594.aspx</trackback:ping>
        </item>
        <item>
            <title>System.IO.FileLoadException exception</title>
            <link>http://geekswithblogs.net/technetbytes/archive/2007/04/06/110991.aspx</link>
            <description>&lt;P&gt;&lt;SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;System.IO.FileLoadException&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; exception&amp;nbsp;occur because&amp;nbsp;a managed assembly is found but cannot be loaded. FileLoadException thrown when user&amp;nbsp;and&amp;nbsp;assembly does not have necessary permission for the loading of assembly in the managed environment. When .Net running any assembly its first load into the loader and then loader check the permission against the assembly. Loader checks the assembly permission by the help of evidence. Each assembly loaded by the CLR is also assigned to one or more Machine policy level code groups based on the evidence gathered about the assembly. If in the Machine policy level does not have the permission&amp;nbsp;to&amp;nbsp;write on the C:\ drive and assembly is try load the exception FileloadException is occurred.&amp;nbsp;&lt;BR&gt;&lt;BR&gt;Another reason of this exception is when assemblies is marked with the following attributes.&lt;BR&gt;[assembly: &lt;SPAN style="COLOR: #008181"&gt;FileIOPermission&lt;/SPAN&gt;(&lt;SPAN style="COLOR: #008181"&gt;SecurityAction&lt;/SPAN&gt;.RequestMinimum,&amp;nbsp;Write = &lt;SPAN style="COLOR: #810000"&gt;"C:\\"&lt;/SPAN&gt;)] its means that whenever this assembly is load by the CLR loader its first check the FileIOPermission for assembly&amp;nbsp;by applying name &lt;SPAN style="COLOR: darkgreen"&gt;SecurityAction.RequestMinimum&lt;/SPAN&gt;. If Machine policy does not allow the write operation on the C:\ drive and CLR try to load assembly FileLoadException is occurred. RequestMinimum means that CLR first check&amp;nbsp;appropriate permissions option and then load the assembly into the loader.&lt;/SPAN&gt;&lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/P&gt;&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110991"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=110991" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/technetbytes/aggbug/110991.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Saqib Ullah</dc:creator>
            <guid>http://geekswithblogs.net/technetbytes/archive/2007/04/06/110991.aspx</guid>
            <pubDate>Sat, 07 Apr 2007 04:34:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/technetbytes/comments/110991.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/technetbytes/archive/2007/04/06/110991.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/technetbytes/comments/commentRss/110991.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/technetbytes/services/trackbacks/110991.aspx</trackback:ping>
        </item>
        <item>
            <title>System.ArithmeticException' occurred in system.drawing.dll</title>
            <link>http://geekswithblogs.net/technetbytes/archive/2006/11/18/97499.aspx</link>
            <description>I get this error when i install fresh .net framework 1.1 on my laptop. One surprise problem that i had faced is Exception coming from my System.drawing.dll. Exception is "An unhandled exception of type 'System.ArithmeticException' occurred in system.windows.forms.dll
Additional information: Overflow or underflow in the arithmetic operation." After a lot of hard search and reading lot of blogs and forums i didnt find any good solution of this unusual problem. Even MS Help and support the same problem has been reported for CLR 1.0 not for .net 1.1. 

RESOLUTION
Simplly repair yours .net 1.1 framework from control panel.
&lt;p&gt;&lt;a href="http://www.pheedo.com/click.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=97499"&gt;&lt;img src="http://www.pheedo.com/img.phdo?x=6cda6ad746d942b9a1110d0715a4fa12&amp;u=97499" border="0"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;iframe src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;PageID=31016&amp;amp;SiteID=1" width=1 height=1 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No&gt;
&lt;script language='javascript1.1' src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Browser=NETSCAPE4&amp;amp;NoCache=True&amp;PageID=31016&amp;amp;SiteID=1"&gt;&lt;/script&gt;
&lt;noscript&gt;&lt;a href="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" target="_blank"&gt;
&lt;img src="http://ads.geekswithblogs.net/a.aspx?ZoneID=5&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=31016" width="1" height="1" border="0"  alt=""&gt;&lt;/a&gt;
&lt;/noscript&gt;
&lt;/iframe&gt;
&lt;img src="http://geekswithblogs.net/technetbytes/aggbug/97499.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Saqib Ullah</dc:creator>
            <guid>http://geekswithblogs.net/technetbytes/archive/2006/11/18/97499.aspx</guid>
            <pubDate>Sun, 19 Nov 2006 02:15:00 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/technetbytes/comments/97499.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/technetbytes/archive/2006/11/18/97499.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/technetbytes/comments/commentRss/97499.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/technetbytes/services/trackbacks/97499.aspx</trackback:ping>
        </item>
    </channel>
</rss>