ASP.netµÄurlÖØд
1.
ÓйØÓÚURLµÄÖØд£¬±¾ÎÄÒ²Ö»ÊÇÄÃÀ´Ö÷Òâ¡£Ïà¼ÌÓÐMSµÄ×é¼þ“URLRewriter”ºÍÔÚGlobal.asaxÀïµÄ“Application_BeginRequest()”±àÂ뷽ʽ£¬ÒÔ¼°IISÀïµÄISAPIÉèÖá£
ÄÈÁÐÏÂÀ´£¬ÊµÏÖ·½·¨Ò²¶¼ºÜ¼òµ¥¡£
·½·¨Ò»£ºMS×é¼þ
ÕâÀïÒ²²»ÓÃÏê½âÁË£¬Ïà¹ØÇë¿´£º
http://www.microsoft.com/china/msdn/library/webservices/asp.net/URLRewriting.mspx
Ó÷¨ºÜ¼òµ¥£¬Ö»ÐèÒª°Ñ×é¼þURLRewriter.dll¿½µ½Ó¦ÓóÌÐòµÄbinĿ¼Ï£¬È»ºóÔÚweb.configϼÓÈëÈçÏ´úÂ룺
ÔÚ<configuration></configuration>ÖмÓÈ룺
<configSections>
<sectionname="RewriterConfig"type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/(\d{4})/(\d{2})/Default\.aspx</LookFor>
<SendTo>~/Default.aspx?ID=$1</SendTo>
</RewriterRule>
</Rules>
</RewriterConfig>
È»ºóÔÚ<system.web></system.web>ÖмÓÈ룺
<httpHandlers>
<addverb="*"path="*.aspx"
type="URLRewriter.RewriterFactoryHandler, URLRewriter"/>
</httpHandlers>
×îºóÔÚµØÖ·À¸ÉϼüÈ룺http://localhost/Test/2004/12/News.aspx
Ч¹û³öÀ´ÁË¡£
ÉÏÃæµÄ<LookFor>~/(\d{4})/(\d{2})/News\.aspx</LookFor>Õâ¾äÕâÕýÔò±í´ïʽURL£¬¼´±»ÖØдµÄURL£¬¶ø
Ïà¹ØÎĵµ£º
1.·½·¨Ò»£º²ÉÓÃOleDB¶ÁÈ¡EXCELÎļþ£º
°ÑEXCELÎļþµ±×öÒ»¸öÊý¾ÝÔ´À´½øÐÐÊý¾ÝµÄ¶ÁÈ¡²Ù×÷£¬ÊµÀýÈçÏ£º
public DataSet ExcelToDS(string Path)
{
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+ Path +";"+"Extended Properties=Excel 8.0;";
OleDbConnection conn = new OleDbConnection(str ......
//Á¬½ÓÊý¾Ý¿â
string myStr = CODE.DbHelperSQL.connectionString;
SqlConnection myConn = new SqlConnection(myStr);
myConn.Open();
&nbs ......
asp.netÖÐʹÓûùÓÚ½ÇÉ«roleµÄFormsÑéÖ¤£¬´óÖ¾¹ý¼¸ÏÂËIJ½£º
1.ÅäÖÃϵͳweb.config
timeout="20" path="/" />
ÆäÖÐ ±íʾ±¾Ó¦ÓóÌÐò²ÉÓÃFormsÑéÖ¤·½Ê½¡£
1). ±êÇ©ÖеÄname±íʾָ¶¨ÒªÓÃÓÚÉí·ÝÑéÖ¤µÄ HTTP Cookie¡£Ä¬ÈÏÇé¿öÏ£¬name µÄÖµÊÇ .ASPXAUTH¡£²ÉÓôËÖÖ·½Ê½ÑéÖ¤Óû§ºó,ÒÔ´ËÓû§µÄÐÅÏ¢½¨Á¢Ò»¸öFormsAuthenticati ......
-----MD5¼ÓÃÜ
//ʹÓüÓÃÜ·þÎñÌṩ³ÌÐò(CSP) ÌṩµÄʵÏÖ£¬¼ÆËãÊäÈëÊý¾ÝµÄMD5 ¹þÏ£Öµ
MD5CryptoServiceProvider crypto = new MD5CryptoServiceProvider();
//½«×Ö·û´®× ......