做手机网站的一些相关内容
需要配置一下服务器的HTTP头里的映射
打开IIS,然后在默认网站的属性--HTTP头--MMIE映射--文件类型--添加注册文件的类型:
Associated Extension MIME Type
wml text/vnd.wap.wml
wmlc application/vnd.wap.wmlc
wbmp image/vnd.wap.wbmp
wmlsc application/vnd.wap.wmlscriptc
wmls text/vnd.wap.wmlscript
wsc application/vnd.wap/wmlscriptc
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<!-- 动态调试编译
设置 compilation debug="true" 以启用 ASPX 调试。否则,将此值设置为
false 将提高此应用程序的运行时性能。
设置 compilation debug="true" 以将调试符号(.pdb 信息)
插入到编译页中。因为这将创建执行起来
较慢的大文件,所以应该只在调试时将此值设置为 true,而在所有其他时候都设置为
false。有关更多信息,请参考有关
调试 ASP.NET 文件的文档。
-->
<compilation
defaultLanguage="c#"
debug="true"
/>
<!-- 自定义错误信息
设置 customErrors mode="On" 或 "RemoteOnly" 以启用自定义错误信息,或设置为 "Off" 以禁用自定义错误信息。
为每个要处理的错误添加 <error> 标记。
"On" 始终显示自定义(友好的)信息。
"Off" 始终显示详细的 ASP.NET 错误信息。
"RemoteOnly" 只对不在本地 Web 服务器上运行的
用户显示自定义(友好的)信息。出于安全目的,建议使用此设置,以便
不向远程客户端显示应用程序的详细信息。
-->
<customErrors
mode="RemoteOnly"
/>
<!-- 身份验证
此节设置应用程序的身份验证策略。可能的模式是 "Windows"、
"Forms"、 "Passport" 和 "None"
"None" 不执行身份验证。
"Windows" IIS 根据应用程序的设置执行身份验证
(基本、简要或集成 Windows)。在 IIS 中必须禁用匿名访问。
"Forms" 您为用户提供一个输入凭据的自定义窗体(Web 页),然后
在您的应用程序中验证他们的身份。用户凭据标记存储在 Cookie 中。
"Passport" 身份验证是通过 Microsoft 的集中身份验证服务执行的,
它为成员站点提供单独登录和核心配置文件服务。
-->
<!--
<authentication mode="Windows" />
-->
<!-- 授权
此节设置应用程序的授权策略。可以允许或拒绝不同的用户或角色访问
应用程序资源。通配符: "*" 表示任何人,"?" 表示匿名
(未经身份验证的)用户。
-->
<!--
<authorization>
<allow users="*" />
-->
<!-- 允许所有用户 -->
<!-- <allow users="[逗号分隔的用户列表]"
roles="[逗号分隔的角色列表]"/>
<deny users="[逗号分隔的用户列表]"
roles="[逗号分隔的角色列表]"/>
-->
<!--
</authorization>
-->
<authentication mode="Forms">
<forms name="Liwap" protection="All" timeout="15" loginUrl="index.aspx" />
</authentication>
<!-- 应用程序级别跟踪记录
应用程序级别跟踪为应用程序中的每一页启用跟踪日志输出。
设置 trace enabled="true" 可以启用应用程序跟踪记录。如果 pageOutput="true",则
在每一页的底部显示跟踪信息。否则,可以通过浏览 Web 应用程序
根目录中的 "trace.axd" 页来查看
应用程序跟踪日志。
-->
<trace
enabled="false"
requestLimit="10"
pageOutput="false"
traceMode="SortByTime"
localOnly="true"
/>
<!-- 会话状态设置
默认情况下,ASP.NET 使用 Cookie 标识属于具体某个会话的请求。
如果 Cookie 不可用,则可以通过在 URL 中添加会话标识来跟踪会话。
若要启用 Cookie,请设置 sessionState cookieless="false"。
-->
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="true"
timeout="20"
/>
<!-- 全球化
此节设置应用程序的全球化设置。
-->
<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>
<!-- 完全限定客户端重定向的 URL
一些移动设备要求完全限定客户端重定向的 URL。
-->
<httpRuntime
useFullyQualifiedRedirectUrl="true"
/>
<!-- 指定没有 COOKIE 的数据字典类型
这将使字典的内容出现在本地请求 URL 查询字符串中。
这是在没有 Cookie 的设备上进行窗体身份验证所必需的。
-->
<mobileControls cookielessDataDictionaryType="System.Web.Mobile.CookielessData" />
<deviceFilters>
<filter name="isJPhone" compare="Type" argument="J-Phone" />
<filter name="isHTML32" compare="PreferredRenderingType" argument="html32" />
<filter name="isWML11" compare="PreferredRenderingType" argument="wml11" />
<filter name="isCHTML10" compare="PreferredRenderingType" argument="chtml10" />
<filter name="isGoAmerica" compare="Browser" argument="Go.Web" />
<filter name="isMME" compare="Browser" argument="Microsoft Mobile Explorer" />
<filter name="isMyPalm" compare="Browser" argument="MyPalm" />
<filter name="isPocketIE" compare="Browser" argument="Pocket IE" />
<filter name="isUP3x" compare="Type" argument="Phone.com 3.x Browser" />
<filter name="isUP4x" compare="Type" argument="Phone.com 4.x Browser" />
<filter name="isEricssonR380" compare="Type" argument="Ericsson R380" />
<filter name="isNokia7110" compare="Type" argument="Nokia 7110" />
<filter name="prefersGIF" compare="PreferredImageMIME" argument="image/gif" />
<filter name="prefersWBMP" compare="PreferredImageMIME" argument="image/vnd.wap.wbmp" />
<filter name="supportsColor" compare="IsColor" argument="true" />
<filter name="supportsCookies" compare="Cookies" argument="true" />
<filter name="supportsJavaScript" compare="Javascript" argument="true" />
<filter name="supportsVoiceCalls" compare="CanInitiateVoiceCall" argument="true" />
</deviceFilters>
<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"-->
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
ecmascriptversion=0.0
msdomversion=0.0
w3cdomversion=0.0
platform=Unknown
css1=false
css2=false
xml=false
mobileDeviceManufacturer = "Unknown"
mobileDeviceModel = "Unknown"
gatewayVersion = "None"
gatewayMajorVersion = "0"
gatewayMinorVersion = "0"
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"
requiredMetaTagNameValue = ""
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"
supportsCacheControlMetaTag = "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>
</system.web>
<appSettings>
<!-- SqlServer数据库连接字符串 -->
<!--sql连接字符串中不可以出现"&","<",">"如果一定要用请分别用"&","<",">"替换-->
<add key="ConnectString" value="Data Source=SVHOST1;Initial Catalog=xqcxxdata;Integrated Security=True" />
<!--ACCeSS数据库-->
<add key="ConnStr" value="provider=microsoft.jet.oledb.4.0;data source="/>
<add key="dbPath" value="App_Data/db.mdb"/>
</appSettings>
</configuration>