I have a need to have some of my web pages accessible from a PDA or cell phone. I want to use one of the device emulators for testing. So I started messing around but I cannot get anything to work. Here is what I did:
1. I created a new ASP.Net Web Site in VS 2008.
2. Added a "Hello World" label control to Default.aspx
3. Clicked Tools, Device Emulator Manager.
4. Right-clicked on Windows Mobile 6 Professional Square Emulator and clicked Coonect
5. Right-clicked on Windows Mobile 6 Professional Square Emulator again and clicked Cradle
6. An emulator appears. I also get another screen that allows me to change settings. I close this screen.
7. I enter this url: http://www.msn.com. This web site comes up correctly so I assume my emulator is correct?
Cannot connect with current connection settings. To change your connection settings, tap Settings.
What am I doing wrong? I did click on the Settings link but I have no idea what to do next. Also, the web page displays correctly when I run it on my PC.
If you want to build a website for mobile devices you should use mobile web forms. In your project add a new item and choose "Mobile web form". Probably msn automatically redirects to the mobile version of the site.
Visual Studio 2008 default installation does not have "Mobile Web Form" template. To develop mobile web applications the necessary templates need to be installed. To install these templates download them from
Visual Web Developer Team Blog Post, extract the Zip file, and follow the instructions in the included readme.txt files attached to each of the extracted Zip folders. Once installed please perform the following steps. Visual Studio 2005 users do not require
installing these templates as they are already installed.
i) Create a ASP.NET website.
ii) The website will be created with default web form “Default.aspx”, keep the name as it is.
iii) Add a Mobile Web Form to the website using “Add New Item -> Mobile Web Form”. Name the mobile web form to “M.aspx”
Suggestion:
As you are starting with mobile web development, please read this
http://www.51degrees.mobi/Products/NETMobileAPI it will help you a lot with customizing your mobile pages as per PDA screens and capabilities supported by different PDA's.
Ok, I downloaded the zip files from your site. I used the ASP.Net Web Site VB file and unzipped it in the Templates/ItemTemplates/ Visual Basic folder like the Readme said.
I then went back to my VS 2008 ASP.Net web site and did the Add New Item and this time the Mobile Web Form was there like you said. I named it M.aspx and added a label with some text. If I run this in my web site then the web page displays properly. But
if I Connect / Cradle my device emulator and then enter:
http://localhost:64677/MobileExample/M.aspx, I get the same error as I posted before.
This is very frustrating. It seems like it would be easier to use these emulators.
2. It is well known and this forum contains many threads about it that the Microsoft Device Emulator cannot connect to the development server under localhost. Search this forum or try a search engine
bh0526
Member
129 Points
229 Posts
New to mobile devices
Sep 22, 2009 04:09 PM|LINK
Hi all,
I have a need to have some of my web pages accessible from a PDA or cell phone. I want to use one of the device emulators for testing. So I started messing around but I cannot get anything to work. Here is what I did:
1. I created a new ASP.Net Web Site in VS 2008.
2. Added a "Hello World" label control to Default.aspx
3. Clicked Tools, Device Emulator Manager.
4. Right-clicked on Windows Mobile 6 Professional Square Emulator and clicked Coonect
5. Right-clicked on Windows Mobile 6 Professional Square Emulator again and clicked Cradle
6. An emulator appears. I also get another screen that allows me to change settings. I close this screen.
7. I enter this url: http://www.msn.com. This web site comes up correctly so I assume my emulator is correct?
8. Now I enter my url which is: http://localhost:64677/MobileExample/Default.aspx
9. I get this error message:
Cannot connect with current connection settings. To change your connection settings, tap Settings.
What am I doing wrong? I did click on the Settings link but I have no idea what to do next. Also, the web page displays correctly when I run it on my PC.
Thanks,
Bob
oidldb
Contributor
2181 Points
419 Posts
Re: New to mobile devices
Sep 23, 2009 05:17 AM|LINK
Hi,
If you want to build a website for mobile devices you should use mobile web forms. In your project add a new item and choose "Mobile web form". Probably msn automatically redirects to the mobile version of the site.
Here are some links also:
http://www.asp.net/mobile/
http://www.wwwcoder.com/main/parentid/470/site/3903/68/default.aspx
http://www.asp.net/mobile/overview/
Hope this helps!
Dani
P.S. Please mark as answer if this helps.
bh0526
Member
129 Points
229 Posts
Re: New to mobile devices
Sep 23, 2009 12:46 PM|LINK
Thanks for the reply. When I click on Add New Item, the Mobile Web Form you mentioned is not one of my choices.
Bob
oidldb
Contributor
2181 Points
419 Posts
Re: New to mobile devices
Sep 23, 2009 12:54 PM|LINK
Hi,
It should available if you're creating a website. It's not available if you're creating a web application.
Dani
P.S. Please mark as answer if this helps.
matrixvibe
Participant
943 Points
173 Posts
Re: New to mobile devices
Sep 23, 2009 01:09 PM|LINK
Hello
Visual Studio 2008 default installation does not have "Mobile Web Form" template. To develop mobile web applications the necessary templates need to be installed. To install these templates download them from Visual Web Developer Team Blog Post, extract the Zip file, and follow the instructions in the included readme.txt files attached to each of the extracted Zip folders. Once installed please perform the following steps. Visual Studio 2005 users do not require installing these templates as they are already installed.
i) Create a ASP.NET website.
ii) The website will be created with default web form “Default.aspx”, keep the name as it is.
iii) Add a Mobile Web Form to the website using “Add New Item -> Mobile Web Form”. Name the mobile web form to “M.aspx”
Now browse http://localhost:64677/MobileExample/M.aspx
It should work with above.
Suggestion:
As you are starting with mobile web development, please read this http://www.51degrees.mobi/Products/NETMobileAPI it will help you a lot with customizing your mobile pages as per PDA screens and capabilities supported by different PDA's.
Thanks
Thanks
bh0526
Member
129 Points
229 Posts
Re: New to mobile devices
Sep 23, 2009 06:42 PM|LINK
Thanks for the reply. I am confused on this download. Is this some third-party stuff or is this from Microsoft?
Bob
matrixvibe
Participant
943 Points
173 Posts
Re: New to mobile devices
Sep 23, 2009 07:23 PM|LINK
VS2008 templates are from microsoft developer team. No issues you can go ahead with download.
bh0526
Member
129 Points
229 Posts
Re: New to mobile devices
Sep 23, 2009 09:13 PM|LINK
Ok, I downloaded the zip files from your site. I used the ASP.Net Web Site VB file and unzipped it in the Templates/ItemTemplates/ Visual Basic folder like the Readme said.
I then went back to my VS 2008 ASP.Net web site and did the Add New Item and this time the Mobile Web Form was there like you said. I named it M.aspx and added a label with some text. If I run this in my web site then the web page displays properly. But if I Connect / Cradle my device emulator and then enter: http://localhost:64677/MobileExample/M.aspx, I get the same error as I posted before.
This is very frustrating. It seems like it would be easier to use these emulators.
matrixvibe
Participant
943 Points
173 Posts
Re: New to mobile devices
Sep 24, 2009 04:47 AM|LINK
Hi
1) Can you send me your source code sample?
2) Try to test on different emulator listed here http://www.51degrees.mobi/Products/MobileEmulators/tabid/87/Default.aspx , go for "Mobile Interactive Testing Environment".
Thanks
SKT_01
Participant
1930 Points
435 Posts
Re: New to mobile devices
Sep 24, 2009 05:06 AM|LINK
Hello,
1. ASP.NET Mobile Controls are obsolete since years. It seems that Microsoft will mark the System.Web.UI.MobileControls namespace as obsolete in Microsoft Visual Studio 2010/.NET Framework 4.0. cf. http://msdn.microsoft.com/en-us/library/ms229335(VS.100).aspx Instead of ASP.NET Mobile Web Forms I would recommend to use Standard ASP.NET Forms and the controls in System.Web.UI.WebControls namespace.
2. It is well known and this forum contains many threads about it that the Microsoft Device Emulator cannot connect to the development server under localhost. Search this forum or try a search engine