WebForm_PostBackOptions Error

B

Brad

Per one of Microsoft's conversion suggestions (MSDN step by step guide to
converting web projects) we have configured our test web servers to run
ASP.NET apps using 2.0.....but we are still developing the apps in VS2003/
ASP.Net 1.1.

Though I've found this isn't quite the "quick switch" one is lead to believe
I've managed to work through all issues...but one. The one problem is that
on clicking a post back button I'm getting the error:
"WebForm_PostBackOptions is undefined".
The button works, and I still get the postback, but I get the above error
before the postback.

After googling the problem I have checked a few things.
-- This is happening on multiple web servers so it's not an isolated machine
issue.
-- We are not using any type of http / html compression.
-- The webresource.axd file in the html source of one app scenario is as
follows (the app locaiton is under http://Staging/Parks)
<script
src="/Parks/WebResource.axd?d=_oXdTc3t5DrUiza5HLkqig2&amp;t=632687833518115886"
type="text/javascript"></script>
-- This only seems to happen (so far) once per browser session for the web
app. The error does not reappear until I open a new browser session
(either that or my testing is not consistent).
-- This only happens on the web servers (W2k3 IIS6). If I map IIS on my
local box (also W2k3 IIS6) to use ASP.NET 2, I cannot duplicate the
problem.

Again this is a VS2003 .Net 1.1 application deployed to web servers mapped
to use 2.0


FYI - for those reading the other issue I found and worked around has to do
with 1.1 3rd party callback controls. I was getting event validation
errors and worked aorund this by using the new config setting <pages
enableEventValidation="false"/>


Brad
 
Y

Yuan Ren[MSFT]

Hi Brad,

Thanks for your posting!

After my research, I think this is caused by known issue for ASP.NET v2.0.
Below is work around:
- Always include the WebForms.js file. This is a big rendering change.
- Modify all of our controls that may need it so that they ask for the
WebForms.js file to be rendered during PreRender. This solves the problem
for our controls (with a smaller rendering change), does not include the
file when unnecessary (most of the time, some cases can't be predicted that
early) but third party controls would need to do the same.

If the problem still occurs, I suggest you send a simple project as zip
format to me. It'll help me to repro and do some feather research. Thanks
for your understanding! My alias is (e-mail address removed) (remove
.online).

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 
B

Brad

Yuan -
If I may follow up:
(1) This is a VS2003 / ASP.NET 1.1 code I am deploying (server just runs it
as 2.0). The googling I've done on WebForms.JS all refer to code change I
would make in 2.0 for embeded resource. Can I change 1.1 code, and if so
what do I add/change in 1.1. code? Or am I out of luck until I upgrade the
app to 2.0?

(2) Why does this error occur on the server but not on my pc? Both are
win2k3, IIS6, have the same version of 1.1 and 2.0 frameworks installed (and
I don't have VS2005 installed). Should something like this not consistently
work, or fail, on any pc?

Brad


Hi Brad,

Thanks for your posting!

After my research, I think this is caused by known issue for ASP.NET v2.0.
Below is work around:
- Always include the WebForms.js file. This is a big rendering change.
- Modify all of our controls that may need it so that they ask for the
WebForms.js file to be rendered during PreRender. This solves the problem
for our controls (with a smaller rendering change), does not include the
file when unnecessary (most of the time, some cases can't be predicted that
early) but third party controls would need to do the same.

If the problem still occurs, I suggest you send a simple project as zip
format to me. It'll help me to repro and do some feather research. Thanks
for your understanding! My alias is (e-mail address removed) (remove
online).

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 
Y

Yuan Ren[MSFT]

Hi Brad,

Thanks for your reply!

I'm sorry to a little confuse with your current issue. If your web
application runs under the ASP.NET 2.0 environment, the web site has been
upgraded from ASP.NET 1.1. Since you develop the project in ASP.NET 1.0,
the project remains be upgraded when it runs under the ASP.NET 2.0
environment.
" The googling I've done on WebForms.JS all refer to code change I would
make in 2.0 for embeded resource."
As previous reply, you do not need make it to embedded resource, but
include the WebForms.js file to ASPX page.
"Why does this error occur on the server but not on my pc? Both are
win2k3, IIS6, have the same version of 1.1 and 2.0 frameworks installed
(and I don't have VS2005 installed). Should something like this not
consistently work, or fail, on any pc?"
Is it always occurred on the server? Do you mean the problem occurred when
you using server machine to access locally, but it works fine when using
client pc to access?

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 
G

Guest

Yuan,
I have a similar error that arose only after converting a 1.1 application to
2.0.
Always include the WebForms.js file
Can you be a bit more specific? What syntax, and what file?
I already have "using System.Web;" in my C# code behind file. Should that be
enough, given WebForms.js which is now a resource inside System.Web.dll? Do I
need something in the .aspx file? An additional Import statement?

Thanks for your help!

"Yuan Ren[MSFT]" said:
Hi Brad,

Thanks for your posting!

After my research, I think this is caused by known issue for ASP.NET v2.0.
Below is work around:
- Always include the WebForms.js file. This is a big rendering change.
- Modify all of our controls that may need it so that they ask for the
WebForms.js file to be rendered during PreRender. This solves the problem
for our controls (with a smaller rendering change), does not include the
file when unnecessary (most of the time, some cases can't be predicted that
early) but third party controls would need to do the same.

If the problem still occurs, I suggest you send a simple project as zip
format to me. It'll help me to repro and do some feather research. Thanks
for your understanding! My alias is (e-mail address removed) (remove
.online).

Regards,

Yuan Ren [MSFT]
Microsoft Online Support
 
Joined
Aug 21, 2007
Messages
1
Reaction score
0
Hi there,

did you get a reply from the MSFT guy?

I had the exact same question about the syntax and which file to include/import.

the Webforms.js file is supposedly embedded inside a dll and does not require to be separately included. But if Yuan says it has to be included, I want to know how, and the syntax.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top