Ask a Question related to ASP.NET Security, Design and Development.
-
Chung Ta #1
Inconsistent File Access problem between asp.net and interally invoked console app
I am having a problem opening a text file with read access in a console application to be run as a subprocess, which is invoked by an ASP.NET application. The problem appears to occur on line "f.OpenText()"
FileInfo f = new FileInfo("...")
sr = f.OpenText()
while ((Line=sr.ReadLine()) != null) this.lbFileContent.Items.Add(Line)
sr.Close()
The error message is related to the permission, e.g
Access to the path "\\Server\ShareDir\Filename.dat
This file resides on a network resource
I believe that I have properly set all the permissions required. My ASP.NET application was properly configured with impersonation and integrated windows security setting
If those code lines above are placed in the ASP.Net code directly (i.e. inside somefile.aspx.cs) I have no problem reading the file. However, if these same codes reside in a separate console application, which is invoked by the ASP.NET application (via a subprocess) such as
ConsoleProg = "..."
Params = "..."
ProcessStartInfo pInfo = new ProcessStartInfo(ConsoleProg,this.Params);
pInfo.UseShellExecute = false
pInfo.RedirectStandardOutput = true
Process p = Process.Start(pInfo)
Session["Output"] = p.StandardOutput.ReadToEnd()
p.WaitForExit()
I assume that the subprocess would inherit the access token from the ASP.NET application. But for some reason, the error seems to indicate that this is not the case
Of course, I could rewrite the bulk of the console application and wrap the main logic, deploy it as a library, and use it in ASP.NET directly and in the thin console application. But doing this would take more development time
I would appreciate for any hints, suggestions from everyone
Chun
Chung Ta Guest
-
Cant access Admin Console for Contribute 3
Help!! My Contribute 3 admin users cant access the admin console after i installed contribte CS3. "Your contribute is too old to administer the... -
contribute problem - access denied file may not existpermission problem
Recieving the following error message - "access denied file may not exist , or there could be a permission problem" this happened this morning ,... -
Vhost developer users cant access console
Hello. Im new to flash comm server, so maybe its dumb question, but.. did as the manual says, couldnt find troubleshooting answer, so im looking... -
cannot access admin console
Hi, wondering if someone can help me out, this isn't a coldfusion problem but i have scoured symentac and found nothing useful. After installing... -
How to log console output to a file?
Hi, I have two install a system via serial connection (both Solaris). I know there is a possibility to log the output of the open terminal to a...



Reply With Quote

