from : http://blog.csdn.net/nileel/article/details/3519744
編譯完項目,訪問,經常出現“配置錯誤”,行***<add assembly="*"/>,某“DLL”文件拒绝访问。重启IIS也不行,重新编译也不对,基本每天都能遇到,频繁的时候编译一次遇到一次。狠狠的百度了一番,终于明白了。原来是windows的索引服务在搞鬼。windows的索引服务对asp.net的临时目录编制索引时,锁定了临时文件的访问权限,因此报错!
知道了原因,就好辦了
最簡單的解決辦法就是禁用索引服務,但是影響比較大。
可以刪除的PDB文件,但是調試的時候不方便
最後我採用的解決辦法是:
配置ASP.net的臨時目錄不受索引服務服務的影響的步驟如下:
1,開始 - 管理工具 - 計算機管理(Win2003的的位置,其他操作系統類似)打開計算機管理
2、展开计算机管理左边树中“服务和应用程序”节点,再在其下展开“索引服务”节点,再在其下展开“System”节点,再在其下展开“目录”节点。
3,在計算機管理的右邊我們可以看到配置的索引服務目錄。
4,在“目錄”節點上右擊鼠標,選擇“新建” - “目錄”
5,在“添加目錄”對話框中,路經輸入框中輸入ASP.net的臨時文件目錄默認應該是:
C :/ WINDOWS/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files文件/
6,在“包含在索引中嗎?”選項中,選擇“否”
7,單擊“確定”按鈕
8,在“索引服務”節點上右鍵單擊,重起索引服務即可。
2014年7月15日 星期二
2014年7月7日 星期一
[C#] 如何取得 Request URL 的各個部分
from寶哥 http://blog.miniasp.com/post/2008/02/10/How-Do-I-Get-Paths-and-URL-fragments-from-the-HttpRequest-object.aspx
底下這張表就是各種跟 Browser Request 的網址相關的屬性與用法:
| 網址:http://localhost:1897/News/Press/Content.aspx/123?id=1#toc | |
| Request.ApplicationPath | / |
| Request.PhysicalPath | D:\Projects\Solution\web\News\Press\Content.aspx |
| System.IO.Path.GetDirectoryName(Request.PhysicalPath) | D:\Projects\Solution\web\News\Press |
| Request.PhysicalApplicationPath | D:\Projects\Solution\web\ |
| System.IO.Path.GetFileName(Request.PhysicalPath) | Content.aspx |
| Request.CurrentExecutionFilePath | /News/Press/Content.aspx |
| Request.FilePath | /News/Press/Content.aspx |
| Request.Path | /News/Press/Content.aspx/123 |
| Request.RawUrl | /News/Press/Content.aspx/123?id=1 |
| Request.Url.AbsolutePath | /News/Press/Content.aspx/123 |
| Request.Url.AbsoluteUri | http://localhost:1897/News/Press/Content.aspx/123?id=1 |
| Request.Url.Scheme | http |
| Request.Url.Host | localhost |
| Request.Url.Port | 1897 |
| Request.Url.Authority | localhost:1897 |
| Request.Url.LocalPath | /News/Press/Content.aspx/123 |
| Request.PathInfo | /123 |
| Request.Url.PathAndQuery | /News/Press/Content.aspx/123?id=1 |
| Request.Url.Query | ?id=1 |
| Request.Url.Fragment | |
| Request.Url.Segments | / News/ Press/ Content.aspx/ 123 |
[SQL] NOT IN clause and NULL values
Author: Mango
|
at:晚上10:53
|
Category :
SQL
|
from:http://stackoverflow.com/questions/129077/not-in-clause-and-null-values
當下NOT IN時,括號裡面的值含有NULL,就會甚麼都撈不到
因為null不等於任何值
null也不等於null
所以,下NOT IN時,建議將null過濾掉 WHERE *** IS NOT NULL
A: select 'true' where 3 in (1, 2, 3, null)
B: select 'true' where 3 not in (1, 2, null)
Query A is the same as:
select 'true' where 3 = 1 or 3 = 2 or 3 = 3 or 3 = null
Since
3 = 3 is true, you get a result.
Query B is the same as:
select 'true' where 3 <> 1 and 3 <> 2 and 3 <> null
When
ansi_nulls is on, 3 <> null is UNKNOWN, so the predicate evaluates to UNKNOWN, and you don't get any rows.
When
ansi_nulls is off, 3 <> null is true, so the predicate evaluates to true, and you get a row.
zh-CN → zh-TW
,下
2014年7月6日 星期日
[C#] KeyValue 代碼表
from: http://www.cnblogs.com/manongxiaobing/archive/2012/11/05/2755412.html
鍵盤按鍵 - 對應的代碼
| backspace | 8 |
| tab | 9 |
| enter | 13 |
| shift | 16 |
| ctrl | 17 |
| alt | 18 |
| pause/break | 19 |
| caps lock | 20 |
| escape | 27 |
| page up | 33 |
| Space | 32 |
| page down | 34 |
| end | 35 |
| home | 36 |
| arrow left | 37 |
| arrow up | 38 |
| arrow right | 39 |
| arrow down | 40 |
| insert | 45 |
| delete | 46 |
| 0 | 48 |
| 1 | 49 |
| 2 | 50 |
| 3 | 51 |
| 4 | 52 |
| 5 | 53 |
| 6 | 54 |
| 7 | 55 |
| 8 | 56 |
| 9 | 57 |
| a | 65 |
| b | 66 |
| c | 67 |
| d | 68 |
| e | 69 |
| f | 70 |
| g | 71 |
| h | 72 |
| i | 73 |
| j | 74 |
| k | 75 |
| l | 76 |
| m | 77 |
| n | 78 |
| o | 79 |
| p | 80 |
| q | 81 |
| r | 82 |
| s | 83 |
| t | 84 |
| u | 85 |
| v | 86 |
| w | 87 |
| x | 88 |
| y | 89 |
| z | 90 |
| left window key | 91 |
| right window key | 92 |
| select key | 93 |
| numpad 0 | 96 |
| numpad 1 | 97 |
| numpad 2 | 98 |
| numpad 3 | 99 |
| numpad 4 | 100 |
| numpad 5 | 101 |
| numpad 6 | 102 |
| numpad 7 | 103 |
| numpad 8 | 104 |
| numpad 9 | 105 |
| multiply | 106 |
| add | 107 |
| subtract | 109 |
| decimal point | 110 |
| divide | 111 |
| f1 | 112 |
| f2 | 113 |
| f3 | 114 |
| f4 | 115 |
| f5 | 116 |
| f6 | 117 |
| f7 | 118 |
| f8 | 119 |
| f9 | 120 |
| f10 | 121 |
| f1 |
訂閱:
意見 (Atom)

