Re: Error executing version of Net Framework



Steven Cheng Wrote,

If there is anything else we can help, please feel free to followup in the
newsgroup.

---

Hi Steven.

Actually there is something that confused us.
we are trying to improve the performance of the application.

For simplicity sake, let me create some simple illustration(fictious sample)

- 1 table ( ID,Customer Name, Country,Description)
- 1 dropdownlist for filtering. ( showing all the country in the world)
- 1 list box for showing the list of available data. (value = ID , Text =
Customer Name)
- 1 text box for showing data ( show the description of the Customer)

A. When someone select a value from dropdownlist, ie Japan, the application
will select records with that criteria and populate the listbox with the data
( ID and Customer Name - from Japan)
B. when someone select a value from the list box, the application will show
the description of the customer.


First Attempt:
At our first web form, form1, when someone clicked on the listbox,
application will get it from the database server based on the ID and show the
description on the text box. We are using datareader to get the data. So
the application will always try to connect to the server to get the data.

Actually there is nothing wrong with the application until someone comments
about the slow response from the server.

Second Attempt:
Based on that complaint, I create another approach.

A I create data adapter and dataset.
B. After someone select a value from the dpl ( dropdownlist),ie Japan,
application will populate the listbox with customers from Japan and
fill the dataset with all the customer from Japan.
C. When someone click the list box, instead of connecting to the server, now
the application
try to get the customer description from the dataset.

' gDs = global dataset

Dim dt As DataTable = gDs.Tables("tblCustFilter")

For Each row As DataRow In dt.Rows
For Each col As DataColumn In dt.Columns
' Show the selected description user chosen from listbox
If row("ID") = Me.lstCustList.SelectedItem.Value Then
Me.txtDescription.Text = row("Description")
End If
Next
Next

At this attempt, I think I have created disconnected recordset.
The idea is not to connect to server all the time and use that XML
representation of the table

This approach is also run without any trouble.
I don't see any increase performance on this second approach.
Then I come up with the idea by setting the property of the listbox of
AutoPostback = false
It did not give the value I expected. I come up with the third approach.

Third Attempt:
A. I set the listbox property of AutoPostback = false
B. I add a button
then when some one click the button, the application will get the data
from dataset.

Dim dt As DataTable = gDs.Tables("tblCustFilter")
dim flgfound as boolean
flgFound = false

For Each row As DataRow In dt.Rows
For Each col As DataColumn In dt.Columns
' Show the selected description user chosen from listbox
If row("ID") = Me.lstCustList.SelectedItem.Value Then
Me.txtDescription.Text = row("Description")
flgFound = true
End If

Next
' After the value is found then get out
if flgFound then exit for
Next

Questions?

I think that the second approach took longer than the first.
I don't see any increase performance on the third attempt even I set the
autopostback = false
and set the button property of usesubmitBehaviour= false
I think I still like the first approach because it needs only one click.

1. How do I increate the performance of the application ?
2. Why the third attempt did not show any increase performance ?


Anybody has any tips to improve performance ?

Thanks for reading this rather lengthy description.

Hermawih
----

"Steven Cheng[MSFT]" wrote:

Hello Hermawih,

For ASP.NET web application, the runtime version configuration is
controlled by the IIS applicatoin virtual directory's service extension
mapping. Since you're using a public web hoster, I suggest contact the web
hoster to adjust the ASP.NET version of your application's virtual
directory. Based on the error message you mentioned in the first reply,
the virtual directory's extension mapping is not correctly configured as
ASP.NET 2.0.

BTW, the following configuratino schema is for non-ASP.NET application(such
as console, winform....).

<configuration>
<startup>
<supportedRuntime version="v2.0.5072"/>
<supportedRuntime version="v1.1.4322"/>
</startup>
</configuration>

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.


.


Loading