服务器问题 [英] server issue

查看:84
本文介绍了服务器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谢谢您的快速答复Christian Graus我有vb.net 这是我得到的确切错误,代码是我的错误有那条线.

Thank you for your fast reply Christian Graus I have vb.net  and here is the exact error what I got and the code what i  have for that line.


"/docrs"应用程序中的服务器错误.

 
Server Error in ''/docrs'' Application.


\\ VACOFPC2 \ CFM $ \ CFM1 \ vadocs \ rpd \ VP001 \ 001 \ RPD001-0011.TIF
说明:执行当前命令期间发生未处理的异常网络请求.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.


\\VACOFPC2\CFM$\CFM1\vadocs\rpd\VP001\001\RPD001-0011.TIF
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.

异常详细信息:System.IO.FileNotFoundException: \\ VACOFPC2 \ CFM $ \ CFM1 \ vadocs \ rpd \ VP001 \ 001 \ RPD001-0011.TIF

Exception Details: System.IO.FileNotFoundException: \\VACOFPC2\CFM$\CFM1\vadocs\rpd\VP001\001\RPD001-0011.TIF

源错误:


第212行:对于每个路径,以docs
第213行:
第214行中的字符串作为字符串:           Dim img1 As System.Drawing.Image = System.Drawing.Image.FromFile(path)
第215行:
第216行:          ;  g.DrawImage(img1,0,计数器* 1100)


Line 212:        For Each path As String In docs
Line 213:
Line 214:            Dim img1 As System.Drawing.Image = System.Drawing.Image.FromFile(path)
Line 215:
Line 216:            g.DrawImage(img1, 0, counter * 1100)


源文件:C:\ Inetpub \ cfm.vaco.va.gov \ docrs \ search \ view_va_docs.aspx.vb行:214


Source File: C:\Inetpub\cfm.vaco.va.gov\docrs\search\view_va_docs.aspx.vb    Line: 214

第214行的我的代码如下:

MY code for line 214 looks like this


受保护的
子LinkBut​​ton1_Click(ByVal发送者作为对象,ByVal e作为System.EventArgs)处理LinkBut​​ton1.Click
Dim id = Request("id")
将sqlstr视作字符串
  sqlstr =
从v_vadoc中选择*,其中vadoc_memo_id ="& ID
''如果impersonateValidUser("vacocfmdocrs","DVA","H2 $ istory")然后
''Dim imgstr作为新的SqlCommand(sqlstr,New SqlConnection(strConn))
''imgstr. Connection.Open()
''Dim imgDR as SqlDataReader = imgstr.ExecuteReader()
''imgDR.Read()
''img_path = imgDR("va_doc_original")
'''''' img_vadoc_id = imgDR("vadoc_id")
将docs设为ArrayList = GetImageList(id)
''Dim imgHeight作为整数= 0
''Dim imgWidth作为整数= 0
''Dim vLocation As Integer = 0

将g映射为System.Drawing.Graphics
将newImg映射为System.Drawing.Bitmap =新的System.Drawing.Bitmap(820,docs.Count * 1100)g = System.Drawing.Graphics.FromImage(newImg)
作为整数的Dim计数器= 0
对于每个路径,作为docs中的字符串作为Dim img1作为System.Drawing.Image = System.Drawing.Image.FromFile(路径)
g.DrawImage(img1,0,计数器* 1100)
计数器=计数器+ 1 下一个
g.Save()
Dim fileName作为字符串="download_docs_" + id .ToString()
newImg.Save(Server.MapPath(
"../images/")+文件名+".tif",System.Drawing.Imaging.ImageFormat.Tiff)
将img_path转换为String = Server.MapPath("../images/")+ fileName +".tif"
将文件作为新的FileInfo(img_path)
''Dim bufSize作为整数= 1024 * 64
''Dim buf作为Byte()=新的Byte(bufSize){}
 
