ASP.NET 1.1 to ASP.NET 2.0 Migration Solutions


By Kiran Kawalli
Printer Friendly Version
  

This article will highlight some of the asp.net 1.1 to 2.0 migration issues.



Problem:

'Webform_Postbackoptions is undefined’ errors in ASP.NET 2.0

(Mostly occurs when migrated from ASP.NET 1.1 to ASP.NET 2.0

 And on click of any submit button (link button))

 
Solution
 
  • If Compression Module is used in application

 

    1. Open application configuration file web.config file located under root directory.
    2. Search for tag <httpModules> on successfully finding the tag full <httpModules> section looks as below

<httpModules>                       

<add name="CompressionModule"

                type="blowery.Web.HttpCompress.HttpModule, blowery.web.HttpCompress"/>                       

<add name="UehHttpModule"

                type="ASPUnhandledException.UehHttpModule, ASPUnhandledException"/>

</httpModules> 

 

    1. If Compression module is not required then comment the following tag and check the application whether it runs without any errors

      The tag to be commented is below

      <add name="CompressionModule"

                type="blowery.Web.HttpCompress.HttpModule, blowery.web.HttpCompress"/>  

 

    1. If Compression module is really required then

      Without commenting just add this tag outside

 <system.web> tag.                       

<httpCompress preferredAlgorithm="deflate" compressionLevel="high">

<excludedMimeTypes>

<add type="image/jpeg"/>

<add type="image/gif"/>

</excludedMimeTypes>

<excludedPaths>

                <add path="WebResource.axd"/>

</excludedPaths>

</httpCompress>

 

5.       If Internet Information Services version is 6.0  then add the following

       Without commenting just add this tag outside

 <system.web> tag                       

<httpCompress preferredAlgorithm="gzip" compressionLevel="high">

<excludedMimeTypes>

<add type="image/jpeg"/>

<add type="image/gif"/>

</excludedMimeTypes>

<excludedPaths>

                <add path="WebResource.axd"/>

</excludedPaths>

</httpCompress>             

 

The difference between 4 and 5 is IIS 6.0 uses GZIP as compression algorithm as compared to previous version which used “deflate”

 

    1. If nothing works fine check Internet Information Services
      • Navigate to your web site virtual directory
      • Right click on your web site and click on “Properties”.
      • Select “Directory” tab
      • Click on “Configuration” button and then select “Mapping” tab.
      • Search for entry of extension .axd if entry already exists, double click on the extension and ensure that “Check that file exists” checkbox is unchecked. Click on “Ok” button. Click on”Apply” button, Restart your IIS and check whether application works fine.
      • If extension is not found we need to add the extension click on “Add” button and in the popup window enter the following details.

      Executable -                                  c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll

                  Extension - .axd                                 

      Verbs: select Limit To - GET, HEAD, POST, TRACE

      Script Engine - Checked

     Check that file exists – Unchecked

      Apply it and Restart your IIS and Check application works or not.

 

Problem:

 

On Migration from ASP.NET 1.1 to ASP.NET 2.0 we cannot read the values from the Read Only textboxes.

 

Solution

 

In Page Load () event place the following code

 

If you have the read only textbox with ID as “txtReadOnly”

 

C#

txtReadOnly.Text = Request [this.txtReadOnly.UniqueID];

 

VB.NET

txtReadOnly.Text = Request (Me.txtReadOnly.UniqueID)

 

 

Problem:

 

On Migration from ASP.NET 1.1 to ASP.NET 2.0 we cannot find the events attached To Data grid will not be visible in Properties Window even though there are events at the code behind.

 

Solution

 

To solve this problem, all you need to code the events manually as below:

The reason is you can still live on with that. Just if you are a new developer for the project, you will be confused on this one and have questions in mind like

“If there are no events in the Properties Window, I assume the events at the code behind are useless, maybe the previous developer did not clean up his messy code?”

 

// Add the code in bold

 

 

 

 

<asp:DataGrid id="dtgAssoc" Width="100%" AllowPaging="True" CssClass="dgStyle" BorderColor="Navy" runat="server" AutoGenerateColumns="False"AllowSorting="True"                OnPageIndexChanged="dtgAssoc_PageIndexChanged">   <AlternatingItemStyleCssClass="dgAlternatingItem"></AlternatingItemStyle>         <HeaderStyleCssClass="dgHeader"></HeaderStyle>




button
 
Article Discussion: ASP.NET 1.1 to ASP.NET 2.0 Migration Some Issues problems and solutions
Kiran Kawalli posted at 13-Jun-07 02:22
Original Article

 
Webform_Postbackoptions is undefined
Yurets Student replied to Kiran Kawalli at 05-Sep-07 10:21
Problem: 'Webform_Postbackoptions is undefined’ errors in ASP.NET 2.0 (Mostly occurs when migrated from ASP.NET 1.1 to ASP.NET 2.0 And on click of any submit button (link button))

I find solution on this site, but Compression Module is NOT used in my application.

Who help me?