tak to som uz nieako vyriesil no stale mam problem s citanim toho suboru
If Dir(Server.MapPath("~/Files/" & filename1)) <> "" Then
Dim readerPRO As New IO.StreamReader(Server.MapPath("~/Files/" & filename1))
Else
TextBox1.Text = "Problem s citanim suboru."
End If
vyhodi mi tuto chybu
Server Error in '/' Application.
Attempt by security transparent method 'subtitlesRELAY.WebForm1.Button1_Click(System.Object, System.EventArgs)' to access security critical method 'Microsoft.VisualBasic.FileSystem.Dir(System.String, Microsoft.VisualBasic.FileAttribute)' 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 'subtitlesRELAY.WebForm1.Button1_Click(System.Object, System.EventArgs)' to access security critical method 'Microsoft.VisualBasic.FileSystem.Dir(System.String, Microsoft.VisualBasic.FileAttribute)' failed.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[MethodAccessException: Attempt by security transparent method 'subtitlesRELAY.WebForm1.Button1_Click(System.Object, System.EventArgs)' to access security critical method 'Microsoft.VisualBasic.FileSystem.Dir(System.String, Microsoft.VisualBasic.FileAttribute)' failed.]
subtitlesRELAY.WebForm1.Button1_Click(Object sender, EventArgs e) in C:\Users\Patrik\documents\visual studio 2010\Projects\subtitlesRELAY\subtitlesRELAY\Default.aspx.vb:15
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
|