''对于docs中的每个inputFile作为字符串
''Dim inFile作为FileStream = New FileStream(inputFile,FileMode.Open,FileAccess.Read)
''Dim br作为BinaryReader = New BinaryReader(inFile)
''将MyData作为Byte()=新字节(inFile.Length){}
''MyData = br.ReadBytes(inFile.Length)
''将outFile作为FileStream =新FileStream(img_path,FileMode.Append,FileAccess.Write)
''Dim bw作为BinaryWriter =新BinaryWriter(outFile)

''bw.Write(MyData)

br>''br.Close()
''br = Nothing
''MyData = Nothing
''''bw.Flush()
''bw.Close()
''outFile.Close()
''outFile.ReadByte(Data,0,inFile.Length)
''ReadBytes()
''bw.ReadBytes(MyData)
" Ne
xt
Response.ClearContent()
Response.AddHeader(
"Content-Disposition","attachment; filename ="+ file.Name)
Response.ContentType =
" image/tif"
Response.TransmitFile(file.FullName)
Response.End()
System.IO.File .Delete(Server.MapPath(
"../images/")+ fileName +".tif")
 
''undoImpersonation()
''End如果
结束Sub


Protected
Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Dim id = Request("id")
Dim sqlstr As String
 
sqlstr =
"Select * from v_vadoc where vadoc_memo_id = " & ID
''If impersonateValidUser("vacocfmdocrs", "DVA", "H2$istory") Then
'' Dim imgstr As New SqlCommand(sqlstr, New SqlConnection(strConn))
'' imgstr.Connection.Open()
'' Dim imgDR As SqlDataReader = imgstr.ExecuteReader()
'' imgDR.Read()
'' img_path = imgDR("va_doc_original")
'' ''img_vadoc_id = imgDR("vadoc_id")
Dim docs As ArrayList = GetImageList(id)
''Dim imgHeight As Integer = 0
''Dim imgWidth As Integer = 0
''Dim vLocation As Integer = 0
 
Dim g As System.Drawing.Graphics
Dim newImg As System.Drawing.Bitmap = New System.Drawing.Bitmap(820, docs.Count * 1100)
g = System.Drawing.Graphics.FromImage(newImg)
Dim counter As Integer = 0
For Each path As String In docs
Dim img1 As System.Drawing.Image = System.Drawing.Image.FromFile(path)
g.DrawImage(img1, 0, counter * 1100)
counter = counter + 1
Next
g.Save()
Dim fileName As String = "download_docs_" + id.ToString()
newImg.Save(Server.MapPath(
"../images/") + fileName + ".tif", System.Drawing.Imaging.ImageFormat.Tiff)
Dim img_path As String = Server.MapPath("../images/") + fileName + ".tif"
Dim file As New FileInfo(img_path)
''Dim bufSize As Integer = 1024 * 64
''Dim buf As Byte() = New Byte(bufSize) {}
 
''For Each inputFile As String In docs
'' Dim inFile As FileStream = New FileStream(inputFile, FileMode.Open, FileAccess.Read)
'' Dim br As BinaryReader = New BinaryReader(inFile)
'' Dim MyData As Byte() = New Byte(inFile.Length) {}
'' MyData = br.ReadBytes(inFile.Length)
'' Dim outFile As FileStream = New FileStream(img_path, FileMode.Append, FileAccess.Write)
'' Dim bw As BinaryWriter = New BinaryWriter(outFile)
 
'' bw.Write(MyData)
 
'' br.Close()
'' br = Nothing
'' MyData = Nothing
'' ''bw.Flush()
'' bw.Close()
'' outFile.Close()
''outFile.ReadByte(Data, 0, inFile.Length)
''ReadBytes()
''bw.ReadBytes(MyData)
 ''Ne
xt
Response.ClearContent()
Response.AddHeader(
"Content-Disposition", "attachment; filename=" + file.Name)
Response.ContentType =
"image/tif"
Response.TransmitFile(file.FullName)
Response.End()
System.IO.File.Delete(Server.MapPath(
"../images/") + fileName + ".tif")
 
''undoImpersonation()
''End If
End Sub

推荐答案

\ CFM1 \ vadocs \ rpd \ VP001 \ 001 \ RPD001-0011.TIF
说明:未处理的异常发生在当前Web请求执行期间.请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息.
\CFM1\vadocs\rpd\VP001\001\RPD001-0011.TIF
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.

异常详细信息:System.IO.FileNotFoundException: \\ VACOFPC2 \ CFM

Exception Details: System.IO.FileNotFoundException: \\VACOFPC2\CFM


\ CFM1 \ vadocs \ rpd \ VP001 \ 001 \ RPD001-0011.TIF
\CFM1\vadocs\rpd\VP001\001\RPD001-0011.TIF

源错误:


第212行:对于每个路径,以docs
第213行:
第214行中的字符串作为字符串:           Dim img1 As System.Drawing.Image = System.Drawing.Image.FromFile(path)
第215行:
第216行:          ;  g.DrawImage(img1,0,计数器* 1100)


Line 212:        For Each path As String In docs
Line 213:
Line 214:            Dim img1 As System.Drawing.Image = System.Drawing.Image.FromFile(path)
Line 215:
Line 216:            g.DrawImage(img1, 0, counter * 1100)


源文件:C:\ Inetpub \ cfm.vaco.va.gov \ docrs \ search \ view_va_docs.aspx.vb行:214


Source File: C:\Inetpub\cfm.vaco.va.gov\docrs\search\view_va_docs.aspx.vb    Line: 214

第214行的我的代码如下:

MY code for line 214 looks like this


受保护的
子LinkBut​​ton1_Click(ByVal发送者作为对象,ByVal e作为System.EventArgs)处理LinkBut​​ton1.Click
Dim id = Request("id")
将sqlstr视作字符串
  sqlstr =
从v_vadoc中选择*,其中vadoc_memo_id ="& ID
''如果impersonateValidUser("vacocfmdocrs","DVA","H2


Protected
Sub LinkButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Dim id = Request("id")
Dim sqlstr As String
 
sqlstr =
"Select * from v_vadoc where vadoc_memo_id = " & ID
''If impersonateValidUser("vacocfmdocrs", "DVA", "H2


istory")然后
''Dim imgstr作为New SqlCommand(sqlstr,New SqlConnection( strConn))
''imgstr.Connection.Open()
''Dim imgDR as SqlDataReader = imgstr.ExecuteReader()
''imgDR.Read()
''img_path = imgDR("va_doc_original)
''''''img_vadoc_id = imgDR(" vadoc_id)
Dim docs As ArrayList = GetImageList(id)
''Dim imgHeight Integer = 0
''''Dim imgWidth As Integer = 0
''将vLocation设置为整数= 0

