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

Can anyone please tell why this error? I have included everything ( all header,
Please tell me why i am getting ClassCastException in this case I have type
Could you please tell me where I have gone wrong, my frame size takes
Any of you gone through this task? Please tell me a solution. I have
I won't create wallpaper-application but have one problem. Please tell me how add ImageView
Please tell me where I am going wrong. I have a file which I
please tell me how to write this query i have an access table number
hi i have a confusion about xml please tell me is this valid xml
Some one please tell me how to handle RunTimeExceptions in grails version1.1 .I have
I have developed a Jersey Resource class. Can someone please tell me how can

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.