如何运行在普通服务器trut中使用低安全级别的应用程序? [英] How to run an application that uses low security level in an average server trut?
问题描述
如何运行在普通服务器trut中使用低安全级别的应用程序?
打印做错误
尝试通过安全透明方法``BarcodeScanner.getpixelbrightness(System.Drawing.Imaging.BitmapData,System.Drawing.Imaging.PixelFormat,Int32,Int32)''访问安全关键方法``System.Runtime.InteropServices.Marshal.ReadByte( IntPtr,Int32)''失败.
说明:执行当前Web请求期间发生未处理的异常.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.
异常详细信息:System.MethodAccessException:通过安全透明方法"BarcodeScanner.getpixelbrightness(System.Drawing.Imaging.BitmapData,System.Drawing.Imaging.PixelFormat,Int32,Int32)"尝试访问安全关键方法"System.Runtime" .interopServices.Marshal.ReadByte(IntPtr,Int32)''失败.
How to run an application that uses low security level in an average server trut?
print do erro
Attempt by security transparent method ''BarcodeScanner.getpixelbrightness(System.Drawing.Imaging.BitmapData, System.Drawing.Imaging.PixelFormat, Int32, Int32)'' to access security critical method ''System.Runtime.InteropServices.Marshal.ReadByte(IntPtr, Int32)'' failed.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MethodAccessException: Attempt by security transparent method ''BarcodeScanner.getpixelbrightness(System.Drawing.Imaging.BitmapData, System.Drawing.Imaging.PixelFormat, Int32, Int32)'' to access security critical method ''System.Runtime.InteropServices.Marshal.ReadByte(IntPtr, Int32)'' failed.
推荐答案
http://www.codeproject.com/Articles/42852/Reading-Barcodes-来自图像II
我正在使用该项目作为创建Web应用程序的基础,以使条形码号码加上我的服务器设置为低安全级别,并且我无法更改它,我想到使用asp.net沙箱无法结束,
如果需要,我可以发布更改的代码并完成!
谢谢您的关注
http://www.codeproject.com/Articles/42852/Reading-Barcodes-from-an-Image-II
I''m using the project as a basis to create a web application to make the bar code number in plus my server is set to the low security level and I can not change it, I thought about using asp.net sandbox could not over,
If needed I can post the code with the changes and did!
Thank you for your attention
我正在使用的其余代码!
the rest of the code I''m using!
Private Sub carregaimagembarras()
Dim Bitmapcaminhoimagem As String = imagebarcode.ImageUrl ' carrega a imgem na variavel
Dim originalImage As New System.Drawing.Bitmap(Server.MapPath(Bitmapcaminhoimagem)) ' converte a imagem em System.Drawing.Bitmap
If Not Me.imagebarcode.ImageUrl Is Nothing Then
Dim barcodes As New System.Collections.ArrayList
Dim dtStart As DateTime = DateTime.Now
Dim iScans As Integer = 100
BarcodeScanner.FullScanPage(barcodes, originalImage, iScans, BarcodeScanner.BarcodeType.All)
' Show the results in a message box
ShowResults(dtStart, iScans, barcodes)
End If
End Sub
Private Sub ShowResults(ByVal dtStart As DateTime, ByVal iScans As Integer, ByRef barcodes As System.Collections.ArrayList)
Dim message As String = ""
If barcodes.Count > 0 Then
Dim bc As Object
For Each bc In barcodes
Message += bc & vbNewLine
Next
Else
Message += "Failed to find a barcode."
End If
txtcodigobarras.Text = Message
End Sub
早上好!我不是要实现解决方案,就是要转换条形码图像的数量,接受类似项目的建议,因为我们的同事的帮助是最初的项目开发人员桌面,由于安全问题,我无法调整网络.
我想帮助另一个项目条形码vb asp.net网站的链接.
谢谢,也谢谢您的关注.
Good morning! I''m not managing to implement solution is to transform bar code image in number, accepted suggestions for similar projects as the help of our colleague was the initial project developer desktop and I can not adptar the web due to security issues.
I would like to help with the link from another project barcode vb asp.net web.
Thank you and I thank you for your attention.
这篇关于如何运行在普通服务器trut中使用低安全级别的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!