Click here to Skip to main content
15,936,169 members

Comments by Sai Janani (Top 7 by date)

Sai Janani 12-Sep-13 6:54am View    
Its working now, after doing this, IIS restart was done and only windows authentication I enable where in advanced settings, Kernel mode was disabled and its working for me.
Sai Janani 12-Sep-13 2:41am View    
Thanks for response.

Still, I am not getting the point. See, in the article its mentioned that i need to change the machine.config. I am working on a client network and can't do that. Other websites working in the same intranet use the same IIS and machine.config but when they use the above code, its working, but for my application tats developed, its not. I am wondering why.

Thank you.
Sai Janani 29-Aug-13 3:50am View    
Hi Fredrik,

When i debug in local its working and file is getting opening, but when i try the url from IE or from any other remote machine its displaying the contents of list box but when i click any file, it goes to postback but does not open the file.

I am using the below code:

Imports System.IO
Imports System.Net
Imports System.Diagnostics.Process

Public Class _Default
Inherits System.Web.UI.Page
Dim path As String = ConfigurationManager.AppSettings("filepath")
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not IsPostBack) Then
Dim di As DirectoryInfo = New DirectoryInfo(path)
Dim fidir As FileInfo() = di.GetFiles()
Dim fi As FileInfo
For Each fi In fidir
End If
Catch ex As System.IO.IOException
End Try
End Sub

Protected Sub lstbx_file_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstbx_file.SelectedIndexChanged
Dim fname As String
fname = System.IO.Path.Combine(path, lstbx_file.SelectedValue.ToString())
Dim p As Process = Process.Start("notepad.exe", fname)
Catch ex As Exception

End Try
End Sub
End Class
Sai Janani 29-Aug-13 3:03am View    
Hey, sorry, I didn't read the solution explanation properly. Thanks, Got and got resolved the warning...

Thanks Fredrik for the prompt help.
Sai Janani 29-Aug-13 3:00am View    
Hi Fredrik,

Yes, but when a process is started, it needs to be closed, if i use process.start(fname), then how do i close the process that got started.

Thanks for the answer, :-)