asp.net±¸·ÝÊý¾Ý¿â
Asp.Net ±¸·ÝºÍ»Ö¸´SQL SERVER Êý¾Ý¿â
ÎÒÃÇͨ³£±¸·ÝÊý¾Ý¿âʱ£¬ÐèÒªµÇ¼Êý¾Ý¿â·þÎñÆ÷È¥±¸·ÝºÍ»Ö¸´£¬ÕâÑùºÜ²»·½±ã£¬ÆäʵSQL SERVER×Ô´øµÄÃüÁî¿ÉÄÜÈÃÎÒÃǺܼòµ¥µØʵÏÖÔ¶³Ìͨ¹ýAsp.Net±¸·ÝºÍ»Ö¸´Êý¾Ý¿â¡£
BACKUP DATABASE '±»±¸·ÝµÄÊý¾Ý¿âÃû' TO DISK = '±¸·ÝÎļþ·¾¶';
ALTER DATABASE '±»»Ö¸´µÄÊý¾Ý¿âÃû' SET OFFLINE WITH ROOLBACK IMMEDIATE;
RESTORE DATABASE '±»»Ö¸´µÄÊý¾Ý¿âÃû' from DISK = '±¸·ÝÎļþ·¾¶';
ALTER DATABASE '±»»Ö¸´µÄÊý¾Ý¿âÃû' SET ONLINE WITH ROOLBACK IMMEDIATE;
¼òµ¥¼¸ÌõÃüÁî¾Í¿ÉÒÔÍê³ÉÊý¾Ý¿âµÄ±¸·ÝºÍ»Ö¸´£¬ÔÚAsp.NetÖУ¬¿ÉÒÔÏñµ÷ÓÃSqlÓï¾äÒ»Ñùµ÷ÓÃÕâËÄÌõÓï¾ä£¬ÇáÇáËÉËÉʵÏÖSQL SERVERÊý¾Ý¿âµÄ±¸·ÝºÍ»Ö¸´¡£
Àý×Ó(ÒÔNorthwindΪÀý)£º
1¡¢±¸·ÝNorthwindÊý¾Ý¿âµ½CÅ̸ùĿ¼Ï£¬ÒÔ'Northwind.bak'ΪÃû£º
BACKUP DATABASE 'Northwind' TO DISK = 'C:\Northwind.bak';
2¡¢»Ö¸´NorthwindÊý¾Ý¿â,CÅ̸ùĿ¼ÏµÄ'Northwind.bak'±¸·ÝÎļþ£º
a¡¢½«Êý¾Ý¿âÖÃÓÚÀëÏß״̬
ALTER DATABASE 'Northwind' SET OFFLINE WITH ROOLBACK IMMEDIATE;
b¡¢»Ö¸´NorthwindÊý¾Ý¿â
RESTORE DATABASE 'Northwind' from DISK = 'C:\Northwind.bak';
c¡¢½«Êý¾Ý¿âÖÃÓÚÔÚÏß״̬
ALTER DATABASE 'Northwind' SET ONLINE WITH ROOLBACK IMMEDIATE;
»Ö¸´Êý¾Ý¿â£º
¹Ø¼ü×Ö£ºAlter Database ±»»Ö¸´µÄÊý¾Ý¿âÃû Set Offline with Rollback immediate;
restore database ±»»Ö¸´µÄÊý¾Ý¿âÃû from disk = '±¸·ÝÎļþ·¾¶';
Alter Database ±»»Ö¸´µÄÊý¾Ý¿âÃû Set OnLine With rollback Immediate;
/////////////////////
string sql = "Alter Database db Set Offline with Rollback immediate;"; //db ÊÇÒª±¸·ÝµÄÊ
Ïà¹ØÎĵµ£º
Ò»¡¢ÈÏʶWeb.configÎļþ
Web.config ÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ý.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈ쵀 Web.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖ㬠......
¸ÕѧϰASP.NET AJAX¿ª·¢£¬½ñÌìÓöµ½Ò»¸öÆæ¹ÖµÄÎÊÌ⣬¿ÉÄÜÊÇ×Ô¼º²»ÊìµÄÔÒò£¡£¡
ÔÚvs2005Æô¶¯µÄʱºò£¬ÔÚasmxÎļþÖУ¬Ìí¼Ó¶Ïµã£¬Æô¶¯µ÷ÊÔÄÜÕý³£½øÈëµ½µ÷ÊÔÒ³Ã棬ȻºóÐÞ¸ÄasmxÒ³ÃæÒÔºó£¬
ÖØÐÂÆô¶¯µ÷ÊÔ£¬¾Í²»ÄÜÕý³£½øÈëµ½asmxÎļþÖеĶϵ㣬¶øÇÒÎļþÐ޸ĵĵط½£¬¶ÔÓÚÒ³Ãæµ÷ÓÃÖ±½ÓÎÞЧ£¬ÏÔʾЧ¹ûʼÖÕÊÇÐÞ¸ÄÇ°µÄЧ¹û£¡£¡
......
1 »ñÈ¡´íÎóÐÅÏ¢²¢µ½Ö¸¶¨Ò³Ã治ҪʹÓÃResponse.Redirect,¶øÓ¦¸ÃʹÓÃServer.Transfer
e.g
// in global.asax
protected void Application_Error(Object sender, EventArgs e) {
if (Server.GetLastError() is HttpUnhandledException)
Server.Transfer("MyErrorPage.aspx");
//ÆäÓàµÄ·ÇHttpUnhandledExceptio ......
½üÈÕÔÚ´ò¿ªÔÀ´Ð´µÄÒ»¸öÍøÒ³³ÌÐòÔËÐÐʱ£¬³öÏÖÁËExcel²Ù×÷ȨÏÞµÄÎÊÌ⣬¾ßÌåµÄ˵¾ÍÊÇÔÚ´úÂëÖе÷ÓÃÏÂÃæÕâ¶ÎÓëExcel²Ù×÷ÓйصÄÓï¾äʱ£¬
¡¡¡¡Application curExcelApp = new ApplicationClass();
¡¡¡¡ÌáʾȨÏÞ²»×㣬¾ßÌåµÄÌáʾÄÚÈÝÈçÏ£º
¡¡¡¡¼ìË÷ COM À๤³§ÖÐ CLSID Ϊ {00024500-0000-0000-C000-000000000046} µÄ×é¼þʱ ......
×î½ü×ö±£´æÔ¶³ÌͼƬʱºò£¬¾ÍÔÚ±£´æµÄʱºò×ÜÊdzöÕâ¸ö´íÎó£¬ÍøÉÏgoogleÁËһȦ£¬¶¼ÊÇÔÙ˵ȨÏÞÎÊÌ⣬ÎÊÌâÎÒÊÇÓÃUÅÌ£¬ÄÄÀïÓÐʲôȨÏÞÎÊÌâ¡£
×îºóÎÞÒâÖз¢ÏÖÁËÎÊÌâËùÔÚ
±£´æµÄʱºò²»ÄÜÓÃÏà¶Ô·¾¶£¬Ò»¶¨ÒªÓÃserver.mappath()´¦Àíһϱ£´æµÄ·¾¶¡£¡£¡£°¦£¡ ......