简体   繁体   中英

Uncaught TypeError: Cannot read property 'PRM_ServerError' of undefined

I have published my code into QA server for testing. my code working fine on dev server. But on QA server my image button not fires an event. I went an developer console and see what i am getting. So i compare on my local to QA. Please find the images below. Those images from the developer tool-Console.

This is the error I am getting on QA

这是我在 QA 上遇到的错误

This is from my local host for the same page(working)

这是来自我的本地主机的同一页面

EDIT

If image not shown. This is the error I got.

Uncaught TypeError: Cannot read property 'PRM_ServerError' of undefined

MsAjaxJs?v=c42ygB2U07n37m_Sfa8ZbLGVu4Rr2gsBo7MvUEnJeZ81:1

I know this is kind of vague. But this is the error I got. I have no idea how I can find why my button not fire an event on QA server.

Please Help! Thanks

I have resolved my issue. As my image button was not fired, I have taken out the update panel from that .aspx page and set custom error mode to off on web.config on QA server. Then I could able to see the yellow(error) page.

My error was it was connecting to the wrong login user to database. When I created a entitymodel, I hide the username and password(integrated security=True). It works perfectly at my local machine. after I published it connecting to the different login. So, I gave username and password (persist security info=True) at datasource connection string. Now my image button event fired and worked perfectly.

Finally, I put back my update panel and comment out custom error mode from web.config on published server.

I will be glad if this helps someone!

Also had this problem with my .ascx user control (ASP.NET Web Pages project).

  • Make sure you do this first
  • In my case, I was missing a PostBackTrigger on my control:

<asp:PostBackTrigger ControlID="yourControl" />

Turned out, in my case, that the session state was being lost on Login. If this issue occurs for any one on the postback of the login credentials I would investigate this avenue.

I switched my site to use SQLServer Session management and all my problems disappeared.

<sessionState mode="SQLServer" sqlConnectionString="ASPState" allowCustomSqlDatabase="true" cookieless="false" cookieSameSite="None" timeout="780"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM