We help IT Professionals succeed at work.

IIS 7 Windows server 2008 Ajaxtoolkit .NET 4.0

740 Views
Last Modified: 2012-02-16
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
Comment
Watch Question

Vikram Singh SainiWeb Developer
CERTIFIED EXPERT

Commented:
@ 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?

Author

Commented:
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!!
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.