2011年10月17日 星期一

以檔案總管開啟URL瀏覽資料夾(使用WebDAV架構)

1. IIS 網頁服務延伸將WebDAV設為允許
2. IIS 建立虛擬目錄並將瀏覽打勾,驗證存取勾選整合式windows及摘要式windows
3. 網頁加入以下程式
<style>
.httpFolder {behavior: url(#default#httpFolder);}
</style>
<script type="text/javascript">
function fnOpenFolderView(url) {
oDAV.navigateFrame(url, "_self");
}
</script>
<div id = "oDAV" class = "httpFolder" />
<a href="#" onclick = "fnOpenFolderView('http://...');">...</a>

註: WebDAV 只支援 IE

沒有留言:

自訂權限驗證機制

// 使用 filter [Route("api/[controller]")] [ApiController] [Authorize] [TypeFilter(typeof(CustomAsyncAuthorizationFilter))] public c...