Showing posts with label enabled. Show all posts
Showing posts with label enabled. Show all posts

Monday, March 26, 2012

Prerequisites to run Ajax Enabled Web sites !

Hey,

Do I need to install the Ajax Framework on the server to launch the Ajax Enabled websites.

Thanks and Regards

RS

You don't need to install AJAX extensions on production server, but you have to make sure that file Microsoft.Web.Extensions.dll included in Bin folder of your web application.

HeyJasonMDLi ,

My Questions is not about the Extensions part but about the Frame work. Do I need to Install the Ajax Framework?


No, you don't. Extension I mentioned is exact AJAX Framework you mentioned. Don't forget copy the file into Bin folder of webapp.
No, you don't. Extension I mentioned is exact AJAX Framework you mentioned. Don't forget to copy the file into Bin folder of webapp.

Hey,

Just make sure to check the .net framework version in iis, everything else is done the same way as before. When you compile your solution, all the files will be in the bin folder as mentionned previously.Smile

Saturday, March 24, 2012

Problem calling webservice from client code

Hi All,

I am trying to call a webservice method on a ASP.NET page (in AJAX enabled website). I have my asmx file in the same project as my ASP.NET page. When i try to compile the project , i am getting a "Could not create type TestService" error. Can some body tell me what exactly is the problem here?

Thanks

Mahesh

Confused cud u have given namespace reference of web.script.services.scriptservices

as using web.script.services.scriptservices

& inherite [ScriptServices]


Thanks for the reply ranjeet. But i don't really get the gist of your message , can you please be more clear? I am copying my webservice code below for your reference:

using System;

using System.Web;

using System.Collections;

using System.Web.Services;

using System.Web.Services.Protocols;

using System.Web.Script.Services;

using System.Data.SqlClient;

using System.Data;

///<summary>

/// Summary description for TestService

///</summary>

///

namespace MyTestService

{

[WebService(Namespace ="http://tempuri.org/")]

[WebServiceBinding(ConformsTo =WsiProfiles.BasicProfile1_1)]

publicclassTestService : System.Web.Services.WebService

{

[WebMethod]

[ScriptMethod]

publicDataSet GetEmployeeDetails(int empID)

{

String strConnectionString =String.Empty;

String strQuery ="Select * from Employee where EmployeeID = " + empID; ;

strConnectionString ="Server=PC21172\\SQLEXPRESS;Database=EmployeeDB;user=sa;pwd=pwd";

//Get the employee details for the passed id

SqlConnection c =newSqlConnection(strConnectionString);

c.Open();

SqlDataAdapter dataAdapter =newSqlDataAdapter(strQuery, strConnectionString);DataSet dsEmployeeDetails =newDataSet();

dataAdapter.Fill(dsEmployeeDetails);

return dsEmployeeDetails;

}

}

}

Thanks

Mahesh


The DataSet and DataTable is supported in the v1.0. You have add the preview version.


Hi,

I have infact downloaded the January CTP and i am able to return the datatable. Now th issue is , how can i bind the datatable or dataset that i return from the webservice to a ASP.NET datagrid control in javascript call back function. Can somebody help me on this?

Thanks

Mahesh


The Asp.net DataGrid/GridView does not have any objectmodel in the client side. Few days back I wrote a component which does the exact thing, Checkout the following article:http://dotnetslackers.com/articles/ajax/ASPNETAjaxGridAndPager.aspx

problem in ajax website

hi

i am facing a problem in creating Ajax website.

When i am takingAjax enabled website option i am able to do everything fine.

But when i am taking a create Website option i am getting error . I have also includedScriptManager on the page which is required by most of the Ajax Controls to work properly.

Thanx in advance

Hi.

When you create an Ajax-enabled web site, the WEB.Config file created contains config section, HTTP handlers, HTTP modules all needed by AJAX.

One example is that the ScriptManager creates a call for javascript called ScriptResources.axd where axd is not known extension for your web-server
(unlike ASPX, ASMX, JS, ASHX etc.) The httpHandler section includes this extension and set it to be handled by AJAX extension (System.Web.Extensions.DLL file)

What you should do (especially when adding AJAX capability to an existing site) is to copy these additions to your web.config file from an "AJAX-Enabled"
web site. Then you won't e having these errors.


Problem in Ajax i My ASP.Net WebSite

hi

i am working on my website.(when i created website,i don't select Ajax Enabled Template and it is a default asp.net website)

and i want add ajax feature to my website by drag ScriptManager and UpdatePanel from toolbox.but when i run my website,error shown in IE statusBar.

how to solve my problem ?

should i create new website as Ajax enabled template ?

thanks

Hello,

Make sure you install Ajax on your system, and you need to modify your web.config file.

The best way to modify the config file is, create new ajax project, which will built a web.config file for you.

You then compare your old web.config file with the ajax website web.config file. If you haven't added any information to your old web.config file, I would just copy the ajax web.config file to your current (web) project. And if you already added information into your web.config file, then just copy whatever you don't have from the ajax web.config file to yours.

I hope you understand what I'm talking about =)

WS

Wednesday, March 21, 2012

Problem in deployment of AJAX enabled website

Hello Everybody:

Recently I have installed ajax extension in VS2005. I have a asp.net 2.0 website and I made necessary change in the web-config file for the ajax extension as described in AJAX video tutorial in this website. It works fine but when I deploy it to my server then it finds error in web-config file related to missing dll. What can I do? Please give me a suggestion.

Thanks to all.

The ajax installer puts the dlls into the GAC. Because of this, they do not deploy with your app in the bin folder.

You need to also install ajax on the server you are deploying to.


Well, the only things you can do are:

Install the Ajax Extensions on your server! If it is a shared hosting company contacting them may help: I succeeded once -- BUT ONLY ONCE!
The other solution it to copy over: System.Web.Extensions.dll, System.Web.Extensions.Design.dll from C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025 into your bin folder and it should work if your application runs in full trust mode!

Hope it works!


I was able to deploy my ajax app on my server without installing anything, just putting the System.Web.Extensions.dll into the bin folder and referencing it. I am still unable to get the control toolkit to work without installing anything on the server. Any ideas on that?(Sorry, I know it's not the control toolkit forum, but the question fits perfect in this post :) )