ASP.NET 1.1 to ASP.NET 2.0 Migration Solutions
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>
3. 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"/>
软件开发网 http://www.zjjv.com/
4. 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>
软件开发网 http://www.zjjv.com/
</httpCompress> 软件开发网 http://www.zjjv.com/
The difference between 4 and 5 is IIS 6.0 uses GZIP as compression algorithm as compared to previous version which used “deflate”
6. If nothing works fine check Internet Information Services
o Navigate to your web site virtual directory
o Right click on your web site and click on “Properties”.
o Select “Directory” tab
o Click on “Configuration” button and then select “Mapping” tab.
o 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. 软件开发网 http://www.zjjv.com/
o 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 软件开发网 http://www.zjjv.com/
Verbs: select Limit To - GET, HEAD, POST, TRACE 软件开发网 http://www.zjjv.com/
Script Engine - Checked
Check that file exists – Unchecked
Apply it and Restart your IIS and Check application works or not.
软件开发网 http://www.zjjv.com/
Problem:
On Migration from ASP.NET 1.1 to ASP.NET 2.0 we cannot read the values from the Read Only textboxes.
Solution 软件开发网 http://www.zjjv.com/
In Page Load () event place the following code 软件开发网 http://www.zjjv.com/
If you have the read only textbox with ID as “txtReadOnly”
C#
软件开发网 http://www.zjjv.com/
txtReadOnly.Text = Request [this.txtReadOnly.UniqueID];
VB.NET 软件开发网 http://www.zjjv.com/
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>