TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
t kkk
NA
2
3.9k
How to run an exe from network location
Dec 12 2011 5:48 PM
I want to launch an exe located in network from an asp.net web page.
when i compile my project and run it locally it works. But when deployed in server, its not able to get to the network location.
like my executable is at \\msdatadomain1\production\conversion.exe
here is what I have
try
{
if (!File.Exists(Tools.ConversionExecutable))
throw (new System.IO.FileNotFoundException("File Not Found " +
Tools.ConversionExecutable));
ProcessStartInfo startInfo = new ProcessStartInfo(Tools.ConversionExecutable);
startInfo.Arguments = @"-univName " + _context.LegalType +
@" -sourceFolder " + Tools.GetFolderName(_context.Source) +
@" -targetFolder " + Tools.GetFolderName(_context.Target) +
@" -univFile " + _context.Universe +
@" -xslt " + _context.Xslt +
@" -logFile " + _context.Log;
if (_context.Universe == "")
startInfo.Arguments = startInfo.Arguments.Replace(" -univFile", "");
Process process = Process.Start(startInfo);
process.WaitForExit();
}
I have also used impersonate option in web.config file.
Thanks in Advance.
Reply
Answers (
1
)
Viewstate in ASP.NET
Validation Control