0

We are having our website in asp.net and it works fine in when we open it through normal pc, iPhone, Android, Blackberry etc. However when we try to open the same website with actual Palm Pre mobile device it gives an error saying "Index2.aspx" does not exist. Well our starting page is Index.aspx which for some unknown reason it can't find it. So we tried using a user agent string for Palm Pre phone on our desktop computer and it displays a pop up message when we try navigating to that page. The pop message contains the correct file name ""Index.aspx" and it's asking us to open with Visual Studio 2005!!! I am not sure as to why is this happening? It should be taking us to localhost/index.aspx but instead it is asking us to open the file Visual Studio?

Davide Piras
  • 43,984
  • 10
  • 98
  • 147
Varun Sharma
  • 2,591
  • 8
  • 45
  • 63
  • 1
    how do you detect the user agent and how do you move to the other page in your server side or client side code? Can you show this? – Davide Piras Sep 15 '11 at 06:01
  • 1
    maybe could you show a sample code with error? – fravelgue Sep 15 '11 at 18:24
  • Hi @davide - I manually put the user agent string for palm pre on the browser. Tools-> Default User Agent-> Edit user agent. Surprisingly on safari it opens fine but on firefox it doesn't. I found out that there is some add on which we need to install but we don't want to do that. There are no error messages anywhere. We move to other page using Response.Redirect(url). I think during this step some strange things happen. It changes from text/html to application/vnd.wap.xhtml+xml. Thanks. – Varun Sharma Sep 16 '11 at 05:25
  • 1
    You should look the content-type (mime-type) of your page. Normaly, if you get a pop-up it´s because your browser doesn´t know it. Are you using web-forms or mobile controls? – fravelgue Sep 15 '11 at 18:32
  • Thanks Fravelgue. Actually Response.ContentType contains "application/vnd.wap.xhtml+xml". when I manually change it to text/html then everything works fine. We are looking more deeply into the problem and it looks like this information is passed on from the browser to our application. Our application is using WURFL stuff to handle it. Our previous version was displaying the web page fine but I think some changes to WURFL screwed it up. We don't get an error message but only a popup message asking us to open the aspx file in visual studio or notepad. Our application has mobile controls as well. – Varun Sharma Sep 16 '11 at 05:22
  • 1
    Then you have two options: 1) Change capabitities of wurfl or adapt it for your Content-Type will be text/html 2) Change your rendered html for wap.html+xml compliant. This link could be help: http://www.developershome.com/wap/xhtmlmp/xhtml_mp_tutorial.asp?page=mimeTypesFileExtension Those add-ons could be help too: - https://addons.mozilla.org/en-US/firefox/addon/xhtml-mobile-profile/ - https://addons.mozilla.org/en-US/firefox/addon/wmlbrowser/ – fravelgue Sep 16 '11 at 13:55
  • Thanks fravelgue ! Changing capabilities of wurfl was the solution. Thanks for the help. – Varun Sharma Sep 29 '11 at 20:17

0 Answers0