Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7020199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:17:14+00:00 2026-05-27T23:17:14+00:00

I am trying to build a web application to evaluate .Net code online (like

  • 0

I am trying to build a web application to evaluate .Net code online (like http://ideone.com/)
I have managed to compile code with CodeDomProvider.
But I don’t know how to pass stdin parameters to this function.

If a user writes this code in the textarea of my web application:

using System;
public class Test  {

    static void Main()
    {
        String t = "";
        while (t != null){
           t = Console.ReadLine();
            Console.WriteLine(t+"OK");
        }
     }
}

I can Compile it with this code
CompilerInfo[] allCompilerInfo = CodeDomProvider.GetAllCompilerInfo();

  //Tell the compiler what language was used
  CodeDomProvider CodeProvider = CodeDomProvider.CreateProvider("C#");

  //Set up our compiler options...
  CompilerParameters CompilerOptions = new CompilerParameters();
  var _with1 = CompilerOptions;
   _with1.ReferencedAssemblies.Add("System.dll");
  _with1.GenerateInMemory = true;
  _with1.TreatWarningsAsErrors = true;

  //Compile the code that is to be evaluated
  CompilerResults Results = CodeProvider.CompileAssemblyFromSource(CompilerOptions, strCode);

Now I would like to manage generic parameters:

If I pass a sample parameter like this:

53

12

09

I would like the result of the compilation:

53OK

12OK

09OK

Do you know how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:17:15+00:00Added an answer on May 27, 2026 at 11:17 pm

    As I interpret the question, you are asking how to run and pass stdin command line data to an application that was compiled on your web server from code that a user typed into a text box. Avoiding the serious security concerns of doing such, what you want to do is launch the application using the System.Diagnostics.Process class, and specify RedirectStandardInput in the StartInfo property. Start by reading the MSDN docs on the Process class: http://msdn.microsoft.com/en-us/library/system.diagnostics.process.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build an iPhone web application using ASP.NET. The page is
I am trying to build a web application in ASP.NET MVC and need build
i like to build web application and im trying to think about way to
I am trying to build a .NET web application using SQL to query AS400
im trying out to build a web application. it must have contain a login
Dear Stackoverflowers, I am trying to build a simple web application in ASP.NET where
I am trying to build a web application, similar in feel to something like
I have been trying to build a modular web application. My requirements are to
I have a web application that I am trying to build and publish. The
I'm trying to use NAnt/NAntContrib build script to build a web application on Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.