I am having some sort of conflict in my ASP.Net 4.0 Website I'm creating. If I include a reference to AJAX in my web.config file I get an error: BC30451: 'HttpUtility' is not declared.

This error is thrown by the code behind of my account log in page. This is the code on the page:

Partial Class Account_Login
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
RegisterHyperLink.NavigateUrl = "Register.aspx?ReturnUrl=" + HttpUtility.UrlEncode(Request.QueryString("ReturnUrl"))
End Sub


End Class


I rebuilt the web.config file section by section to find out what might be causing the problem. I discovered if I remarked out the AJAX controls in the in the web.config file I wouldn't receive the message above. However, whenever when I go to a page that has an AJAX control I get the following message:

Unknown server tag 'ajaxToolkit:ToolkitScriptManager'.

Below is the remarked out code:






It seems I can have one or the other but not both. Any ideas on what I do to fix this?

Thanks

PLEASE NOTE: I tried to register the system.web.dll in and got a notice it was already referenced.