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

  • SEARCH
  • Home
  • 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 6181023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:56:53+00:00 2026-05-24T00:56:53+00:00

Please tell me where I have gone wrong in this script. I am getting

  • 0

Please tell me where I have gone wrong in this script. I am getting this error.

Server Error in ‘/’ Application.

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30002: Type ‘ProcessStartInfo’ is not defined.

Source Error:

Line 5:  Public Shared Function ExecuteCommand(Command As String, Timeout As Integer) As Integer
Line 6:  Dim ExitCode As Integer
*Line 7:  Dim ProcessInfo As ProcessStartInfo*
Line 8:  Dim Process As Process
Line 9:  

Source File: C:\Inetpub\wwwroot\ServiceFileUploadRE.aspx Line: 7

The Script:

  <%@ Page Language=VBScript %>

    <script runat="server">

    Public Shared Function ExecuteCommand(Command As String, Timeout As Integer) As Integer
    Dim ExitCode As Integer
    Dim ProcessInfo As ProcessStartInfo
    Dim Process As Process

    ProcessInfo = New ProcessStartInfo("cmd.exe", "/C " + Command)
    ProcessInfo.CreateNoWindow = True
    ProcessInfo.UseShellExecute = False
    Process = Process.Start(ProcessInfo)
    Process.WaitForExit(Timeout)
    ExitCode = Process.ExitCode
    Process.Close()

    Return ExitCode
    End Function

    Protected Sub Button1_Click(ByVal sender As Object, _
          ByVal e As System.EventArgs)
            If FileUpload1.HasFile Then
                Try
                    FileUpload1.SaveAs("C:\Inetpub\wwwroot\upload\" & _
                       FileUpload1.FileName)
                    Label1.Text = "File name: " & _
                       FileUpload1.PostedFile.FileName & "<br>" & _
                       "File Size: " & _
                       FileUpload1.PostedFile.ContentLength & " kb<br>" & _
                       "Content type: " & _
                       FileUpload1.PostedFile.ContentType
                Catch ex As Exception
                    Label1.Text = "ERROR: " & ex.Message.ToString()
                End Try
            Else
                Label1.Text = "You have not specified a file."
            End If
        End Sub

    ExecuteCommand("REN C:\Document.rtf YES.rtf",100)

    </script>
.......
  • 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-24T00:56:54+00:00Added an answer on May 24, 2026 at 12:56 am

    Maybe place the line

    <%@ Import Namespace = "System.Diagnostics" %>
    

    directly after <% Page....

    If that does not work, then check whether you are using .NET Framework 4.

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

Sidebar

Related Questions

Any of you gone through this task? Please tell me a solution. I have
Can someone please tell me where I'm going wrong with this piece of code?
Can anyone please tell me why I keep getting an error right before the
Could somebody please tell me what is Memory Page Out Rate. I have seen
I've recently written this with help from SO. Now could someone please tell me
I have some confusion with reference type following is the test example please tell
Please tell me what I am doing wrong. I am sending an email using
please tell me that as we have a service in android which can run
Please tell me how i put html code in my iphone app i have
Can anybody please tell me how they have implemented the below thing whick looks

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.