将gim设置为System.Drawing.Graphics
将newImg设置为System.Drawing.Bitmap =新的System.Drawing.Bitmap(820, docs.Count * 1100)
g = System.Drawing.Graphics.FromImage(newImg)
作为整数的Dim计数器= 0
对于每个路径,作为docs中的字符串作为img1作为System.Drawing.图像= System.Drawing.Image.FromFile(路径)
g.DrawImage(img1,0,计数器* 1100)
计数器=计数器+ 1
下一个 g.Save()
昏暗的FileName As String ="download_docs_" + id.ToString() newImg.Save(Server.MapPath(
"../images/")+ fileName +".tif",System.Drawing.Imaging.ImageFormat.Tiff)
将img_path设为字符串= Server.MapPath ("../images/")+ fileName +".tif"
将Dim文件作为新FileInfo(img_path)
''Dim bufSize作为整数= 1024 * 64
''Dim buf作为字节( )= New Byte(bufSize){}
 
''对于docs中的每个inputFile作为字符串,
''Dim inFile作为FileStream = New FileStream(inputFile,FileMode.Open,FileAccess.Read)
''Dim br As BinaryReader =新BinaryReader(inFile)
''Dim MyData As Byte()=新Byte(inFile.Length){}
''MyData = br.ReadBytes(inFile.Length)
''Dim outFile作为FileStream =新FileStream(img_path,FileMode.Append,FileAccess.Write)
''Dim bw作为BinaryWriter = New BinaryWriter(outFile)

