G
Guest
I am at my witless end here, please help!
I have an ASP.Net aspx web page, hosted on Windows Server 2003, that
receives a query string with the path to an autocad drawing file selected
from a web page hosted on a unix driven file server. The user wants to have
this file converted to a pdf.
My page takes the query string and turns it into a windows unc path, then I
copy the file down to the web server and place it into a directory. This all
works fine.
The next step is to call an application that will convert the file into a
pdf, here is where the woes begin...
I have a 3rd party windows command line tool, installed on the same server
that my web app resides on, and it takes two parameters: fileIn and fileOut.
I am using Process.Start and ProcessStartInfo to call the conversion app
but it appears that the arguments are not getting through to it. I can see
the process running in Task Manager, but it hangs.
When I query the process through either Process.GetProcessById or
Process.GetProcessesByName, none of the ProcessStartInfo properties that I
have set have retained their value.
When I attempt to read the StandardOutput, I get an 'invalid character' error.
I have my web config set to <identity impersonate="true"/>, and have set the
IIS Directory Security anonymous user to the computer admin, for testing of
permissions.
Here is the code:
Dim procStringArgs As String = " /InFile " & Path & DrawingIn & " /OutFile "
& PDFOut & " /Hide"
'call conversion application with proc args
Dim proc As New Process
Dim procSI As New ProcessStartInfo
procSI.FileName = CONVERTER_FULLPATH
procSI.Arguments = procStringArgs
procSI.UseShellExecute = False
procSI.RedirectStandardOutput = True
procSI.RedirectStandardError = True
proc.StartInfo = procSI
proc.Start()
When I print out the FileName and Arguments to a log file this is the result:
FileName: C:\Program Files\[app dir]\[app].exe
proc args: /InFile c:\inetpub\wwwroot\[webapp]\InBox\[drawing].DWG /OutFile
c:\inetpub\wwwroot\[webapp]\OutBox\[drawing].pdf /Hide
The process runs under the Network Service username, which I have given full
access to the above directories, thinking it was a permissions issue.
Any suggestions greatly appreciated and eagerly implemented for testing,
thank you.
I have an ASP.Net aspx web page, hosted on Windows Server 2003, that
receives a query string with the path to an autocad drawing file selected
from a web page hosted on a unix driven file server. The user wants to have
this file converted to a pdf.
My page takes the query string and turns it into a windows unc path, then I
copy the file down to the web server and place it into a directory. This all
works fine.
The next step is to call an application that will convert the file into a
pdf, here is where the woes begin...
I have a 3rd party windows command line tool, installed on the same server
that my web app resides on, and it takes two parameters: fileIn and fileOut.
I am using Process.Start and ProcessStartInfo to call the conversion app
but it appears that the arguments are not getting through to it. I can see
the process running in Task Manager, but it hangs.
When I query the process through either Process.GetProcessById or
Process.GetProcessesByName, none of the ProcessStartInfo properties that I
have set have retained their value.
When I attempt to read the StandardOutput, I get an 'invalid character' error.
I have my web config set to <identity impersonate="true"/>, and have set the
IIS Directory Security anonymous user to the computer admin, for testing of
permissions.
Here is the code:
Dim procStringArgs As String = " /InFile " & Path & DrawingIn & " /OutFile "
& PDFOut & " /Hide"
'call conversion application with proc args
Dim proc As New Process
Dim procSI As New ProcessStartInfo
procSI.FileName = CONVERTER_FULLPATH
procSI.Arguments = procStringArgs
procSI.UseShellExecute = False
procSI.RedirectStandardOutput = True
procSI.RedirectStandardError = True
proc.StartInfo = procSI
proc.Start()
When I print out the FileName and Arguments to a log file this is the result:
FileName: C:\Program Files\[app dir]\[app].exe
proc args: /InFile c:\inetpub\wwwroot\[webapp]\InBox\[drawing].DWG /OutFile
c:\inetpub\wwwroot\[webapp]\OutBox\[drawing].pdf /Hide
The process runs under the Network Service username, which I have given full
access to the above directories, thinking it was a permissions issue.
Any suggestions greatly appreciated and eagerly implemented for testing,
thank you.