Click here to Skip to main content
15,444,721 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am basically trying to attach the .exe file of a console based application to a web application. So this is the error coming;

protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
          System.Diagonsis.Process.Start ( 'C:/Users/Shark Ramsha/Downloads/SIMPLE_CHATBOT_SYSTEM_IN_C_WITH_SOURCE_CODE(3)/ChatBotProject/ChatBotProject/bin/Debug');

What I have tried:

Before I had written it within the double quotes, so it was showing error for the whole line, now I removed it and it is showing only error at these spots which on Start and one before 'C .
Updated 22-May-22 10:46am

1 solution

Double quotes delimit strings: "Hello World".
Single quotes delimit characters: 'H', 'e', 'l', ...

But the original problem was spelling ...
System.Diagonsis.Process.Start ( "C:/Users/Shark ...
Should be:
System.Diagnostics.Process.Start ( "C:/Users/Shark ...

However, that probably won't work, and almost certainly not in production: IIS doesn't run under your user, it has it's own with heavily restricted access to hard drives and related hardware. So that folder will not be accessible to your web based app.
Share this answer

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