鎽樿锛氶殢鐫€绀句細绉戞妧鐨勪笉鏂彂灞曪紝瓒婃潵瓒婂鐨勫鏍″洜涓篒nternet鐨勬櫘鍙婏紝鑰屾嫢鏈夊睘浜庤嚜宸卞鏍$殑缃戠珯锛岃€屽湪鏍″洯缃戠珯褰撲腑锛屾渶閲嶈鐨勭粍鎴愰儴鍒嗗垯鏄牎鍥殑缃戠粶鏁呴殰鐨勭淮淇繖涓€鏂归潰銆備紶缁熺殑鍩轰簬ASP鍜孞avaScript銆乂BScript绛夎剼鏈瑷€锛屽皢鍔ㄦ€佺綉椤靛拰鏁版嵁搴撶粨鍚堬紝鑰岄€氳繃搴旂敤绋嬪簭杩涜澶勭悊杩欎竴鏂规硶鍏锋湁杈冨ぇ鐨勫眬闄愭€с€傚湪寮€鍙戞绯荤粺鐨勬椂鍊欙紝涓昏鏄噰鐢ㄧ殑ASP.NET鐨勬妧鏈墜娈碉紝骞朵笖鏄缓绔嬪湪NET Framework骞冲彴涓婄殑涓€绉嶆妧鏈紝瀵逛簬瀹炵幇鐨勮繃绋嬫潵璇达紝鍒欏彲浠ラ€氳繃C璇█鏉ュ畬鎴愩€傚湪姝ょ郴缁熷綋涓紝鎵€閲囩敤鐨凙DO.NET鎶€鏈兘澶熼伩鍏嶅浜庢暟鎹簱杩炴帴鐨勪緷璧栵紝涔熻兘澶熷绾冲叧绯昏緝涓哄鏉傜殑鏁版嵁锛涘苟涓旓紝姝ょ被妯″紡锛屽浜庣淮鎶よ垂鐢ㄤ篃鏈変竴瀹氱▼搴︾殑鎺у埗锛屽皢杞欢鐨勫彲浼哥缉鎬т互鍙婂彲绉绘鎬ц繘涓€姝ョ殑寰楀埌浜嗘彁楂橈紝鍚屾椂涔熺‘淇濅簡缃戠粶鎬ц兘鐨勭ǔ瀹氾紝鍐嶈繘涓€姝ヨ锛屽浜庡紑鍙戜汉鍛樼殑鐢熶骇鍔涗互鍙婂浜庡紑鍙戠殑鍛ㄦ湡閮芥湁浜嗕竴瀹氱殑甯姪锛涚浉瀵逛簬ASP鏉ョ湅锛孉SENET杩欎竴鐢ㄧ敤绋嬪簭鐨勯厤缃嫢鏈夋洿楂樼殑瀹夊叏鎬с€傚苟涓斿ASP.NET瀹夊叏鏈哄埗鐨勭爺绌朵笌瀹炵幇杩涜姣旇緝娣卞叆鐨勭爺绌躲€?
鍏抽敭璇嶏細Web锛涙牎鍥綉缃戠粶鏁呴殰锛汚SP.NET锛沄b
涓浘鍒嗙被鍙凤細TP393鏂囩尞鏍囪瘑鐮侊細A鏂囩珷缂栧彿锛?009-3044(2012)14-3268-03
The Campus Network Based on Web Network Fault System Design and Implementation
ZHONG Bai-sheng
(Guangdong Vocational Institute of Public Administration,Guangzhou 510800, China)
Abstract: Along with society the development of science and technology, more and more schools because of the popularity of Internet, and have their own school site, and in the campus website, the most important part is the campus network fault repair of the hand. Based on the traditional ASP and JavaScript, VBScript scripting language, dynamic webpage and database integration, and through the application of procedures for dealing with this method has great limitation. In the development of this system, mainly uses the ASP.NET technology, and is based on the NET Framework platform of a technology, to realize the process, can be through the C language to complete. In this system, the ADO.NET technology can avoid the database connection dependence, also can accommodate relations more complex data; and, this kind of mode, the maintenance cost is also a certain degree of control, the software scalability and portability of a further im proved, but also to ensure that the performance of network stability, further, the developer productivity as well as for the development of the cycle have certain help; relative to the ASP, ASENET the use procedure configuration has higher security. And the ASP.NET security mechanism research and Implementation for more in-depth studies.
Key words: campus network fault; web; asp.net; vb
1缁
1.1璇鹃鑳屾櫙銆佺爺绌舵剰涔夊拰鏉ユ簮
鏍″洯缃戠綉缁滄晠闅滅淮淇郴缁熷湪楂樻牎鐨勭綉缁滅淮鎶ゅ綋涓槸蹇呬笉鍙皯鐨勶紝鍘熷洜鍦ㄤ簬鏍″洯缃戠綉缁滄晠闅滅淮淇郴缁熻兘澶熶负鐢ㄦ埛鎻愪緵鍐呭涓板瘜鐨勪俊鎭拰蹇嵎鐨勬煡璇㈡柟寮忋€備絾鏄紝鍦ㄤ互鍓嶇殑寰堥暱涓€娈垫椂闂撮噷闈紝浜轰滑鐨勭鐞嗘柟寮忎緷鐒跺眬闄愪簬浼犵粺妯″紡锛岃€屼紶缁熸ā寮忕殑淇濆瘑鎬т笌鏁堢巼閮戒笉鑳芥弧瓒崇幇浠e寲鐨勯渶姹傦紝鑰屼笖锛屽湪杩涜鏇存柊銆佺淮鎶ょ瓑澶勭悊鏃剁粰绠$悊浜哄憳甯︽潵鐨勫伐浣滈噺鍜岄夯鐑︽槸鐩稿綋澶х殑銆傜壒鍒槸杩戝嚑骞撮珮鏍″悎骞躲€佹墿鎷涳紝涔熷氨浣垮緱浜哄伐绠$悊鐨勭己鐐规棩鐩婄獊鍑恒€?
ASENET浣滀负涓€涓紑鍙戠郴缁燂紝鏄熀浜庣粍浠舵妧鏈互鍙婇潰鍚戝璞$殑锛岀▼搴忓憳灏辫兘澶熶娇鐢ㄤ緥濡傛枃浠朵笂浼犮€丒-Mail鍙戦€併€佹枃浠舵搷浣溿€佸箍鍛婄瓑鍐呭涓板瘜鐨勭粍浠躲€傛澶栵紝绋嬪簭鍛樺彲浠ユ牴鎹嚜韬殑闇€瑕侊紝寮€鍙戝嚭閫傚悎鑷繁杩愮敤鐨勭粍浠讹紝灏咥SP.NET鐨勫姛鑳借繘涓€姝ョ殑鎵╁睍銆傚浜庝唬鐮佺▼搴︾殑瀹炵幇浠ュ強鍒嗙HTML浠g爜鐨勬椂鍊欙紝浣跨敤Code-Behind鎶€鏈垨鑰呮槸ASP.NET鐩存帴鏀寔缁勪欢鑳藉鏇村ソ鐨勮繘琛屽鐞嗐€侫SENET閲囩敤浜嗘柊鐨勫彨鍋欰DO.NET鐨勬暟鎹簱璁块棶鎶€鏈紝鍙互澶уぇ鍦版彁楂樻暟鎹闂殑鏁堢巼锛屼篃鍙互寰堝鏄撳湴寮€鍙戝簲鐢ㄧ郴缁燂紝淇冧娇ASP.NET鎶€鏈殑绯荤粺鎬ц兘鏈変簡寰堝ぇ鐨勬敼鍠勩€傜浉瀵逛簬ASP鏉ヨ锛岄厤缃簲鐢ㄧ▼搴忎腑ASENET鐨勫畨鍏ㄦ€ф洿楂樸€傚湪ASP.NET涓韩浠借璇佹湁None銆乄indows銆丗orms銆丳assport绛夊洓绉嶆柟寮忋€侫SP.NET鏄睘浜庢湰鍦扮殑Windows甯愭埛锛屽鏋滅渷鐣ヤ簡瀵逛簬韬唤鐨勯獙璇佺殑鎯呭喌涓嬶紝渚濈劧鑳藉淇濇寔ASP.NET鐨勬湁鏁堟€т笉澶便€傜瓑鍒拌韩浠藉姞浠ョ‘璁や箣鍚庯紝瀵逛簬鐢ㄦ埛璁块棶鐨勬煇浜涢〉闈㈢殑闄愬埗浠ュ強鍏佽锛屽苟涓斿ASPJ蹇窽瀹夊叏鏈哄埗鐨勭爺绌朵笌瀹炵幇杩涜姣旇緝娣卞叆鐨勭爺绌躲€?
1.2鍥藉唴澶栫爺绌舵鍐?
2000骞?鏈?2鏃ワ紝寰蒋鍏徃鍚戝叏鐞冨甯冧簡鍏朵笅涓€浠h蒋浠朵笌鏈嶅姟锛屽嵆Microsoft.NET骞冲彴鐨勬瀯鎯充笌瀹炴柦姝ラlIJ銆?Net鐨勭洰鏍囨棤璁轰綘鍦ㄤ綍鏃朵綍鍦帮紝鍦ㄥ鐞嗕釜浜烘暟鎹€佷笂缃戞垨鑰呮槸鐜╂父鎴忥紝閮藉彲浠ラ€氳繃鎵嬫満鎴栬€呮槸鎺屼笂鐢佃剳绛夎澶囨潵瀹屾垚銆傛垜浠€氫織涓€鐐硅鏄庯紝.NET鐨勬牳蹇冨唴瀹逛箣涓€灏辨槸瑕佹惌寤虹涓変唬浜掕仈缃戝钩鍙般€備粠.NET鐨勫彂甯冧箣鏃ュ紑濮嬶紝鍥藉唴澶栧瀹冪殑鐮旂┒姣旇緝澶氥€傚浗澶栧ASP.NET鐮旂┒鏂归潰鐨勮祫鏂欐瘮杈冧赴瀵岋紝Jesse Liberty鍜孌an Hurwitz灞曠ず濡備綍浣跨敤VisualStudi02005銆乧缇?.0鍜孉SP.NET2.0鏉ユ瀯寤轰笅涓€浠eb搴旂敤绋嬪簭H銆備綘寰堝揩灏辫兘澶熺敤姣斾綘鎵€鑳芥兂璞$殑鏇村皯鐨勬椂闂村強鏇村皯鐨勪唬鐮佹潵寤虹珛鏇村畨鍏ㄥ拰鏇翠氦浜掔殑绔欑偣銆?
Glenn Johnson鏄竴鍚嶄笓涓氬煿璁笀锛屽叿鏈夊骞寸殑鏁欏缁忛獙锛屼粬鏇炬媴浠昏繃Tyco鍥介檯闆嗗洟鐨勪俊鎭妧鏈拰鎶€鏈敮鎸佹€荤锛岀洰鍓嶅湪寮€灞曡嚜宸辩殑鍩硅銆佸挩璇㈠拰寮€鍙戜笟鍔°€備粬寮€鍙戣繃璇句欢锛屽苟鍦ㄥ叏鐞冨悇鍦拌杩嘙icrosoft ASENET锛孉DO.NET锛孋鏍峰拰.NET璇剧▼銆傚苟鍑虹増浜嗕笓闂ㄤ粙缁峂icrosoft ADO.NET 2.0鐨勫熀鏈姛鑳藉拰鏂扮壒鎬х殑鎶€鏈弬鑰冧功锛岃瑙DO.NET闈炶繛鎺ョ被銆丄DO.NET杩炴帴绫汇€佹棩蹇楄窡韪€佹暟鎹繛鎺ョ殑楂樼骇涓婚銆佸苟鍙戝啿绐併€佹暟鎹綉鏍兼帶浠躲€佷簨鍔°€佸厓鏁版嵁銆丄DO.NET瀹夊叏鎬х瓑涓€绯诲垪閲嶈闂銆傝繎鍑犲勾鏉ュ浗鍐呭浜嶢SP.NET鎶€鏈殑鐮旂┒涔熸鍦ㄥ叴璧枫€侫SP.NET鐢变簬鍏锋湁绠€娲佺殑璁捐鍜屽疄鏂斤紝鍔犱笂鍏跺紑鍙戠幆澧冨厑璁歌缃柇鐐广€佽窡韪唬鐮佹鍜屾煡鐪嬭皟鐢ㄥ爢鏍堬紝鏄竴涓鏉傜殑璋冭瘯鐜锛岃繖鏍峰繀鐒跺鑷磋澶氱涓夋柟鐨凙SENET IDE瑙e喅鏂规宸茬粡鎴栨鍦ㄥ嚭鐜般€傚彟澶朅SENET涓昏搴旂敤浜嶹鈥檓dows骞冲彴锛岃櫧鐒舵坊鍔犵粍浠跺悗涔熷彲浠ョ敤浜嶭inux骞冲彴锛屼絾鏄緢澶氶噸瑕佺殑鍔熻兘娌″姙娉曞疄鐜般€傞拡瀵硅繖浜涙儏鍐碉紝杩戝嚑骞存潵鍥藉唴瀵逛簬ASP.NET鎶€鏈殑鐮旂┒涔熸鍦ㄥ叴璧枫€傞儩鍒氾紝澶氬勾浠庝簨璁$畻鏈鸿蒋浠躲€侀€氫俊銆佺數瑙嗙郴缁熺瓑宸ヤ綔銆?000骞村紑濮嬭嚧鍔涗簬.NET鎶€鏈爺绌躲€傝嚦浠婏紝宸插彂琛ㄨ鏂囧崄浣欑瘒锛屽苟浜?006骞村嚭鐗堟柊浣?ASP锛歂ET 2.0寮€鍙戞寚鍗椼€嬶紝鍦ㄥ熀浜嶢SP.NET鎶€鏈殑鐗规€ф鏋跺熀纭€涓娿€傚厖鍒嗚鏄庢妧鏈悊璁虹殑鍚屾椂锛岃缁嗗垱寤哄拰鍒嗘瀽浜嗘暟鍗佷釜涓庣悊璁哄瘑鍒囩浉鍏崇殑鍏稿瀷搴旂敤pJ.鏉ㄤ簯锛孧icrosoft M鈥橵P锛屽弬鍔犺繃澶氶」鍩轰簬寰蒋.NET鎶€鏈殑澶у瀷椤圭洰锛屽寘鎷紒涓氱骇搴旂敤绯荤粺銆佺數淇″簲鐢ㄧ郴缁熴€佹斂搴滃姙鍏嚜鍔ㄥ寲绯荤粺绛夈€傞暱鏈熶粠浜嬪井杞疉SP.NET鎶€鏈柟闈㈢殑鍩硅锛屾槸寰蒋鎸囧畾鍩硅涓績璁插笀锛屽苟涓哄井杞柊闂荤粍鍜屽瀹舵姤绾告潅蹇楁挵鍐欐枃绔犮€傚湪Microsoft ASP.NET鎶€鏈綋绯绘柟闈㈢殑涓昏鐮旂┒鏂瑰悜鏄細14IASP.NET鎶€鏈湪瀹為檯椤圭洰涓殑绠€渚垮紑鍙戯紝鍏稿瀷璁捐妯″紡鍦╓eb寮€鍙戜腑鐨勮繍鐢ㄣ€傚彟澶栧崡浜偖鐢靛ぇ瀛︾殑鍚寸礌鐞淬€佸緪鑹冲钩銆佹柤寤哄崕绛変汉涔熷Asp.NET瀹夊叏鏈哄埗鐨勭爺绌跺強瀹炵幇鏈夋墍闃愯堪銆?
1.3鐮旂┒鐨勪富瑕侀棶棰?
鏈枃浠ュ熀浜圓SP.NET鐨勬牎鍥綉缃戠粶鏁呴殰缁翠慨绯荤粺涓哄簲鐢ㄨ儗鏅紝涓昏鐮旂┒涓嬮潰涓ゆ柟闈㈢殑闂锛氾紙1锛夊湪鎶€鏈柟闈紝鏂囦腑鎵€閲囩敤鐨凙SP.NET鎶€鏈浉姣擜SP鏇村姞鐨勫厛杩涳紝骞朵笖寤虹珛鍑哄垝鍒嗘ā鍧椾互鍙婄郴缁熺殑妯″瀷锛屽湪璁块棶鏁版嵁搴撶殑鏃跺€欙紝鍩轰簬ADO.NET鎶€鏈紝骞朵笖鏋勫缓鍑轰竴涓畬鏁存€ц緝楂樼殑鏍″洯缃戠綉缁滄晠闅滅淮淇郴缁熴€?2)鏀硅繘ASENET鎶€鏈殑瀹夊叏鏈哄埗锛屽绯荤粺杩涜鍏ㄩ潰缁煎悎鐨勮瘎娴嬶紝鍒嗘瀽璇勬祴缁撴灉锛屽苟灏盇SP.NET鐨勫畨鍏ㄦ満鍒剁殑鐮旂┒涓庡疄鐜版彁鍑轰簡鍑犱釜瑙傜偣鍙婃敼杩涘缓璁€?
2绯荤粺寮€鍙戠浉鍏虫妧鏈垎鏋?/b>
2.1 .NET Framework
寰蒋鍏徃灏?NET Framework鐪嬫垚涓轰簡鍙戝睍鐨勪竴涓叏鏂扮殑鐩爣锛岃€?NET Framework灏嗗叕鍙哥殑鎴樼暐鏍稿績銆佹礊瀵熷姏绛夌瓑閮藉寘鍚湪浜嗗叾涓€傚苟涓旓紝鍦ㄥ紑鍙戝嚭鏉ョ殑浜у搧褰撲腑锛屽井杞叕鍙搁兘鏄姹備簡鍥寸粫姝ゆ垬鐣ヨ繘琛岀爺绌跺紑鍙戠殑锛?NET Framework浣滀负鏍稿績鎶€鏈紝璇ユ鏋跺叏鏂逛綅鐨勫浜?NE鏍稿績鐨勬妧鏈彁渚涗簡鏈€涓烘湁鏁堢殑鏀寔銆備綔涓虹幇浠e寲褰撲腑涓€绉嶈緝涓烘柊棰栫殑骞冲彴鎶€鏈紝鍦ㄤ竴瀹氱▼搴︾殑绠€鍖栦簡搴旂敤绋嬪簭鐨勫紑鍙戠殑杩囩▼锛屽綋鐒舵槸鍦↖nternet鐨勭幆澧冨綋涓疄鐜扮殑銆傚浜庝俊鎭殑涓昏鍐呭銆佹椂闂翠互鍙婁紶閫佺殑鎺у埗鏂归潰锛屼负瀹㈡埛鎻愪緵鐨勬湇鍔℃洿鍔犱紭绉€銆? NET Framework绫诲簱涓庡叕鍏辫瑷€杩愯搴撴槸.NET Framework鐨勪袱涓噸瑕佺殑瓒宠閮ㄥ垎銆?
2.2 ASP.NET鎶€鏈?
ASP.NET鏂版ā鍨嬫槸鍩轰簬ASP.NET鎶€鏈彲浠ュ垱寤哄己澶х殑鍙紪绋媁eb椤甸潰锛氭墦鐮翠簡浼犵粺搴旂敤绋嬪簭寮€鍙戝拰Web寮€鍙戜箣闂存浘缁忓瓨鍦ㄧ殑鐣岄檺锛涗笌鎵€鏈夋祻瑙堝櫒鍜岀Щ鍔ㄨ澶囧吋瀹癸紱涓庢墍鏈夎瑷€鍏煎锛屽彧瑕佽璇█琚叕鍏辫瑷€杩愯搴撴敮鎸侊紱椤甸潰涓婂厑璁镐唬鐮佸拰鍐呭鍒嗙锛涙敮鎸佸簽澶х殑鎺т欢闆嗭紱鎻愪緵鐘舵€佺鐞嗗姛鑳介泦锛岀敤浠ヤ繚瀛榃eb椤甸潰鍦ㄤ笉鍚岃姹備箣闂寸殑鐘舵€?鐩稿浜嶢SP鑰岃█锛屼篃鍏峰涓€瀹氱殑浼樿秺鎬э紝鑰屽湪浠ヤ笅鐨勫嚑涓柟闈綋鐜板嚭鏉ワ細锛?锛変綔涓轰簡.NET Framework鐨勪竴涓噸瑕佺殑缁勬垚閮ㄥ垎锛孉SP.NET灏?NET Framework鑷韩鎵€鎷ユ湁鐨勫畨鍏ㄦ€ч泦浜庝竴韬紝骞朵笖鍦ㄨ繍琛屾柟闈紝鏄湪鍏叡璇█鐨勮繍琛屽簱褰撲腑杩涜鎵樼寮忕殑杩愯銆傚湪鍔熻兘鎵ц涓婁富瑕佹槸瀵逛簬.NET搴撴墍寮€鍙戝嚭鏉ョ殑搴旂敤绋嬪簭杩涜涓€瀹氱殑璐d换绠$悊銆傦紙2锛堿SENET骞堕潪鏄瑙i噴鍑烘潵鐨勶紝浜屾槸閫氳繃浜嗙紪璇戞柟寮忓憟鐜扮殑锛屼篃鎻愰珮浜嗗叾杩愯鐨勯€熷害銆備絾鏄疉SP涔熷瓨鍦ㄤ竴瀹氱殑缂洪櫡锛氫富瑕佹槸鐢变簬瑙i噴鐨勫師鍥狅紝瀵艰嚧浜嗗湪鎵ц鐨勮繃绋嬩腑锛岄€熷害杈冧负缂撴參锛涢绻佺殑瀵逛簬鏂囦欢杩涜璁块棶锛涘湪鐗堟湰鏂归潰锛岃剼鏈富鏈虹殑鐗堟湰涔熷瓨鍦ㄤ竴瀹氱殑闂锛涘湪璇█鐨勫紑鍙戜笂锛岀┖闂翠篃鍗佸垎鐨勬湁闄愩€傦紙3锛堿SENET鍦ㄦ敮鎸佷笂闈紝閫傚悎浜庡绉嶇殑璇█锛屽彧瑕佹槸鍦ㄨ瑷€鏂归潰灞炰簬.NET锛岄兘鑳藉姝e父鐨勮繘琛屻€傝€屽浜?NET鏉ヨ锛屽叾鐪熸鐨勮瑷€鏄疢icrosoft涓棿璇█锛涳紙4锛夊浜庡绉嶇殑璁惧涓庢祻瑙堝櫒锛孉SENET閮借兘澶熸敮鎸佽繍浣滐紝骞朵笖鍏跺吋瀹规€ц緝寮猴紱锛?锛堿SENET灞炰簬涓€绉嶅畬鍏ㄩ潰鍚戜簬瀵硅薄鐨勪竴绉嶈瑷€锛屽湪Web.UI.Page .System鐨勫璞′箣涓婏紝ASPX椤甸潰寰椾互缁ф壙锛屽湪浣跨敤涓婏紝ASPX鑳藉浣滀负閲嶇偣浣跨敤鐨勪竴閮ㄥ垎锛屽苟涓斿湪鎿嶄綔鏂归潰锛屼粎浠呴渶瑕佸皢Web鐨勫簲鐢ㄧ▼搴忕殑鍛藉悕绌洪棿鍔犱互寮曠敤灏辫兘澶熻揪鍒伴鏈熺殑鏁堟灉锛涳紙6锛堿SP.NET鍖呯殑鏈韩灏卞叿鏈夊畨鍏ㄦā鍨嬶紝鍦ㄩ厤缃柟闈篃鍏锋湁鑷韩鐨勫彲绉绘鎬э紝IIS(Internet Information Server)涓巜indows鐢ㄦ埛闂寸殑渚濊禆鎬у噺灏忥紝閲囩敤鍙墿灞曟爣璁拌瑷€(Extensible Markup Language锛孹ML)浣滀负閰嶇疆璇█锛孉SP.NET搴旂敤绋嬪簭鍖呭惈Web.Coflg閰嶇疆鏂囦欢锛?7)鍦╒S.NET(visual Studio.NET)鐜涓婣SENET鏄噰鍙栨帶浠堕┍鍔ㄧ殑鏈哄埗锛屾湇鍔″櫒璇嗗埆鐨凥TML鎺т欢锛氫粠ASP鍚慉SP.NET杩佺Щ鐨勪竴涓柟娉曟槸鎶妑una-t-2"server"娣诲姞鍒癏TML鎺т欢涓?濡傦細鏁版嵁缁戝畾鎺т欢SQL Data Reader锛涳紙8锛夌敱浜庡湪鍏冧欢褰撲腑锛孉SP骞舵病鏈夊皢浠讳綍鐨勮緭鍑虹殑鏁版嵁浣滀负鍐呭鎻愪緵鍑烘潵锛屽洜姝わ紝杩涜鏁版嵁搴撻〉闈㈢殑鐨勬挵鍐欑殑杩囩▼褰撲腑锛岃繘琛屼竴娆$殑璇诲彇璁板綍锛屽€熷姪鐨勪负ADO鐨凴ecord Set锛岀劧鑰岋紝Dam Grid绛夋暟鎹簱鐨勫厓浠跺湪ASP.NET鐨勪娇鐢紝鍏舵暟鎹氨鑳藉鏇村姞蹇€熺殑杩涜瀛樺彇銆傦紙9锛夊湪鏇存柊鏂归潰锛孉SP.NET鍙互杩涜瀹炴椂鐨勬洿鏂般€傚湪鏂囦欢鐨勬洿鏂版柟闈紝绠$悊浜哄憳涓嶅湪闇€瑕佸皢缃戠粶鐨勬湇鍔″櫒鍏抽棴鎴栬€呮槸灏嗗簲鐢ㄧ▼搴忓仠姝€傚苟涓旀案杩滀笉浼氶攣瀹氬簲鐢ㄧ▼搴忕殑鏂囦欢锛屾墍浠ワ紝鏈夊彲鑳芥湁瑕嗙洊鐨勭幇璞″嚭鐜板湪绋嬪簭鐨勬甯歌繍琛屽綋涓紝鍦ㄦ枃浠惰繘琛屼簡鏇存柊涔嬪悗锛屼綔涓鸿繍琛岀殑绯荤粺锛屼篃鑳藉娓╁拰鐨勫皢鍏惰浆鎹㈠埌鏂扮殑鐗堟湰涔嬩腑鍘汇€?
3.1绯荤粺闇€姹傚垎鏋?
鏍″洯缃戠綉缁滄晠闅滅淮淇郴缁熶富瑕佹槸婊¤冻瀛︽牎绠$悊鏍″洯缃戜互鍙婄浉鍏崇殑骞寸骇銆佺彮绾с€佽绋嬨€佹暀甯堢瓑淇℃伅闇€姹傘€傞渶姹傜殑鍏蜂綋鍔熻兘濡備笅锛氾紙1锛夊湪杩涜鐢ㄦ埛鐨勬敞鍐屼笌鐧诲綍鏂归潰锛氬浜庣敤鎴风櫥褰曠殑淇℃伅鏄惁绗﹀悎娉曞緥鐨勮姹傝繘琛岄獙璇侊紱鐢ㄦ埛娉ㄥ唽涓昏鏄敱绯荤粺绠$悊鍛樻坊鍔犳柊鐨勭敤鎴枫€?2)鐢ㄦ埛鍜岃鑹茬鐞嗭細鐢ㄦ埛鍜岃鑹茬鐞嗘ā鍧椾富瑕佸寘鎷敤鎴风鐞嗐€佽鑹茬鐞嗕互鍙婄敤鎴峰拰瑙掕壊涔嬮棿鐨勫叧绯荤鐞嗭紝鍖呮嫭鐢ㄦ埛绠$悊銆佽鑹茬鐞嗐€佹坊鍔犺鑹插拰鐢ㄦ埛淇敼瀵嗙爜绛夈€?3)鏁呴殰鎶ヤ慨妯″潡锛屾牴鎹嚜鍔ㄧ敓鎴愮殑璐﹀崟鍙风鐞嗙淮淇繘搴︺€佺淮淇粨鏋溿€傦紙4锛夐棶棰樻绱紝鏍规嵁闂妫€绱㈡煡璇㈤棶棰樼殑瑙e喅鏂规硶銆傦紙5锛夊悗鍙扮鐞嗭紝鏍规嵁鏁版嵁鑷姩缁熻甯歌闂鍙婄綉绠$殑宸ヤ綔閲忋€?
3.2绯荤粺鏋舵瀯璁捐
鍦ㄦ湰璁烘枃褰撲腑鎵€璁捐鍒扮殑Web搴旂敤绯荤粺涓昏鏄暟鎹簱銆佹暟鎹闂眰銆乄eb鏄剧ず灞備笁涓柟闈㈢殑鏋舵瀯灞傘€傝€岀郴缁熺殑涓昏璁捐妗嗘灦濡備笅锛?
鍥?绯荤粺鎬讳綋鏋舵瀯璁捐鍥?
涔嬩笅鐨勭▼搴忓氨鏄湪浠嬬粛鏁版嵁璁块棶灞傜殑鏂归潰锛屼富瑕佺殑瀹炵幇鎵嬫銆備竴鑸潵璇达紝鏄€氳繃鐨刄ser DB绫昏繘琛屽疄鐜扮殑锛屽叿浣撶殑瀹炵幇鏂规硶锛?
鈭ヤ粠鐢ㄦ埛琛║sers鑾峰彇鎵€鏈夌敤鎴蜂俊鎭痯ublic Sql Data Reader Get Users 0锛?
鈭ヤ粠鐢ㄦ埛琛║sers鑾峰彇鍗曚釜鐢ㄦ埛淇℃伅
publ锛廲 SqlDataReader GetSingleUser(int nUserslD)
鈭ユ坊鍔犳柊鐢ㄦ埛鍒扮敤鎴疯〃Users涓?
public int AddUser(Smng sUserName锛孲tring sPassword,String sEmail锛宨nt nRoleID)
鈭ユ洿鏂扮敤鎴风殑瀵嗙爜
public void UpdateUserPWD(int nUserlD锛孲tring sPassword)
鈭ヤ粠鐢ㄦ埛琛║sers涓垹闄ょ敤鎴?
public void DeleteUser(int nUserlD)
鈭ヤ粠鐢ㄦ埛琛║sers涓幏鍙栫敤鎴稤锛岀敤浜庣敤鎴风櫥褰?
public SqlDataReader GetUserLogin(String sUserName锛孲tring sPassword)
鈭ラ獙璇佺敤鎴锋槸鍚︿负瓒呯骇绠$悊鍛樻垨鑰呯郴缁熺鐞嗗憳
public static int IsAuthorityAdmin(String sUserID)
3.3绯荤粺鍔熻兘璁捐
鍦ㄦ湰绯荤粺鐨勮璁″綋涓紝浣滀负瀛︽牎鏍″洯缃戠殑缃戠粶鏁呴殰鐨勭淮淇郴缁熸潵璇达紝浠栨槸瀹屾暣鐨勩€傝€冭檻鍒扮郴缁熺殑鍏蜂綋闇€姹傦紝鎴戜滑鑳藉鍒嗘瀽鍑鸿姹備负锛氬叾涓€锛岀晫闈㈠弸濂斤紝骞朵笖鎿嶄綔璧锋潵绠€鍗曟槗鎳傦紱鍏朵簩锛屽湪涓婚〉鐨勫搴旀爮褰撲腑鑳藉鍙婃椂鐨勮瀵熷埌淇℃伅鐨勫鐞嗭紱鍏朵笁锛屾棤璁烘槸鍦ㄥ綍鍏ャ€佹洿鏂般€佹煡璇㈡垨鑰呮槸鍒犻櫎淇℃伅绛夋柟闈㈢殑鍔熻兘閮界浉瀵瑰畬鍠勶紱鍏跺洓锛岃€冭檻鍒板鏍$殑涓嶅悓瑕佹眰锛屾绯荤粺鍙渶瑕佺◢寰繘琛屼竴涓嬩慨鏀癸紝灏卞彲浠ラ€傚簲鍏朵粬瀛︽牎绠$悊绯荤粺鐨勯渶姹傦紝鍏跺彲绉绘鎬ц緝楂樸€?
4缁撹
闅忕潃绀句細绉戞妧鐨勪笉鏂彂灞曪紝瓒婃潵瓒婂鐨勫鏍″洜涓篒nternet鐨勬櫘鍙婏紝鑰屾嫢鏈夊睘浜庤嚜宸卞鏍$殑缃戠珯锛岃€屽湪鏍″洯缃戠珯褰撲腑锛屾渶閲嶈鐨勭粍鎴愰儴鍒嗗垯鏄牎鍥殑缃戠粶鏁呴殰鐨勭淮淇繖涓€鏂归潰銆備粠涓€鑸殑鎯呭喌鏉ヨ锛屼紶缁熸ā寮忎箣涓嬶紝涓昏鍒嗕负浜嗕袱绉嶇綉绔欑鐞嗘柟娉曪細鍏朵竴锛岄潤鎬佺殑HT? ML椤甸潰锛屾槸閲囧彇鐨勫皢椤甸潰閲嶆柊鍒朵綔涔嬪悗锛岀劧鍚庡啀灏嗛〉闈㈣繘琛屼笂浼犲鐞嗭紝骞朵笖灏嗙浉搴旂殑杩炴帴杩涜淇敼锛屼絾鏄病鍦ㄦ晥鐜囨柟闈㈢◢鏄句笉瓒筹紱鍏朵簩锛屽熀浜庤剼鏈瑷€锛圓SP銆佲叇script绛夛級锛屾槸灏嗘暟鎹簱缁撳悎浜庡姩鎬佺綉椤碉紝杩欏睘浜庣洰鍓嶆瘮杈冨疄鐢ㄧ殑鏂瑰紡銆備絾鏄篃瀛樺湪涓€瀹氱殑缂洪櫡銆傛瘮濡侫SP鍙兘浣跨敤鑴氭湰璇█锛屼富瑕佷緷闈燡ava Script鍜孷B Script锛欰SP浠g爜涓嶩TML浠g爜娌℃湁鍒嗗紑锛屽悇绉嶆贩鏉傜殑浠g爜涓嶆柟渚垮墠鏈熺殑璁捐鍜屽悗鏈熺殑缁存姢锛涚敱浜嶢SP鐨勬湇鍔″櫒绔祫婧愯В閲婂瀷鑴氭湰锛岃€岃В閲婂瀷鑴氭湰鎵ц閫熷害姣旇缂栬瘧鐨勭▼搴忔參寰楀锛涘彟寮猴紝鑴氭湰骞冲彴甯︽潵鐨勯棶棰?ASP鍙橀噺鍏ㄩ儴鏄疺ariant绫诲瀷)浣垮緱鍏朵唬鐮佸儚鎰忓ぇ鍒╅潰鏉′竴鏍锋贩鏉傘€?
鍙傝€冩枃鐚?
[1]鑲栨枃鍐?娴呮瀽璁$畻鏈虹綉缁滄晠闅滃垎鏋愬強缁存姢[J].鐢佃剳鐭ヨ瘑涓庢妧鏈?2009(18).
[2]鐜嬪摬.鏍″洯缃戞晠闅滃強瑙e喅[J].璁$畻鏈哄畨鍏?2007(10).
[3]鍙ゆ柊鏂?璁$畻鏈虹綉缁滄晠闅滅殑褰掔被鍒嗘瀽[J].绉戞妧淇℃伅锛堝鏈爺绌讹級,2007(25).
[4]钃濆嘲.娴呰皥璁$畻鏈虹綉缁滃父瑙佹晠闅滃鐞嗗強缁存姢鏂规硶[J].纭呰胺, 2009(3).
[5]鏋楁垚鏄?璁$畻鏈虹綉缁淸M].鍖椾含锛氫腑澶箍鎾數瑙嗗ぇ瀛﹀嚭鐗堢ぞ, 2008.