PDA

View Full Version : [CLOSED] This error occurs sometimes.



zendy
Jul 18, 2013, 1:50 AM
This error occure sometimes on login page. So I restart my site on IIS to solve.

What is the problem?

My project is using
ASP.NET MVC4 .net framework 4.0
Ext.Net version 2.2.0.25027(from svn ext.js 4.2.1)
Ext.Net.Utilities version 2.2.0.0
Newtonsoft.json version 4.5.0.0

6570

My Master page

<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>

<!DOCTYPE html>

<html>
<head runat="server">
<meta name="viewport" content="width=device-width" />
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>

<%--<ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles"/>--%>
<ext:ResourcePlaceHolder runat="server" />

<link rel="Shortcut Icon" href="../../Resources/etech-16.png" type="image/x-icon" />
<link rel="Icon" href="../../Resources/etech-16.png" type="image/x-icon" />

<%: Scripts.Render("~/Scripts/Mini.js") %>
<%: Scripts.Render("~/Scripts/MiniController.js") %>
<%: Scripts.Render("~/bundles/jquery") %>
<%: Styles.Render("~/Scripts/Mini.css") %>

<ext:ResourceManager runat="server" >
<Listeners>
<BeforeAjaxRequest Handler="Ext.net.Mask.show();" />
<AjaxRequestComplete Handler="Ext.net.Mask.hide();" />
<AjaxRequestException Handler="Ext.net.Mask.hide();"/>
</Listeners>
</ext:ResourceManager>

<script>
function masterKeyMap(flag) {
var miniController = Mini.getController();
eval("miniController." + flag + "();");

if (event.preventDefault) event.preventDefault();
else {
event.returnValue = false;
event.cancelBubble = true;
}
}
</script>
<style type="text/css">
.logo
{
background-image: url(../../Resources/etech-16.png) !important;
}
</style>
</head>
<body>
<div>
<asp:ContentPlaceHolder ID="MainContent" runat="server">

</asp:ContentPlaceHolder>
</div>
<form id="fileform" class="x-hide-display">
</form>

<ext:KeyMap runat="server" Target="={Ext.isGecko ? Ext.getDoc() : Ext.getBody()}">
<Binding>
<ext:KeyBinding Handler="masterKeyMap('reload');">
<Keys>
<ext:Key Code="F5" />
</Keys>
</ext:KeyBinding>
<ext:KeyBinding Handler="masterKeyMap('add');">
<Keys>
<ext:Key Code="F6" />
</Keys>
</ext:KeyBinding>
<ext:KeyBinding Handler="masterKeyMap('remove');">
<Keys>
<ext:Key Code="F7" />
</Keys>
</ext:KeyBinding>
<ext:KeyBinding Handler="masterKeyMap('save');">
<Keys>
<ext:Key Code="F8" />
</Keys>
</ext:KeyBinding>
</Binding>
</ext:KeyMap>


</body>
</html>


My Login Page

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Mini.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<style type="text/css">
h1 {
font: normal 80px tahoma, arial, verdana;
color: #E1E1E1;
margin-bottom: 0px;
margin-top:40px;
margin-left:40px;
}

h2 {
font: normal 20px tahoma, arial, verdana;
color: #E1E1E1;
margin-top:-30px;
margin-left:150px;
}

h2 a {
text-decoration: none;
color: #E1E1E1;
}

.x-window-mc {
background-color : #F4F4F4 !important;
}
</style>
<h1><span style="color:red;font-size:100px;font-family:'Arial Black', Gadget, sans-serif">E</span>tech</h1>
<h2>evaporation</h2>

<ext:Window runat="server" Height="130" Title="E tech Login" Width="270" Closable="false" IconCls="logo" Layout="FitLayout" Modal="true">
<Items>
<ext:FormPanel runat="server" Frame="true" Url="/Account/LogOn" ID="LoginForm" JsonSubmit="true">
<Items>
<ext:TextField runat="server" ID="userID" FieldLabel="ID" LabelWidth="100" AnchorHorizontal="98%" AutoFocus="true" AutoFocusDelay="100">
</ext:TextField>
<ext:TextField runat="server" ID="password" FieldLabel="Password" LabelWidth="100" AnchorHorizontal="98%" InputType="Password" />
</Items>
<Buttons>
<ext:Button runat="server" Text="Login" Icon="Key" OnClientClick="App.LoginForm.submit()" />
</Buttons>
</ext:FormPanel>
</Items>
<Listeners>

</Listeners>
</ext:Window>

</asp:Content>

Daniil
Jul 18, 2013, 6:25 AM
Hi @zendy,


This error occure sometimes on login page.

Can you find any regularity when it happens?

Vladimir
Jul 18, 2013, 6:52 AM
Can you clarify Exception stack trace always the same? Or the exception is raised from various places?

zendy
Jul 18, 2013, 7:12 AM
Hi all.


Can you clarify Exception stack trace always the same? Or the exception is raised from various places?

My customer informed about error to me, I saw the same exception message when I connected my customer's server.


Daniil

Can you find any regularity when it happens?

Sorry. Sometimes 2 times a day or 1 time for 2 weeks. I can't find it.

Vladimir
Jul 18, 2013, 7:18 AM
Latest version of Ext.Net uses Newtonsoft 5.0.5 version. Can you update from SVN and retest with new version?
Or if you don't want to update from SVN then you can update Newtonsoft libarary only in your application (from http://json.codeplex.com/)
Just do not forgot to add dependentAssembly rule to your web.config


<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
<bindingRedirect oldVersion="1.0.0.0-5.0.4" newVersion="5.0.5.16108"/>
</dependentAssembly>
.....
.......
...

Please note that newVersion will depend from your new Newtonsoft.Json assembly

zendy
Jul 18, 2013, 7:51 AM
Latest version of Ext.Net uses Newtonsoft 5.0.5 version. Can you update from SVN and retest with new version?
Or if you don't want to update from SVN then you can update Newtonsoft libarary only in your application (from http://json.codeplex.com/)
Just do not forgot to add dependentAssembly rule to your web.config


<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed"/>
<bindingRedirect oldVersion="1.0.0.0-5.0.4" newVersion="5.0.5.16108"/>
</dependentAssembly>
.....
.......
...

Please note that newVersion will depend from your new Newtonsoft.Json assembly

I modified my web.config and deployed.
If this error occure again. I'll tell you.

Thank you.

Vladimir
Jul 18, 2013, 7:56 AM
I modified my web.config and deployed.
If this error occure again. I'll tell you.

Did you update Newtonsoft assembly first?

zendy
Jul 18, 2013, 8:01 AM
Did you update Newtonsoft assembly first?

Yes, I did. ^^

Daniil
Jul 22, 2013, 4:21 PM
Hi @zendy,

Does the error persist?

zendy
Jul 22, 2013, 11:33 PM
Hi @zendy,

Does the error persist?

Hi Daniil.

No. It is find until now.

Thank you.

Baidaly
Jul 23, 2013, 1:25 AM
Sorry, can you clarify, do you still have this problem?

zendy
Jul 23, 2013, 2:13 AM
Hi. Baidaly

Sorry. I solved it!

Thank you.

Daniil
Jul 23, 2013, 3:35 AM
So, we closed the thread. Nonetheless, if the problem arises again, you can update the thread with new information.