View Full Version : When my extjs application is deployed to the server, it is not working

29 Jul 2009, 2:55 PM
We really want to sell the management on the powerfull Extjs tool. So if someone can help me figure this out, I would appreciate it. The project is due very soon and I am stuck.
Basically, I am using a drag and drop extjs treeview control with asp.net. It works good on my local machine, but when I deploy it to a test server is only shows the very top image in the treeview. Now I wanted to make sure that it was not just happening with my specific code, so I downloaded this example project from extjs that involves a treeview. Again like my project, the sample project works fine on my localhost machine, but when deployed to the server it is not working. I put some code in the TreeLoader.cs code and it appears to never be called on the server. Can someone possibly help me out and see if they are having the same problem? You can obtain the project I am working on by googling the words Tutorial:EXTJS Tree Panel with ASP NET then the very first article/link has a sample asp.net extjs treeview project that can be downloaded. That is the project I am using.

29 Jul 2009, 6:53 PM
Suggest you post screenshots and see what firebug shows. Someone might have better guesses that way.

29 Jul 2009, 10:56 PM
As MJ said post some screenies and some code.

Are you sure its an Ext issue? Are all versions of the .Net library the same? Is ISS configured to use the right version in which your project is set to run on (webconfig match your version of .Net)? Did you change the DB connection info in the webconfig?

Kinda weird dude suggesting someone to do a google search in an attempt to assist you.

30 Jul 2009, 6:48 AM
Attached is the screen snapshot of the app on localhost and in test.
The exact code I am using can be found by googling : Tutorial:EXTJS Tree Panel with ASP NET

I will paste the exact hyperlink of that code below but I beleive this forum will filter it out.
The code can be found here:


30 Jul 2009, 7:07 AM
Also I added C# code to see if my treeloader code is even being called on the server. It is not. The Page_Load method is never being executed, as the Debugging() method is never called.

Yes my connection to my database is correct and working. The TreeLoader code never appears to be called.

publicpartialclassTreeLoader : System.Web.UI.Page
protectedvoid Page_Load(object sender, EventArgs e)
int selectedID = 117;
if (Request.Form.Count != 0 && Request.Form[0] != "source")
Int32.TryParse(this.Request.Form[0], out selectedID);
this.Literal1.Text = GetNodes(selectedID);

void Debugging()
System.Text.StringBuilder returnValue = new System.Text.StringBuilder();
String Query =
"SELECT emp.intUserID AS EmployeeID, emp.txtFirstName + ' ' + emp.txtLastName AS EmployeeName, " +
" CAST(CASE WHEN a.Subordinates > 0 THEN 1 ELSE 0 END AS BIT) AS IsSupervisor " +
" (SELECT intUserID_POC, COUNT(*) AS Subordinates " +
" FROM tblUsers AS sup WITH (NOLOCK) " +
" GROUP BY intUserID_POC) AS a ON a.intUserID_POC = emp.intUserID " +
"WHERE (emp.intUserID_POC IS NOT NULL) AND IsNull(emp.intUserID_POC, 0) = " + 117;
DataSet myDataSet = newDataSet();
string connectionString = ConfigurationManager.ConnectionStrings["EMRConnectionString"].ConnectionString;
using (SqlConnection connection = newSqlConnection(connectionString))
SqlDataAdapter mySqlDataAdapter = newSqlDataAdapter(Query, connection);

30 Jul 2009, 7:50 AM
Send a screenshot of your virtual folder on IIS
Is the default.aspx file and Treeloader.apsx file in the same directory?
Can you hit the Treeloader.apsx file with an absolute url?
What are your IIS logs saying when you make the request? What HTTP status code does it return?
Can you see the request in FireBug?

30 Jul 2009, 8:03 AM
Thanks Andy for the response. I traced through the application in fiddler and I got this error message below. I believe it would answer your questions. And yes, the treeloader and defalult code reside in the same folder on the server and on my localhost.

In response to the below error message being displayed I had the System admin delete the temporary folder that the error message refers to. Yet that did not solve the problem. Possibly it is being recreated somehow?

<b> Description: </b>An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
<b> Compiler Error Message: </b>CS0433: The type 'TreeLoader' exists in both 'c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\emr\45936646\a216a03b\assembly\dl3\6a947d6e\9683f00b_1e11ca01\App_Web_2znctgmf.DLL' and 'c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\emr\45936646\a216a03b\assembly\dl3\4819ffca\00b3f473_d00bca01\Drag_Drop.DLL'<br><br>
<b>Source Error:</b><br><br>
<table width=100% bgcolor="#ffffcc">
Line 122:
Line 123: [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
<font color=red>Line 124: public class treeloader_aspx : global::TreeLoader, System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler {
</font>Line 125:
Line 126: private static bool @__initialized;</pre></code>

30 Jul 2009, 8:47 AM
This is not a Extjs issue.

Your compiling right ? Try running it uncompiled do u get the same error ?

Google may be your best friend



The fix I finally found was to right click on the solution and choose "clean solution". The problem is that the copy in VSS keeps getting corrupted from someone's PC. But all I have to do is run the clean, and it takes mere seconds.



and dont forget to update your visual studio.. there is a MAJOR vulnerability that will allow remote code execution. This will require you to recompile ALL projects as each application previously complied (before patch) will have this vulnerability.

30 Jul 2009, 2:04 PM
I discovered that this was a .Net problem. Many people have had this problem although the solutions have been varied and non consistent. I solved this problem by renaming my treeloader.aspx and treeloader.cs files to a different name. I then rebuilt and deployed the project to the server and it works fine.