''bw.写入(MyData)

''br.Close()
''br =没什么
''MyData =没什么
''''bw.Flush()
''bw.Close()
''outFile.Close()
''outFile.ReadByte(Data,0,inFile.Length)
''ReadBytes( )
''bw.ReadBytes(MyData)
''Ne
xt
Response.ClearContent()
Response.AddHeader(
"Content-Disposition",附件; filename ="+ file.Name)
Response.ContentType =
" image/tif"
Response.TransmitFile(file.FullName)
Response.End()
System.IO.File .Delete(Server.MapPath(
"../images/")+ fileName +".tif")
 
''undoImpersonation()
''End如果
结束Sub
istory") Then
'' Dim imgstr As New SqlCommand(sqlstr, New SqlConnection(strConn))
'' imgstr.Connection.Open()
'' Dim imgDR As SqlDataReader = imgstr.ExecuteReader()
'' imgDR.Read()
'' img_path = imgDR("va_doc_original")
'' ''img_vadoc_id = imgDR("vadoc_id")
Dim docs As ArrayList = GetImageList(id)
''Dim imgHeight As Integer = 0
''Dim imgWidth As Integer = 0
''Dim vLocation As Integer = 0
 
Dim g As System.Drawing.Graphics
Dim newImg As System.Drawing.Bitmap = New System.Drawing.Bitmap(820, docs.Count * 1100)
g = System.Drawing.Graphics.FromImage(newImg)
Dim counter As Integer = 0
For Each path As String In docs
Dim img1 As System.Drawing.Image = System.Drawing.Image.FromFile(path)
g.DrawImage(img1, 0, counter * 1100)
counter = counter + 1
Next
g.Save()
Dim fileName As String = "download_docs_" + id.ToString()
newImg.Save(Server.MapPath(
"../images/") + fileName + ".tif", System.Drawing.Imaging.ImageFormat.Tiff)
Dim img_path As String = Server.MapPath("../images/") + fileName + ".tif"
Dim file As New FileInfo(img_path)
''Dim bufSize As Integer = 1024 * 64
''Dim buf As Byte() = New Byte(bufSize) {}
 
''For Each inputFile As String In docs
'' Dim inFile As FileStream = New FileStream(inputFile, FileMode.Open, FileAccess.Read)
'' Dim br As BinaryReader = New BinaryReader(inFile)
'' Dim MyData As Byte() = New Byte(inFile.Length) {}
'' MyData = br.ReadBytes(inFile.Length)
'' Dim outFile As FileStream = New FileStream(img_path, FileMode.Append, FileAccess.Write)
'' Dim bw As BinaryWriter = New BinaryWriter(outFile)
 
'' bw.Write(MyData)
 
'' br.Close()
'' br = Nothing
'' MyData = Nothing
'' ''bw.Flush()
'' bw.Close()
'' outFile.Close()
''outFile.ReadByte(Data, 0, inFile.Length)
''ReadBytes()
''bw.ReadBytes(MyData)
 ''Ne
xt
Response.ClearContent()
Response.AddHeader(
"Content-Disposition", "attachment; filename=" + file.Name)
Response.ContentType =
"image/tif"
Response.TransmitFile(file.FullName)
Response.End()
System.IO.File.Delete(Server.MapPath(
"../images/") + fileName + ".tif")
 
''undoImpersonation()
''End If
End Sub


这篇关于服务器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