UWInfo Blog
發表新文章
[Join] | [忘記密碼] | [Login]
搜尋

搜尋意見
文章分類-#Author#
[所有文章分類]
所有文章分類
  • ASP.NET (48)
  • ASP.NET2.0 (15)
  • ASP.NET4.0 (34)
  • JavaScript (49)
  • jQuery (26)
  • FireFox (4)
  • UW系統設定 (3)
  • SQL (39)
  • SQL 2008 (25)
  • mirror (4)
  • SVN (4)
  • IE (9)
  • IIS (20)
  • IIS6 (1)
  • 閒聊 (7)
  • W3C (6)
  • 作業系統 (9)
  • C# (24)
  • CSS (12)
  • FileServer (1)
  • HTML 5 (11)
  • CKEditor (3)
  • UW.dll (13)
  • Visual Studio (16)
  • Browser (8)
  • SEO (1)
  • Google Apps (3)
  • 網站輔助系統 (4)
  • DNS (5)
  • SMTP (4)
  • 網管 (11)
  • 社群API (3)
  • SSL (4)
  • App_Inventor (1)
  • URLRewrite (2)
  • 開發工具 (6)
  • JSON (1)
  • Excel2007 (1)
  • 試題 (3)
  • LINQ (1)
  • bootstrap (0)
  • Vue (3)
  • IIS7 (3)
  • foodpanda (2)
  • 編碼 (2)
  • 資安 (3)
  • Sourcetree (1)
  • MAUI (1)
  • CMD (1)
  • my sql (1)
最新回應
  • Newtonsoft.Json.JsonConvert.DeserializeObject 失敗的情況
    test...more
  • dotnet ef dbcontext scaffold
    ...more
  • [ASP.NET] 利用 aspnet_regiis 加密 web.config
    ...more
  • IIS ARR (reverse proxy) 服務安裝
    ...more
  • [錯誤訊息] 請加入 ScriptResourceMapping 命名的 jquery (區分大小寫)
    ...more
  • 用 Javascript 跨網頁讀取 cookie (Cookie cross page, path of cookie)
    ...more
  • 線上客服 - MSN
    本人信箱被盜用以致資料外洩,是否可以請貴平台予以協助刪除該信箱之使用謝謝囉...more
  • 插入文字到游標或選取處
    aaaaa...more
  • IIS 配合 AD (Active Directory) 認証, 使用 .Net 6.0
    太感謝你了~~~你救了我被windows 認證卡了好幾天QQ...more
  • PostgreSQL 的 monitor trigger
    FOR EACH ROW 可能要改為 FOR EACH STATEMENT ...more
標籤
  • 1
  • https
  • [t],
  • 只取
  • 4450
  • a
  • 414
  • 複製
  • 匯出 IIS
  • ti
  • SmtpClient
  • [t]
  • 5456
  • server
  • ie
  • config
  • DB21211211
  • 872
  • SEO
  • 8 UNION AL
  • sp_
  • 安裝
  • 330
  • -1029 UNIO
  • ef
  • LINE
  • forti
  • -3968
  • ORM
  • 524
  • 專案
  • [u2]
  • .
  • 試題
  • C
  • debug orde
  • mod order
  • Scaffold
  • syslog
  • aspjpeg
  • 20
  • 708
  • 10
  • 分段
  • visualsvn
  • 6751
  • asp.ne
  • UWInfo
  • ARR
  • web
頁數 39 / 40 上一頁 下一頁
搜尋 1 結果:
Select with XLock
在 Select 指令後, 依據結果做一些工作, 即使有 Transaction, 但還是有可能發生一致性的問題:

Ex:

        Dim Conn As SqlConnection = UW.SQL.GetOpenedConnection
        Dim Tran As SqlTransaction = Conn.BeginTransaction

        Try
            Dim C As Int32 = UW.SQL.GetSingleValue("Select Counter From TableA Where Id = 1", Tran)
            C = C + 1
            UW.SQL.executeSQL("Update TableA Set Counter = " & C & " Where  Id = 1", Tran)
            Tran.Commit()
        Catch ex As Exception
            Tran.Rollback()
            UW.WU.DebugWriteLine(ex.ToString, True, True)

        Finally
            If Conn.State <> ConnectionState.Closed Then
                Conn.Close()
            End If

        End Try


以上的程式由兩個 Session 同時執行時, 並不能保証 Counter 會被加 2

若是要保証兩個 Session 都會把 Counter 加一(總共加 2), 要把以下這一行

Dim C As Int32 = UW.SQL.GetSingleValue("Select Counter From TableA Where Id = 1", Tran)

改為

Dim C As Int32 = UW.SQL.GetSingleValue("Select Counter From TableA With(XLock) Where Id = 1", Tran)
More...
Bike, 2012/5/3 下午 03:02:16
建立索引時加入其它非建值欄位
語法:


USE AdventureWorks;
GO
CREATE INDEX IX_Address_PostalCode      
ON Person.Address (PostalCode)      
INCLUDE (AddressLine1, AddressLine2, City, StateProvinceID);


在建立索引時, 可以加入非鍵值欄位, 可以加速讀取速度, 避開索引大小限制, 可惜 SQL 2008 沒有 UI 介面可以使用, 但 SQL 2012 好像就有 UI 可以用了.

參考資料:  Create Indexes with Included Columns http://msdn.microsoft.com/en-us/library/ms190806.aspx
More...
Bike, 2012/5/3 下午 02:53:46
C#
#Region => 區塊作用說明

EX.

#region Configure for Content Provider  =>區塊說明,在程式裡不會work

