Showing posts with label tool. Show all posts
Showing posts with label tool. Show all posts

Wednesday, March 28, 2012

Installing ajax extenstions and tool kit on server....

Hi All,

Im going to deploy an application that uses the ajax control tool kit to a server which as yet has not even one such application installed. And i have to create a case to convince that it is safe to install the extensions and toolkit on the server.

My arguments will be that

1) Only 2 assemblies are needed to be installed in GAC for the extensions. System.Web.Extensions and System.Web.Design.Extensions. So our backout strategy is fairly simple, all that needs to be done is unregister these assemblies from the GAC.

2) Ajax control tool kit assembly AjaxControlToolkit.dll will be just copied in the bin folder so this should not be an issue.

I also had a question if the app will work if the 2 System assemblies are simply copied in the bin folder?? I had read a post somewhere that the app has to run with full trust but did not quiet understand why that has to happen. To me if the assemblies are first searched in bin and if not found then searched in GAC, so this should work fine.

I also wanted to get the 2 points above validated because what I do has to go through an approval process and i have to be absolutely sure of what I am doing.

All answers appreciated, especially from someone who is managing servers where plain vanillla asp.net 2.0 apps and ajax apps are running side by side.

Regards,

Mahesh

Sorry about this..but i just confirmed that it is already an approved install..

INSTALLING CONTROL TOOL KIT

Hello Everyone,

I am trying to intall the Control tool kit from CodePlex and I am following instructions as perASP.NET AJAX Control Toolkit:
Installation and getting started
onhttp://ajax.asp.net/.

In the step where I have to open the AjaxControlToolkit.sln I get the errors:

1) The application for project 'C:\..\AjaxControlToolKit\SampleWebsite' is not installed.
Make sure the application for project type () is installed.

2) The application for project 'C:\..\AjaxControlToolKit\AjaxControlToolKit.csproject' is not installed.
Make sure the application for project type () is installed.

3) The application for project 'C:\..\AjaxControlToolKit\TEmplateVSI\TEplateVSI.csproject' is not installed.
Make sure the application for project type () is installed.

4) The application for project 'C:\..\AjaxControlToolKit\ToolKitTests' is not installed.
Make sure the application for project type () is installed.

I followed step by step of the instructions and I do not know what I am doing wrong.

Anyone can help?
Thanks in advance

Pati2005

Hi,

What version of Visual Studio are you using? These messages indicates that your visual studio can't open a project of type WebSite.

Please refer to this for more information: http://msdn2.microsoft.com/en-us/library/ms247038(vs.80).aspx

Application Not Installed Dialog Box

This dialog box appears with the error "The application for project <project> is not installed. Make sure the application for the project type (<projectextension>) is installed."
Workaround

This dialog box appears because a product required to open the specified file was not found. It is common for this error to occur when attempting to open a project file that cannot be opened with the installed version of Visual Studio. For example, attempting to open a Visual C# project file with Visual Basic 2005 Express Edition will open this dialog box.
To workaround this error

Install the correct version of Visual Studio.

Hope this helps.


Hello Raymond,

Thank you very much for the reply.
I am using Visual Web Developer Express 2005.
I will look at the link you mentioned at night when I have more time to see if I can work around.
Rgds
Pati2005

Wednesday, March 21, 2012

Is is required to install AJAX extension in the server to run ajax enabled site

Hi,

I have a .net application using Ajax extensions and tool kit. Now I am trying to deploy it in Win 2003 server.

After installation when I try to open the application I get the following error:

"Could not load file or assembly 'System.Web.Extensions, "

I wanted to know if it is required that I have to manually install the Ajax extension on the server. Or the dll in the bin folder of my project for the Ajax extension is enough.

Thanks

gayathri.

I think it needs to reside in the GAC on the server. I had a similar issue.


Eric


Thanks eseidel,

Could you please say me how u resolved it. I have not done anything on GAC earlier.

Thanks,

Gayathri.


Hi Gayathri,

Install ASP .Net Ajax in the server (this automatically registers the dlls in the GAC). This should take care of the problem.

If this is not possible then you have to manually register the dll in the GAC. For this you can do two things:

