Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I want to use http://www.coolutils.com/CommandLine/TotalCADConverter[^] for converting my cad images to regular image files.
When my users upload any autocad file i would like to run the command from .net which will do the conversion for me and then i can read my converted file.
I want to run below command from .net, which works fine when i run directly from command prompt.
"C:\Program Files (x86)\TotalCADConverter\CADConverter.exe" "D:\DWG Images\arch2.dwg" "D:\DWG Images\arch2 (converted).svg"

Seems like some security issues when trying to run through web application but unable to figure out the reason.Tried setting identity of my application pool to "LocalSystem" also tried giving permission to my IIS service.
Posted

1 solution

1.Simple you cannot do that from a web application, because the web application are running on the web server and has limited access to the system resources (for example only to the files from the web application folder).

2.One solution could be to implement a WCF service that will do the task, then you should host the WCF service as a windows service into your server, and your web application will communicate with the WCF service.
 
Share this answer
 
Comments
Dexter11 12-Aug-14 6:59am    
Thanks raul..
Can i execute bat file from my web application?
Raul Iloc 12-Aug-14 7:01am    
No, you cannot execute any commands including bat.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900