⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 showerrors.srf

📁 Vc.Net入门与提高源码
💻 SRF
字号:
{{ handler ShowErrors.dll/Default }}
<html>
	<!-- (c) 2000 Microsoft Corporation -->
	<head>
		<title>{{Title}}</title>
		<meta http-equiv="content-type" content="text/html; charset=iso8859-1">
		<link rel="stylesheet" href="normal.css" type="text/css">
	</head>

	<body>
		<h1>{{Title}}</h1>
		
		<form id="theform" name="theform" method="post" action="showerrors.srf">
			<table border="0" rules="none" frame="void">
				<tr>
					<td>HTTP Error</td>
					<td>
						<select id="httperror" name="httperror" value="500">
							{{HttpErrorOptions}}
						</select>
					</td>
				</tr>
				<tr>
					<td>Suberror</td>
					<td><input id="suberror" name="suberror" value="0"></input></td>
				</tr>
				<tr>
					<td>Return Custom Error</td>
					<td><input type="checkbox" id="customerror" name="customerror"></input></td>
				</tr>
			</table> 
			<div align="right"> 
				<input type="submit" id="cmdSubmit" value="Submit"></input>
				<input type="reset" id="cmdCancel" value="Cancel"></input>
			</div> 
		</form>


		<h3>Instructions</h3>
		<p>
		Use the form to choose the error that the server will send back
		when you hit Submit. Select an HTTP status code using the dropdown list
		and optionally type a numeric subcode into the text box. To view the response
		generated by the default error provider, leave the <i>Return Custom Error</i> 
		box unchecked. To view a custom error response, check that box. If you select
		404 with a subcode of zero, you should see the custom error file that you added
		to the local errors folder.
		</p>

		<p>
		To ensure that you're seeing the errors sent by the server,
		you must disable Internet Explorer's friendly error messages.
		Go to <i>Tools | Internet Options... | Advanced</i> and make
		sure that <i>Browsing | Show friendly HTTP error messages</i> is not checked.	
		</p>

		<h3>How It Works</h3>
		<p>
		If <i>Return Custom Error</i> is unchecked, the request handler builds
		an error code from the selected HTTP status code and subcode using the 
		HTTP_ERROR macro. This value is returned from ValidateAndExchange and
		the ATL Server infrastructure uses CDefaultErrorProvider to build a response.
		</p>

		<p>
		If <i>Return Custom Error</i> is checked, the request handler does the following:
		<ol>
			<li>
			Clears the response object of any headers and body that may have been set.
			</li>
			<li>
			Prevents the error response from being cached by setting the Cache-Control and 
			Expires response headers.
			</li>
			<li>
			Applies the HTTP status code to the response object.
			</li>
			<li>
			Tries to transmit a file that corresponds to the selected status code and subcode
			from the local errors folder.
			</li>
			<li>
			If the previous step fails, tries to transmit a file from the errors folder for the site.
			</li>
			<li>
			If the previous step fails, generates a generic response that features instructions for
			the user to try to work around the problem as well as technical details 
			(time, date, URL, status code, and subcode) that can be used by technical support 
			to track down the cause of the problem.
			</li>
		</ol>
		</p>

	</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -