Showing posts with label running. Show all posts
Showing posts with label running. Show all posts

Wednesday, March 28, 2012

Ajax beta 2 is not working with iis 6

i downloaded the ajax beta 2 from ajax.asp.net and install it in the production server which has iis 6, and i publish the site which is running well in the development server, ajax is not working any more, with any pages action they page refresh itself, i dont know what's is going on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

OK!Have you deployment it?
Can you actually respond with actual errors it would help US help you..

Hi,

As my knowledge it wills works without any errors,

Please go through your code, you might be did mistakes in the code.

Or can you send the code then only forum can help you.

Maximum problem with your code only..

Pradeep Kumar Bura


the pages dosn't display any error message, the situation is that the page has update panel , so when user click on a search button it should display the result inside the update panel without refreshing the page, and thiss happen in the development server, but on the production page the same page server when user click on the search button, the pages is refreshed :(


Hi,

Have you checked event log for errors?

Pradeep Kumar Bura


Hi. I had a similar problem. After Installation on productive server, the sites were'nt executable because the webserver didn't found one the assemblies which will be installed while the extension installation (Microsoft.Web.Extension and Microsoft.Web.Extension.Design).

I installed and registered the assemblies whith gacutil and the aplication was running again.


I've deployed AJAX Beta 2 to four servers running IIS6. On two of the four I ran into the same issue that Michael63 describes. For me Microsoft.Web.Extension.Design was not added to the GAC. You can either register it in the GAC or you can copy it to your site's bin directory. I did the GAC way on one server and copied it into the bin folder on another - both work fine. The other thing you may want to check is that a new entry in the web.config is required. Check out the readme included with the installations for instructions.
Your site has to be running in full trust mode to be able to run the dlls in the bin folder.

i did that, and i checked that the assemply is added to the GAC , but still the site working very well in dvelopment server, but on production server, it's not the only differnce is that the development server has atlas component before but i uninstalled it before install ajax, but it was the only differnce


http://forums.asp.net/thread/1485037.aspx
follow this threadhttp://forums.asp.net/thread/1485037.aspx

Monday, March 26, 2012

AJAX AutoCompleteExtender

Hi, I'm a newbie to the AJAX tool kit.

I have few basic questions.

1) Is it necessary to have a webservice running to get the data from the data base.. My question is, assume i have a list of Employee names.As soon as i started typing in the Text Field i need to display the Employee name. I have seen a Video session on this. but do we exactly need to run the webservice which has data base conection and retrieval from the database?

2) is it sufficient to have a method to get the data from DB in the .cs file.

Suggest me the Best one.

Tell me a best practise link where i can learn them from basics...

Thanks,

Mythily

Hi Mythily,

No, you have an alternative option, PageMethod. This is a static method defined in the page itself and can be accessed from client side directly.

For example:

// this method is defined in the page itself
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public staticstring[] GetCompletionList(string prefixText, int count)
{
string[] words = prefixText.Split(new char[] { ';' });
string[] result = new string[16];
for (int i = 0; i < 16; i++)
{
result[i] = "aaaa";
}
return result;
}

<ajaxToolkit:AutoCompleteExtender CompletionSetCount="4" CompletionListCssClass="completeListStyle" BehaviorID="ace" ID="AutoCompleteExtender1"ServicePath="AutoCompleteExtender.aspx" ServiceMethod="GetCompletionList"runat="server" TargetControlID="TextBox1">

Hope

AJAX Assembly

I am running visual studio on my desktop and laptop. Both have had the AJAX Control toolkit and AJAX extensions installed. I mostly do my development work on my desktop but every once in a while I take my laptop. When I take my laptop I copy and paste the visual studio 2005 folder from 'documents' and copy it onto my laptop.

I've just done this recently and I am getting errors "Unrecognized tax prefix or device filter 'ajaxToolkit' on all my ajax controls. When I create a new page and insert an ajax control Visual Studio registers an assembly 'Assembly="AjaxControlToolkit" and tags it as "cc1". On my desktop visual studio doesn't register any assembly. It just calls the control <ajaxToolkit:...> and things work.

I've checked the bin folder and it does contain the AJAX dll. I'm sure it's something simple here, can someone tell me what is missing? Thank you.

try this in your aspx

<%@.RegisterAssembly="AjaxControlToolkit"Namespace="AjaxControlToolkit"TagPrefix="cc1" %>


I know about registering the assembly this way. I was wondering why on my desktop machine I don't have to register the assembly in my aspx and when I open it on my laptop I, all of a sudden, do.


Hi,

This can be also registered in web.config.

For instance:

<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
</controls>

Saturday, March 24, 2012

AJAX and Vista -

I just upgraded to Vista from XP where I had IIS running very happily and AJAX installed and working great.

After upgrading to Vista I get this browser error on any AJAX website:

'Sys' is undefined

I remember seeing that error months ago back when it was called Atlas. But now that I'm running the latest OS, with a non-beta AJAX, why should I be getting this now? The upgrade to Vista has been painful all around, but I've managed to fix or find workarounds for most problems except this one.

It seems like the AJAX stuff isn't getting included into the webpage. I even tried creating a fresh project in VWD and specifying to use the VS template for "ASP.Net Ajax Enabled Website" and throwing together a simple page with an updatepanel and a command button. Same error.

I've run Windows Update and gotten all the updates, including the Visual Studio update that tells you to run VWD "as an administrator", which I'm doing.

The line in the generated page that it is complaining about is the first reference to Sys below.
Hopefully there is just some simple security setting in this locked down OS I don't know about to allow this to run? 
<script type="text/javascript">//<![CDATA[Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tUpdatePanel1'], [], [], 90);//]]>
</script>

