A China Unicom WAP interface has been created recently.
I chose ASP. NET development, Asp. net Development WAP site, it is really simple, is the use of a mobile control, do not understand the WML syntax. the only difference is that An ASPX file supports multiple forms and can be switched between different forms,
Finally, ASP. NET outputs different content based on the accessed device,
If IE is used for access, HTML and mobile access are output, and WML is output,
However, many problems have been encountered during the development process. Some problems are summarized as follows:
1. simulator selection:
Winwap,
Mshortate,
Up. sdk4.0
, (Recommended)
Openwave 5.0 (required during testing ),
Openwave6.2,
(For IIS 6.0 applications, iis5.0 may be displayed, but there may be problems)
Checkcom wapbrowser 3.2
Simulator problems:
ASP. NET writes the preparation information of some common simulators in machine. config using regular expressions.
In the above simulators, I only have up. sdk4.0, openwave 5.0,
They are just a company's product:
Download required. configuration file driver update: the latest version is Device 4. Please download it here:
Http://www.microsoft.com/downloads/details.aspx? Familyid = 02fa15fe-40d9-4dce-9bb1-4dd61a5b7ccb & displaylang = en
However, even after the driver is updated, some devices are inaccessible:
In this case, WML needs to be output forcibly:
In web. config
Add the following content <system. Web> <browsercaps>
<Result type = "system. Web. Mobile. mobilecapabilities, system. Web. Mobile, version = 1.0.5000.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"/>
<Use VaR = "http_user_agent"/>
Preferredrenderingtype = "wml11"
Preferredrenderingmime = "text/vnd. WAP. WML"
Preferredimagemime = "image/vnd. WAP. wbmp"
</Browsercaps>
If you define other attributes, you can complete the settings: <browsercaps>
<Result type = "system. Web. Mobile. mobilecapabilities, system. Web. Mobile, version = 1.0.5000.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a"/>
<Use VaR = "http_user_agent"/>
Browser = unknown
Version = 0.0
Majorversion = 0
Minorversion = 0
Frames = false
Tables = false
Cookies = false
Backgroundsounds = false
VBScript = false
Javascript = false
Javaapplets = false
Activexcontrols = false
Win16 = false
Win32 = false
Beta = false
Ak = false
SK = false
AOL = false
Crawler = false
CDF = false
Gold = false
Authenticodeupdate = false
Tagwriter = system. Web. UI. html32textwriter
ECS mascriptversion = 0.0
Ms domversion = 0.0
W3cdomversion = 0.0
Platform = unknown
Css1 = false
Css2 = false
Xml = false
Mobiledevicemanufacturer = "unknown"
Mobiledevicemodel = "unknown"
Gatewayversion = "NONE"
Gatewaymajorversion = "0"
Gatewayminorversion = "0"
Preferredrenderingtype = "wml11"
Preferredrenderingmime = "text/vnd. WAP. WML"
Preferredimagemime = "image/vnd. WAP. wbmp"
Defaultscreencharacterswidth = "12"
Defaultscreencharactersheight = "6"
Defaultscreenpixelswidth = "96"
Defaultscreenpixelsheight = "72"
Defaultcharacterwidth = "8"
Defaultcharacterheight = "12"
Screenbitdepth = "1"
Iscolor = "false"
Inputtype = "telephonekeypad"
Numberofsoftkeys = "0"
Maximumsoftkeylabellength = "5"
Caninitiatevoicecall = "false"
Cansendmail = "true"
Hasbackbutton = "true"
Renderswmldoacceptsinline = "true"
Renderswmlselectsasmenucards = "true"
Rendersbreaksafterwmlanchor = "false"
Rendersbreaksafterwmlinput = "false"
Rendersbreakbeforewmlselectandinput = "true"
Requiresattributecolonsubstitution = "true"
Requiresphonenumbersasplaintext = "false"
Requiresurlencodedpostfieldvalues = "false"
Requiredlanguagnamevalue = ""
Rendersbreaksafterhtmllists = "true"
Requiresuniquehtmlcheckboxnames = "true"
Requiresuniquehtmlinputnames = "true"
Requiresuniquefilepathsuffix = "true"
Supportscss = "false"
Hidesrightalignedmultiselectscrollbars = "false"
Canrenderafterinputorselectelement = "true"
Canrenderinputandselectelementstogether = "true"
Canrenderoneventandprevelementstogether = "true"
Cancombineformsindeck = "true"
Canrendermixedselects = "true"
Canrenderpostbackcards = "true"
Canrendersetvarzerowithmultiselectionlist = "true"
Supportsimagesubmit = "true"
Supportsselectmultiple = "true"
Requireshtmladaptiveerrorreporting = "false"
Requirescontenttypemetatag = "false"
Requiresdbcscharacter = "false"
Requiresoutputoptimization = "false"
Supportsaccesskeyattribute = "false"
Supportsinputistyle = "false"
Supportsinputmode = "false"
Supportsimodesymbols = "false"
Supportsjphonesymbols = "false"
Supportsjphonemultimediaattributes = "false"
Maximumrenderedpagesize = "2000"
Requiresspecialviewstateencoding = "false"
Requiresnobreakinformatting = "false"
Requiresleadingpagebreak = "false"
Supportsquerystringinformaction = "true"
Supportscachecontrol1_ag = "true"
Supportsuncheck = "true"
Canrenderemptyselects = "true"
Supportsredirectwithcookie = "true"
Supportsemptystringincookievalue = "true"
Cachesallresponseswithexpires = "false"
Requiresnosoftkeylabels = "false"
Defaultsubmitbuttonlimit = "1"
Supportsbold = "false"
Supportsitalic = "false"
Supportsfontsize = "false"
Supportsfontname = "false"
Supportsfontcolor = "true"
Supportsbodycolor = "true"
Supportsdivalign = "true"
Supportsdivnowrap = "false"
Supportscharacterentityencoding = "true"
Ismobiledevice = "false"
</Browsercaps>
The meaning of specific attributes can be tested on msdn:Device function list
MS-help: // Ms. msdnqtr.2003feb. 2052/mwsdk/html/mwlrfdevicecapabilitiestable.htm
2.Link:
In the same aspx file, if you use the Link Control and # form to switch between different forms, an error occurs during openwave 5.0 testing!
We recommend that you use activeform in the program.
3.Garbled:
If garbled characters occur during the development process, modify the Web. config
<Globalization
Requestencoding = "gb2312"
Responseencoding = "gb2312"
/>
4. Cancel the mobile device cache:Page. response. expires =-1;
Response. cachecontrol = "public ";
5. Redirection
Redirection passed
Redirecttomobilepage Function
However, some problems may occur during use.
We recommend that you use the link control instead.
Some development materials:
Http://msdn.microsoft.com/mobility/downloads/sdks/default.aspx
Http://www.dotnet247.com/247reference/__site/72
Http://www.wapease.com
Http://www.sp-forum.org/download/list.asp? Type = 14
Http://www2.chn.monternet.com: 8080/devdownload/devwapsimulator. jsp
Http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet.mobile/