Sunday, March 11, 2012

error, WebPartManager is undefined, any idea?

wyx2000:

Every few days, on my devmachine, I will get error "WebPartManager is undefined", it happens onthe line I marked with red below. Everytime, after I delete files underIE's temporary inernet files, it will back to nromal. Any idea? I guessit relates to the cache of ATLAS js fles, how to solve it?

Same problem here... have you had any success?

Thanks,
Jeff

No, I am waiting someone give me some ideas on this.

wyx2000:

No, I am waiting someone give me some ideas on this.

OK, just thought I would double-check, thanks.

One thing to note: I do *not* have Atlas installed... so I suspect that this problem stems from Web Parts alone. Changing the Security settings from Low to Low Medium, and back also seems to change the frequency of the errors occuring, but its not a solution; its still a problem.

I can recreate the problem fairly easily when I use the minimize or restore menus on a web part.

What pattern are you seeing when you get the error? I.e. what steps can you perform to recreate?


I had this issue and found out it was caused by code I had running in the global.asax file. Specifically, I was running code in the PreRequestHandlerExecute event but any Application level event can cause it. My problem was that I was executing code when a request for the WebResource.axd file was received, something I never intended to do. Ultimately because the request wasn't for a page my code failed and instead of the JavaScript code being sent to the browser the standand ASP.NET error text was sent instead, so this is why the browser complained about the WebPartManager not existing. I solved it by first checking to see if the page request was for a web form, .aspx file, before executing my code:

if

(this.Request.Path.EndsWith("aspx"))

No comments:

Post a Comment