For several months I've been working on a customer site building a web site using ASP.NET MVC with C#, SQL Server 2005, ADO.NET Entity Framework, JQuery and some ESRI web APIs and geodatabases. The test server is running IIS6 on Windows Server 2003. Over this time I've seen some weird things that have caused a lot of rework:
- JavaScript files on the client's servers will not recognize a normal relative path to scripts or URLs: instead of setting up a jqGrid with a url of '/Reports.mvc/GridData' I have to initialize it to <%= ResolveUrl("~/Reports.mvc/GridData") %> in a view, or capture the application path in the <head> tag of the master page:
// Declare a variable to pass to jQuery functions that don't seem to // handle URLs below the top-level pages on MVC in IIS6. var _applicationPath = new String(''); // Reset the variable after jQuery document loaded event to make sure // every jQuery library and plugin sees the value. jQuery(document).ready(function() { _applicationPath = new String(''); });
- I have tested the forms and the functions that post new data to the database and those that edit the data. On two development machines and on the server I am able to show that everything works. Yet, every time they test, the customer comes back and says this field or that field didn't save, or "displays funny."
At this point, the user's account is used only to log in to the web. My entity framework code is in a data DLL and works with the database through a single application user login. So there shouldn't be any problems with permissions or security.
The code doesn't change when someone logs in, the views don't change, and the database doesn't even know who logged in to the web site. So I've had to go back into the code time and again and just try to program even more defensively. But I reached the point a while ago that there was nothing left to do.
Yesterday the customer tells me that the server I've been using on their network is a virtual server. This is in an academic environment, and the server is in another building somewhere under the control of another department.
When first working on this test server, I was able to create an ASP.NET site, but most of the data controls prevented pages from loading, and other components in ASP.NET wouldn't work on the development system. That was why I switched to ASP.NET MVC.
We have moved to a physical test server I haven't worked with a virtual server before. Has anyone had any quirky experiences when working with virtual servers with ASP.NET or any of the other things?