我有一個寫在vb6中的activeX dll。裏面的代碼,它使用了(使用PaintPicture
)從aspx頁面訪問ACTIVEX DLL中的資源
如果我打電話使用ASPX頁面此DLL,即在Windows 2008機器上運行託管加載圖像,它然後發送到打印機IIS 7.0,圖像沒有按不打印。
如果我在同一臺服務器上使用VBS腳本調用此DLL,則圖像打印正常。
當aspx頁面託管在Windows 2000 Server上時,用於正常打印的圖像。
這裏是VBS代碼:
Dim CheckCtl
set CheckCtl = CreateObject("CHECKCONTROL.CHECK")
CheckCtl.FBOAccountID = 2765
CheckCtl.includesignature = True
CheckCtl.Amount = 500.00
CheckCtl.CheckDate = #04/06/2011#
CheckCtl.Payee_L1 = "Donald Trump"
CheckCtl.Payee_L2 = "10 Park Place"
CheckCtl.Payee_L3 = "Atlantic City, NJ 00011"
CheckCtl.Payee_L4 = ""
CheckCtl.Notes = "This is a test check"
CheckCtl.SubmittedBy = "Accountant"
dim lSuccess
lSuccess = CheckCtl.Printcheck()
這裏是ASPX VB.NET代碼:
Dim CheckCtl As checkcontrolNET.Check
CheckCtl = New checkcontrolNET.Check
CheckCtl.FBOAccountId = 2765
CheckCtl.IncludeSignature = True
CheckCtl.Amount = 500.0
CheckCtl.CheckDate = "04/06/2011"
CheckCtl.Payee_L1 = "Donald Trump"
CheckCtl.Payee_L2 = "10 Park Place"
CheckCtl.Payee_L3 = "Atlantic City, NJ 00011"
CheckCtl.Payee_L4 = ""
CheckCtl.notes = "This is a test check"
CheckCtl.SubmittedBy = "Accountant"
Dim lSuccess As Boolean
lSuccess = CheckCtl.printcheck()
Response.Write(lSuccess)
我缺少什麼?
我競選對手的經典.net應用程序池。在應用程序池標識爲NETWORKSERVICE的高級屬性下。這是否意味着我需要給CheckControl.dll文件提供networkService讀取權限? – Aheho 2011-04-06 18:01:31
@aheho - 是的,這將是一個好的開始。 – Kev 2011-04-06 18:14:28
沒有區別。 – Aheho 2011-04-06 18:25:50