Link to home
Start Free TrialLog in
Avatar of bluetundra
bluetundraFlag for United States of America

asked on

IIS 7 Windows server 2008 Ajaxtoolkit .NET 4.0

My Ajax app works perfectly in visual studio 2010 and on my shared hosting environment
http://jhalit.com but not on the new virtual server I've setup (IIS7 Windows server 2008)  On the new sever I've installed .NET 4.0 and in visual studios the target version is .NET 4.0  I've copied over the ajaxtookit dll to the bin folder.  One thing I notice on the shared hosting environment is that the site changes to jhalit.com/home# and on the new virtual server the site address doesn't have the hash its just jha.bluetundra.com  I've checked the event log, didn't find errors. In Firefox, using the .NET tab seems to load all the JS.  I'm stumped
Avatar of Vikram Singh Saini
Vikram Singh Saini
Flag of India image

@ I'm not so much well versed with AJAX. But I think that there is something about # which is creating trouble to your application.

When I looked source code for both http://jhalit.com/#Home and http://jha.bluetundra.com/ I just found that there are some in page javascript which are using  #.

What I found interesting about the # (some called it as HashBang) that:

1. Is used to signal the browser to center the view on a particular named element.
So http://jhalit.com/#Home means that the page would drop down where it would find element named Home.

2. Everything before hash is handled by the server and after is handled by client usually JS

3. But the same concept can take another meaning in ajax context. It can be something as trigger for performing some sort of actions via javascript. See The Unique URL Pattern topics in link Single-page Interface and AJAX Patterns

@ The other possible reason could be of path to javascript and css are not matching. Might be path could be different. Try to use VirtualPathUtility:

<link type="text/css" rel="Stylesheet" href="<%=VirtualPathUtility.ToAbsolute("~")%>/Content/site.css" />

@ You have mentioned about Virtual Server. Do you mean it with virtual directory?
Avatar of bluetundra

ASKER

Hi there,

Thanks for the explanation.  I've tried the code fix, doesn't seem to work.  I'm referring to a new virtual server (box) vs. virtual directory.  

Thanks!!
ASKER CERTIFIED SOLUTION
Avatar of bluetundra
bluetundra
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial