Showing posts with label call. Show all posts
Showing posts with label call. Show all posts

Saturday, March 24, 2012

Internet Explorer Mobile & ATLAS

Hi all,

I have a webservice and ASP.NET ATLAS enabled, and working with IE6. There is not ATLAS controls, it is very simple call from javascript, passing 3 arguments.

I am tying to make it works in Internet Explorer Mobile in a Smartphone with Windows Mobile 5.0, but when I press the button, nothing happens...

In theory, Explorer Mobile supports HTML 4.01 CSS and Extensible HTML (XHTML), and XMLHTTP Request...

Have any try this or something with similar scenario?

Thanks in advance

David

I don't believe the mobile version of internet explorer supports the xmlhttprequest object or has any AJAX support for that matter.

Please, see this bloghttp://blogs.msdn.com/iemobile/archive/2005/11/15/493200.aspx

If IE Mobile supports AJAX and this sentence
xmlHttpReq = new ActiveXObject("Msxml2.XMLHTTP");
, I can't undestand why ATLAS will not support IE Mobile....

This is the function inside WebResource.axd generated by ATLAS that creates XMLHTTPRequest object

window.XMLHttpRequest = function() {
var progIDs = [ 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP' ];

for (var i = 0; i < progIDs.length; i++) {
try {
var xmlHttp = new ActiveXObject(progIDs[i]);
.....

Very similar no? I think that is imperative that ATLAS works for IE Mobile...


hello.

i really don't understand much about mobile devices...is there any sniffer that can capture the traffic between the browser and the server? (something like fiddler, that is)

Wednesday, March 21, 2012

Is it a bug? you can try it.

I found a problem in Web Service when I use Asp.Net Ajax rc1.
runhttp://localhost/Website1/WebService1.asmx, Call SetValue() , then GetValue(). You will find an exception.
That's too strange. why is NHibernate?

using System.Web.Script.Services;
using NHibernate;
using NHibernate.Cfg;

[ScriptService]
public class WebService1 : System.Web.Services.WebService
{
[WebMethod(EnableSession = true)]
public void SetValue(string value)
{
// If I run it here, the Session["SESSION1"] in GetValue() will return null;
NHibernate.Cfg.Configuration _cfg = new NHibernate.Cfg.Configuration();

Session["SESSION1"] = value;
}

[WebMethod(EnableSession = true)]
public string GetValue()
{
return Session["SESSION1"].ToString();
}
}

web.config:
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpHandlers>

Do you mean to say if you include the NHibernate line, Session["Session1"] returns null? What happens if you remove that line? Also are you sure that you are accessing the session variable after you have set it?
Yes, if I remove that NHibernate line, all the things are working well. I tried it many times.
I can't use NHibernate in Asp.Net Ajax? I am almost crazy these days.
I've found why the session will be lost. I have a global.asa file. And I write:
void Application_Start(object sender, EventArgs e)
{
log4net.Config.DOMConfigurator.Configure();
}
and each time I call web method, the application will restart ( seems in compiling again ). That's why the session will be cleaned.

But I still don't know why the Application will restart each time? And if I delete that line in Application_Start, everything works well.

I am using Visual Web Developer 2005, and the solution will not compile to a dll.

hello.

just a guess: does the configure methodf loads the config fromthe web.config file? if so, try changing it to an external file (i'm thinking that maybe it may be changing the web.config file while it reads it and this will definitly restart your web app).


No, I didn't change web.config file while I call these 2 method.
I am using visual web develop 2005 express. and all the code wouldn't be compiled to a dll, so I don't know when the code will be compiled if I call a web service method.

Is it possible to call client side function from server side code without initial client r

Atlas is great. I'm using timer to periodically check database changes on server to populate client side controls with new data. Is it possible to do it without a lot of client requests to server which takes a huge useless network traffic? Server should call client side function on all connected clients when, for example, 'database updated' event occurs on server. Thanks.Hi~ Just for your interest, I think you could have a look atComet, many web IM like Gmail's embeded Gtalk and meebo.com are built on this architecture