Do you have following entry in your web.confg file?

<add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>

Also, follow Readme notes on migration issues on ajax.asp.net .


Yes, I have that. This was a functioning ASP.Net 2.0/AJAX 1.0 application when I had XP, but now that I'm running windows Vista, it doesn't work.

I did have to manually edit applicationHost.config in C:\windows\system32\inetsrv\config to add entries for ASP.Net 2.0 (it only had enties for 1.1), so I'm wondering if something must be added there to support AJAX.

I tried downloading and re-installing AJAX, rebooting, all the obvious stuff with no luck. Upgrading to Windows has ALMOST completely shut me down from developing.

I did just discover that when I use the VWD built in web server, AJAX works fine. So AJAX is "installed" correctly on my PC. But as far as when I use the full-blown IIS web server, AJAX is dead.

I didn't see anything in the README relating to Vista migration, only migration from previous versions of Ajax/Atlas, which is not what I'm doing.


Here is what I ended up doing as I spent nearly two days trying to rebuild my Dev machine after purchasing a Vista capable laptop.

1. Mark your site in IIS7 as an Application (The choice is there if you right click on virtual IIS7 entry in the expanded list under websites...

2. Make sure that you have included all of the IIS7 web.config entries:

<

system.web.extensions>

<

scripting>

<

webServices>

<!--

Uncomment this line to customize maxJsonLength and add a custom converter-->

<!--

<jsonSerialization maxJsonLength="500">

<converters>

<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>

</converters>

</jsonSerialization>

-->

<!--

Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate.-->

<

authenticationServiceenabled="true"requireSSL="false" />

<!--

Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

and modified in Atlas applications, you need to add each property name to the setProperties and

getProperties attributes.

-->

<!--

<profileService enabled="true"

setProperties="propertyname1,propertyname2"

getProperties="propertyname1,propertyname2" />

-->

</

webServices>

</

scripting>

</

system.web.extensions>

<

system.webServer>

<

validationvalidateIntegratedModeConfiguration="false"/>

<

modules>

<

addname="ScriptModule"preCondition="integratedMode"type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

modules>

<

handlers>

<

removename="WebServiceHandlerFactory-Integrated"/>

<

addname="ScriptHandlerFactory"verb="*"path="*.asmx"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addname="ScriptHandlerFactoryAppServices"verb="*"path="*_AppService.axd"preCondition="integratedMode"type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

<

addname="ScriptResource"preCondition="integratedMode"verb="GET,HEAD"path="ScriptResource.axd"type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

</

handlers>

</

system.webServer>

Note that the PipeLine extension for the configured site can be set for Integrated (default) instead of the Classic Mode.

With those two steps I was able to get a XP configured site migrated over with Ajax...


My web site is set up as an application, and it uses an application pool set up for ASP.net 2.0.

When I set that application pool to use to use the Integrated mode, I can no longer even load my website (gives 404 error).

This is crazy, this was a perfectly functioning website under XP, and "upgrading" to vista has broken it.

Is there anything in the applicationHost.config file that needs to reference AJAX? I'm at the end of my rope here, I'm about to just install XP and loose ALL my programs and setting just to get back to a usable machine!

Ajax and JavaScript Arrays

Does anyone know why a new Array Contains data when just created when a script manager is running on the page... I do the following code:

<script language="javascript">
var myArray = new Array();
for (x in myArray)
{
document.write(myArray[x])
}
</script>

And get the output: function (index) { this.splice(index, 1); }

WHY!?!?!??!!?

Hi,

this happens because Array is extended through the prototype object, i.e.

Array.prototype.splice = ...

The solution is to extend Array using "type" methods:

Array.splice = ...

I believe this will be fixed in the next release.


hello.

As always, Garbin is correct. btw, i'd just like to add that, in my opinion, the for each usage in arrays which expects to get only the elements is just a side effect of the way foreach works (in other words, i think that even though everyone uses that for getting the elements of an array, it's not what it was meant for)


Actually you are absolutely right. I have solved the problem and what i did was just remove the:

for (x in Array)

and replace it with:

for (x = 0; x < Array.length; x++)

this seemed to fix it right up. It wasn't the fact that the array actually had those values in it. It's just somehow they array accessed those things when used in the for each statement... As gabin said it has to do with prototyping, which i was not familiar with. Thanks for the help guys, and the explanation.


hello again.

btw, i do believe that if you go the other way around, you'll have amore performant solution (ie, instead of goin from 0 to length, do it the other way around - if you can, of course).


I can't. It seems to always be populated with that data otherwise... I don't see why it would cause better performance. My array lengths are exact and not allocated longer then there last bit of information.

hello.

well, it all dependes on the number of items. check this and let me know:

http://www.devpro.it/examples/loopsbench/

Wednesday, March 21, 2012

AJAX and ASYNC Pages

All,

I'm looking to implement the following scenario:

1. User clicks on a link.

2. A panel is raised indicating that a long running operation is about to begin.

3. A request to open a new window which will host an async page that will stream a pdf is made.

4. When the callback from the async page returns, I want it to trigger an action on the parent page to hide the progress panel.

Basically any examples of incorporating async page callbacks and ajax update panel callbacks.

Ariel

hello.

why do you need async pages to do this? is the server processing making a long web service call or perfomring an expensive db query?

The popup

http://ajax.alpascual.com/ModalPopup/ModalPopup.aspx

and then the PDF

http://alpascual.com/search/SearchResults.aspx?q=pdf

Hope that helps you finish the project