2012/07/24

64bit 版本 IIS 執行 32bit 組件的問題

無法載入檔案或組件 'xxxx' 或其相依性的其中之一。 試圖載入格式錯誤的程式。
描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯
誤的詳細資訊,以及在程式碼中產生的位置。

例外詳細資訊: System.BadImageFormatException: 無法載入檔案或組件 'nfop' 或其相
依性的其中之一。 試圖載入格式錯誤的程式。

原始程式錯誤:

在執行目前 Web 要求期間,產生未處理的例外狀況。如需有關例外狀況來源與位置的資
訊,可以使用下列的例外狀況堆疊追蹤取得。

組件載入追蹤: 下列資訊在確定為何無法載入組件 'nfop' 時是有幫助的。


警告: 組件繫結記錄切換為 OFF。
若要記錄組件繫結失敗,請將登錄值 [HKLM\Software\Microsoft\Fusion!EnableLog]
(DWORD) 設為 1。
注意: 與組件繫結失敗記錄相關的效能會有部分負面影響。
若要關閉此功能,請移除登錄值 [HKLM\Software\Microsoft\Fusion!EnableLog]。

解法:


Crystal Report @ .Net 4.x

問題:
Crystal Report 無法 於.Net 4.0環境下運行

發現方法:
使用神奇的Fiddler監控http/https資料流(無法監控localhost路徑,需打ip繞過)

發現錯誤:
C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319 目錄中沒有
crystalreportviewers12

解決方法:

2012/06/17

Asp.net 動態變更Site.Map

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)

Handles Me.Load

Web.SiteMap.CurrentNode.ReadOnly = False

Web.SiteMap.CurrentNode.Title = "123"

Label1.Text = SiteMap.CurrentNode.Title

End Sub


--
※ 發信站: 批踢踢兔(ptt2.cc)
◆ From: 114.36.54.106

2012/06/15

IIF(Eval("value")) in ASP.Net

the Eval function doesn't exist in the current version of FIM. For a
complete list of available functions, go to the FIM home page, click on the
All Resources menu, and then on the Functions resource type.

The only option available to you AFAIK is to use nested IIF statements, e.g.

IIF (condition1,'value1',IIF(condition2,'value2','value3'))




--
※ 發信站: 批踢踢兔(ptt2.cc)
◆ From: 111.248.108.186

2012/06/13

Repeater.headertemplate 使用Bind/Eval

headertemplate 似乎無法使用 <%# Eval("name") %> 來做資料庫的欄位繫結

但 Repeater 控件也只能做單向繫結而已(讀出)

所以可以用以下方法

ASPX


<asp:repeater id="Repeater1" runat="server" datasourceid="SqlDataSource1">
        <headertemplate>
                <p>
                        <%# Message %>
                </p>
        </headertemplate>
        <itemtemplate>
                <%# Eval("Name") %>
        </itemtemplate>
        <separatortemplate>
                <br />
        </separatortemplate>
</asp:repeater>


CODE-BEHIND 的寫法則是

protected string Message
{
get {
         return "Hello World!";
      }
}

--
※ 發信站: 批踢踢兔(ptt2.cc)
◆ From: 114.36.62.79
→Corsair:http://forums.asp.net/t/1188170.aspx/1 推 06/13 11:14

2012/05/29

ASP.Net MVC Paging

MEMO

http://blogs.taiga.nl/martijn/tag/paging/


ASP.Net MVC3 的外國豬走路影片

看點部落的暗黑執行緒大大的 ASP.NET MVC 3 豬走路範例系列

http://blog.darkthread.net/post-2011-04-11-asp-net-mvc3-intro-1.aspx

後面的回文有人提到說


    報告,我看過外國豬走路!

    走得很不錯:http://www.asp.net/mvc/pluralsight


記錄一下  學習國外的豬都怎麼走

--

http://blog.miniasp.com/category/ASPNET-MVC.aspx

保哥的 MVC 文章整理 (目前手上的工具書也是保哥出的)

--
※ 發信站: 批踢踢兔(ptt2.cc)
◆ From: 114.36.60.240