//Settings for Cotent Provider (for Alpha Enviroment)
string szCID = xmlDoc.DocumentElement["CID"].InnerText;
string szKey = "z1okwCmRSkgk/vkWzxIuwQNuUvf9d8gj";
string szIV = "dg454KArm6g=";
string szPassword = "1234";

#endregion

More...
Reiko, 2012/4/30 下午 12:25:30
ASP.NET 4.0 安裝在 IIS6 最常遇到的四個問題
1:設定網站站台的 ASP.NET 頁籤時找不到 ASP.NET 4.0 的選項

2:安裝好 .NET 4 後還是找不到設定網站站台的 ASP.NET 頁籤 的 ASP.NET 4.0 的選項

3:安裝好 .NET 4 也設定好網站站台的 ASP.NET 4.0 的選項 依然無法執行網站

4:ASP.NET 4.0 的網站站台已經設定好也可以正常執行了, 但執行一段時間會自己掛掉!


http://www.microsoft.com/taiwan/technet/iis/learn/aspnet4_install_iis6_qa.aspx
More...
Reiko, 2012/4/24 下午 06:25:07
Windows 已封鎖這個軟體,因為無法確認其發行者。 (在 Win 7 上面使用未簽章 ActiveX 的方法)
在 Windows 7 上面使用 Eltima Serial Port ActiveX Control 時遇到問題, 找到解決方法.

在 IE 的安全性中,  "網際網路" 與 "信任的網站" 中, 要打開以下兩個功能(啟用或提示皆可):
下載未簽署的 ActiveX 控制項
起始不標示為安全的 ActiveX 控制項

ActiveX 所在的網站也要加到信任的網站(很奇怪, 網際網路也必設定, 否則無效.)

最後要重開 IE (沒重開好像就沒效)


參考如下: http://ci-wang.blogspot.com/2008/10/windows.html
More...
Bike, 2012/4/17 上午 09:57:50
NET4.0 專案,虛擬目錄為NET2.0



※修改主目錄web.config
刪除(紅字)
*<compilation debug="true" targetFramework="4.0">
*<httpRuntime maxRequestLength="102400" requestValidationMode="2.0"></httpRuntime>




※修改虛擬目錄web.config
加上<remove assembly="...." />




1.如果网站程序不需要ASP.NET 4‎.0 的支持,那么可以直接配置网站使用ASP.NET 2.0。
2.如果网站程序需要ASP.NET 4‎.0的支持,就需要将该网站下使用ASP.NET 2.0的虚拟目录移动到其他网站。
3.如果上面两种方法都不适用于你的实际情况,那么就只能用这种方法了:

打开注册表找到“HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\ASP.NET\\4.0.30319.0”
添加键值名为“EnableExtensionlessUrls” 类型为“DWORD”的键值
并设置值为"0"

然后在cmd中运行“IISRESET”,重启IIS以读取注册表修改后的内容。
(重啟該應用程式集區即可):

注:此项修改就是关闭ASP.NET 4‎.0对无扩展URL的处理,若将此项键值设为“1”则开启。
參考:http://www.webjx.com/aspnet/2011-04-02/29024.html
More...
Reiko, 2012/4/16 下午 01:23:51
排名 rank

select RANK() over (order by username) as ranking, *
from member
where Email like '%reiko%'
order by Username desc

More...
Reiko, 2012/4/13 下午 07:29:44
安裝awstats

http://nani.uwinfo.com.tw/?p=197

http://ssorc.tw/rewrite.php/read-631.html

安裝 GeoIP:

安裝 Perl 模組
在 cmd 下, 輸入 "ppm install Geo-IP-PurePerl"

下載 Data:

1. Install Perl module.  Open your Perl Package Manager which is stand for ppm.bat in bin folder.
2. Install Geo-IP-PurePerl and Geo-IPfree module.
3. Download the GeoIP data from, http://www.maxmind.com/download/geoip/database/. (要 dat 的格式, 不要 csv 的)
4. Extract the data and place it to C:\Perl\lib\Geo\IP folder.
5. Open the awstats.base.conf(C:\awstats\wwwroot\cgi-bin) and paste the following command.

LoadPlugin="geoip GEOIP_STANDARD C:\Perl\lib\Geo\IP\GeoIP.dat"


6. You have done and you will see the result in next update.

 

More...
Reiko, 2012/4/13 下午 07:28:25
.2.3安裝
※windows元件


※framework 1.1
※IIS未出現1.1選項,註冊1.1
cmd
cd C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
Aspnet_regiis.exe -u
Aspnet_regiis.exe -i



※aspx no work
開始=>執行=>
regsvr32 C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll



※framework 2.0
※註冊2.0
cmd
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
Aspnet_regiis.exe -u
Aspnet_regiis.exe -i


More...
Reiko, 2012/4/12 下午 12:20:40
IIS7網站備份&還原(只能從IIS7備份還原到IIS7)

cmd
cd C:\Windows\System32\inetsrv

※備份 backup.bat
*備份應用程式集區
appcmd list apppool HCI /config /xml >D:\IISSetting\appHCI.xml
*備份Site
appcmd list site HCI /config /xml >D:\IISSetting\HCI.xml

※還原 restore.bat
*備份應用程式集區
appcmd add apppool /name:HCI /in <D:\IISSetting\appHCI.xml
*備份site
appcmd add site /name:HCI /in <D:\IISSetting\HCI.xml

註1.HCI=>site name
註2.打開site的xml, 調整Id的值(不可與還原主機的IIS上已有ID重複)

More...
Reiko, 2012/4/12 下午 12:14:58
|< …30313233343536373839… >|
頁數 39 / 40 上一頁 下一頁
~ Uwinfo ~