.Net 4.0, grid hosting controls not showing

Page 1 of 2 12 LastLast
  1. #1

    .Net 4.0, grid hosting controls not showing

    Hello,
    I'm migrating my site from godaddy 3.5 to their 4GH for 4.0 compatability. No controls show up. It works fine on my computer/localhost VS2010 4.0, worked fine under old 3.5 but not on the new site. I get no errors, it only renders the non ext.net information. If I view source, it shows the following if it's helpful. I've searched quite a bit, and tried tweaking web.config info, but still haven't had any luck.
    Anyone have any thoughts? I'm using the 1.1.0 latest version.
    Thanks.

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1">
    	<link rel="stylesheet" type="text/css" href="/tledpdb/extjs/resources/css/ext-all-embedded-css/ext.axd?v=42036" />
    <title>
    	DataAt A Glance
    </title><link rel="stylesheet" type="text/css" href="../Shared/resources/css/main.css" />
     
        <script type="text/javascript" src="Default_Calendar.js"></script>
     
     
    	<script type="text/javascript" src="/tledpdb/extjs/adapter/ext/ext-base-js/ext.axd?v=42036"></script>
    	<script type="text/javascript" src="/tledpdb/extjs/ext-all-js/ext.axd?v=42036"></script>
    	<script type="text/javascript" src="/tledpdb/extnet/extnet-core-js/ext.axd?v=42036"></script>
    	<script type="text/javascript" src="/tledpdb/extnet/extnet-init-js/ext.axd?d8e7c94aae8e4c139572ace302a10a47"></script>
    </head>
    <body>
     
         
     <div id="ctl00_Container" style="display:inline;">
     
    </div>
    Last edited by tallman; Aug 15, 2011 at 6:39 PM.
  2. #2
    Do you use IIS7? Did you define ext.net handler and module in the 'system.webServer' of web.config (please note that IIS 7 uses 'system.webServer' instead 'system.web')
  3. #3
    Quote Originally Posted by Vladimir View Post
    Do you use IIS7? Did you define ext.net handler and module in the 'system.webServer' of web.config (please note that IIS 7 uses 'system.webServer' instead 'system.web')
    Vladimir,
    Thank you for your response. Yes. I was running IIS7 prior to this. Here are the lines from my web.config.

    	<system.webServer>
    		<validation validateIntegratedModeConfiguration="false"/>
        <modules>
          <add
    				name="DirectRequestModule"
    				preCondition="managedHandler"
    				type="Ext.Net.DirectRequestModule, Ext.Net"
    				/>
        </modules>
        <handlers>
          <add
    				name="DirectRequestHandler"
    				verb="*"
    				path="*/ext.axd"
    				preCondition="integratedMode"
    				type="Ext.Net.ResourceHandler"
    				/>
        </handlers>
      </system.webServer>
  4. #4
    1. Do you have javascript errors?
    2. All resources are loaded correctly? Use Fiddler to check it
  5. #5
    Quote Originally Posted by Vladimir View Post
    1. Do you have javascript errors?
    2. All resources are loaded correctly? Use Fiddler to check it
    I'd never used Fiddler (or even understood what it was). Thank you for the reference.

    I am getting some securit errors on extnet/extnet-core-js/ext.axd and a few others. They all look the same. To my knowledge, I would have medium trust like before.

    Thanks again.
    Tallman

    Security Exception 
    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 
    
    Exception Details: System.Security.SecurityException: System.Security.Permissions.SecurityPermission
    
    Source Error: 
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
    
    Stack Trace: 
    
    
    [SecurityException: System.Security.Permissions.SecurityPermission]
       Ext.Net.ResourceHandler.GetAssemblyTime(Assembly assembly) +33
       Ext.Net.ResourceHandler.IsSourceModified(HttpRequest request) +141
       Ext.Net.ResourceHandler.ProcessRequest(HttpContext context) +149
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    
     
    
    
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
  6. #6
    What a current trust level on your server?
  7. #7
    Quote Originally Posted by Vladimir View Post
    What a current trust level on your server?
    Medium, according to Godaddy documentation.
  8. #8
    I still need help and this is beyond my knowledge level. I'm down to one security error and I'm guessing it's something in the web.config or a problem outside my control. The request from fiddler is:
    GET /tledpdb/extnet/extnet-init-js/ext.axd?1a830b6ff33340b3ab2f466d4d1b3f86 HTTP/1.1
    and it's the trust message below. I have meduim trust on the server.

    Description: The application attempted to perform an operation not allowed by the security policy.  To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. 
    
    Exception Details: System.Security.SecurityException: System.Security.Permissions.SecurityPermission
    
    
    Source Error: 
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  
    
    Stack Trace: 
    
    
    [SecurityException: System.Security.Permissions.SecurityPermission]
       Ext.Net.ResourceHandler.GetAssemblyTime(Assembly assembly) +33
       Ext.Net.ResourceHandler.IsSourceModified(HttpRequest request) +141
       Ext.Net.ResourceHandler.ProcessRequest(HttpContext context) +149
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
    Thank you for the help so far.
    Brent

    For anyone with similar problem reading this, here is what I did to knock down all the errors.

    I spent 30 minutes with Godaddy. They promised it's all medium trust, and all the same settings as previous.

    I changed to 3.5 on that server and all worked. Changed back to 4 and it doesn't. I went through the web.config line by line trying to understand what I never did before.

    I found I had to actually remove the following lines from the system.web and that removed most of my security issues except for the final remaining one.
    	<system.web>
    		<httpHandlers>
    			<add path="*/ext.axd" verb="*" type="Ext.Net.ResourceHandler" validate="false" />
    		</httpHandlers>
    		<httpModules>
    			<add name="DirectRequestModule" type="Ext.Net.DirectRequestModule, Ext.Net" />
    		</httpModules>
    	</system.web>
    Last edited by tallman; Aug 16, 2011 at 7:32 PM.
  9. #9
    Try following thhings

    1. Download source code of Ext.Net toolkit
    2. Try of one of the following changes, rebuild assemblies and retest
    - file Ext.Net\Core\ResourceHandler.cs, remove permission attribute from GetAssemblyTime method
    - if removing attribute doesn't help then remove code in that method and hardcode any date
            private static long GetAssemblyTime(Assembly assembly)        {
                return new System.DateTime(2011, 8, 1).Ticks;
            }
  10. #10
    Know that this security and how it all works is unknown to me. I didn't know how to lower security requirements, so I changed


     
          [FileIOPermission(SecurityAction.Assert, Unrestricted = true)]
            private static long GetAssemblyTime(Assembly assembly)
            {
                AssemblyName assemblyName = assembly.GetName();
    
                return File.GetLastWriteTime(new Uri(assemblyName.CodeBase).LocalPath).Ticks;
            }
    to
            [FileIOPermission(SecurityAction.Assert, Unrestricted = true)]
            private static long GetAssemblyTime(Assembly assembly)
            {
                //AssemblyName assemblyName = assembly.GetName();
                return new System.DateTime(2011, 8, 1).Ticks;
                //return File.GetLastWriteTime(new Uri(assemblyName.CodeBase).LocalPath).Ticks;
            }
    But received the same exact security error in the same location. I'm not even sure how to know what I did, did anything. It did update the dll's when I did the build. Is the problem with their medium trust? or is it with this code?
    Thanks for your continued help.
    Brent
Page 1 of 2 12 LastLast

Similar Threads

  1. [CLOSED] Problem hiding/showing controls
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 29, 2012, 3:37 PM
  2. [CLOSED] Problem when showing/hiding controls in javascript
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 08, 2010, 12:19 PM
  3. Replies: 2
    Last Post: Apr 30, 2010, 2:55 AM
  4. Hosting server with iis 6.0 showing Error.
    By Sreejith in forum 1.x Help
    Replies: 3
    Last Post: Sep 29, 2009, 5:27 AM
  5. Replies: 6
    Last Post: Feb 23, 2008, 11:38 PM

Posting Permissions