1. Drag and drop the dll into c:\Windows\Assembly or

2. Use GACUtil. Check out this link to get a clear idea of using the utility.

http://msdn2.microsoft.com/en-us/library/ex0ss12c(VS.80).aspx

hope this helps.

Thanks,

Raja


Could you possibly tell me which file i'd need to download... preferably the location for the asp.net ajax framework for the dedicated servers?


Hi, My problem was resolved after installling the ASP.net AJax Extension MSI in my server.

You don't have to place it in any specific location. Just download the latest version of the Ajax Extension Framework from the ASP.net AJax site and install the MSI in your server. After the installation, you should be able to see the files in the below path in your server

"C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\"

-Gayathri

Is it possible to "redirect"/URLrewrite ScriptResource.axd?

Hi,

I'm currently working on a project where the client is using a Third-party tool for handling authentication to the website. This means problem because we cannot exclude more files than Default.aspx in the root of the website. The rest of the "unsecure" files needs to be in a special folder. If I look at the source for Default.aspx I see the following (which I understand is AJAX resources?):

<script src="/MySite/WebResource.axd?d=..." type="text/javascript"></script>
<script src="/MySite/WebResource.axd?d=..." type="text/javascript"></script>
<script src="/MySite/ScriptResource.axd?d=..." type="text/javascript"></script>
<script src="/MySite/ScriptResource.axd?d=..." type="text/javascript"></script>

I need to include this resources from another URL. Like this:

<script src="http://pics.10026.com/?src=/MySite/unsec/WebResource.axd?d=..." type="text/javascript"></script>
<script src="http://pics.10026.com/?src=/MySite/unsec/WebResource.axd?d=..." type="text/javascript"></script>
<script src="http://pics.10026.com/?src=/MySite/unsec/ScriptResource.axd?d=..." type="text/javascript"></script>
<script src="http://pics.10026.com/?src=/MySite/unsec/ScriptResource.axd?d=..." type="text/javascript"></script>

Is this possible to do?

regards // Magnus

Hi,

I have tested it with the following code:

Overriding Page.Render and replace the string.

<%@. Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = TextBox1.Text;
}
protected override void Render(HtmlTextWriter writer)
{
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
base.Render(htw);
string s = sw.ToString();
s = s.Replace("/AJAXEnabledWebSite3/WebResource.axd", "/AJAXEnabledWebSite3/Secure/WebResource.axd");
writer.Write(s.Replace("/AJAXEnabledWebSite3/ScriptResource.axd", "/AJAXEnabledWebSite3/Secure/ScriptResource.axd"));

}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" /><div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>

ThenI received "sys is undefined" error,I think it is because there is no WebResource.axd created in that sub folder, So how to tell ASP.NET to create WebResource.axd in that folder rather than at the root? See following for answer:

AJAX's script handler is performing path check. Hence it is blocking our trick:

Declaring Type: System.Web.Handlers.ScriptResourceHandler
Assembly: System.Web.Extensions, Version=1.0.61025.0

private static void CheckPath(string path)
{
if (!string.Equals(path, VirtualPathUtility.ToAbsolute("~/ScriptResource.axd"), StringComparison.OrdinalIgnoreCase))
{
Throw404();
}
}

To workaround this further, we can:

1. With IIS, create the "Secure" folder under the root directory of our web application (e.g. "C:\Inetpub\wwwroot\AJAXEnabledWebApplication\Secure").

2. Use IIS Configuration Tool to create an child Application for the "Secure" node:

IIS 7.0 Beta: Add a Web Application
http://technet2.microsoft.com/windowsserver2008/en/library/7450f8c5-8d46-4bb2-bd59-4e6ff23df3201033.mspx

The purpose of this is to workaround the virtual path check mentioned above.

3. Open the Web.Config of the application and configure the machine key:

<system.web>
<machineKey
validationKey="0000000000000000000000000000000000000000"
decryptionKey="0123456789012345"
validation="SHA1"/>

This makes the encryption/decryption mechanism consistent between our root application and child application.

4. Apply the code change mentioned previously.

This should work.

This should work.

Best Regards,