Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

VBS to ASP.NET

Posted on 2006-06-07
15
Medium Priority
?
1,479 Views
Last Modified: 2013-11-25
how somebody help convert VBS file to a ASP.NET file please:

my software.vbs file lists the add/remove programs on machine...

software.vbs
============

Option Explicit

Dim StrComputer
strComputer = "192.168.0.79"

strComputer = Trim(strComputer)
If strComputer = "" Then strComputer = "."

Dim sCompName : sCompName = GetProbedID(StrComputer)

Dim sFileName
sFileName = strComputer & "_software_list.txt"

Dim s : s = GetAddRemove(strComputer)

If WriteFile(s, sFileName) Then
'optional prompt for display
'If MsgBox("Finished processing.  Results saved to " & sFileName & _
'vbcrlf & vbcrlf & "Do you want to view the results now?", _
'4 + 32, sTitle) = 6 Then
'WScript.CreateObject("WScript.Shell").Run sFileName, 9
'End If
End If

Function GetAddRemove(sComp)
  'Function credit to Torgeir Bakken
  Dim cnt, oReg, sBaseKey, iRC, aSubKeys
  Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
  Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
              sComp & "/root/default:StdRegProv")
  sBaseKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
  iRC = oReg.EnumKey(HKLM, sBaseKey, aSubKeys)

  Dim sKey, sValue, sTmp, sVersion, sDateValue, sYr, sMth, sDay

  For Each sKey In aSubKeys
    iRC = oReg.GetStringValue(HKLM, sBaseKey & sKey, "DisplayName", sValue)
    If iRC <> 0 Then
      oReg.GetStringValue HKLM, sBaseKey & sKey, "QuietDisplayName", sValue
    End If
    If sValue <> "" Then
      iRC = oReg.GetStringValue(HKLM, sBaseKey & sKey, _
                                "DisplayVersion", sVersion)
      If sVersion <> "" Then
        sValue = sValue & " Ver: " & sVersion
      Else
        sValue = sValue & vbTab
      End If
      iRC = oReg.GetStringValue(HKLM, sBaseKey & sKey, _
                                "InstallDate", sDateValue)
      If sDateValue <> "" Then
        sYr =  Left(sDateValue, 4)
        sMth = Mid(sDateValue, 5, 2)
        sDay = Right(sDateValue, 2)
        'some Registry entries have improper date format
        On Error Resume Next
        sDateValue = DateSerial(sYr, sMth, sDay)
        On Error GoTo 0
        If sdateValue <> "" Then
          sValue = sValue '& vbTab & "Installed: " & sDateValue
        End If
      End If
      sTmp = sTmp & sValue & vbcrlf
    cnt = cnt + 1
    End If
  Next
  sTmp = BubbleSort(sTmp)
  GetAddRemove = sTmp
End Function

Function BubbleSort(sTmp)
  'cheapo bubble sort
  Dim aTmp, i, j, temp
  aTmp = Split(sTmp, vbcrlf)  
  For i = UBound(aTmp) - 1 To 0 Step -1
    For j = 0 to i - 1
      If LCase(aTmp(j)) > LCase(aTmp(j+1)) Then
        temp = aTmp(j + 1)
        aTmp(j + 1) = aTmp(j)
        aTmp(j) = temp
      End if
    Next
  Next
  BubbleSort = Join(aTmp, vbcrlf)
End Function

Function GetProbedID(sComp)
  Dim objWMIService, colItems, objItem
  Set objWMIService = GetObject("winmgmts:\\" & sComp & "\root\cimv2")
  Set colItems = objWMIService.ExecQuery("Select SystemName from " & _
                                         "Win32_NetworkAdapter",,48)
  For Each objItem in colItems
    GetProbedID = objItem.SystemName
  Next
End Function

Function GetDTFileName()
  dim sNow, sMth, sDay, sYr, sHr, sMin, sSec
  sNow = Now
  sMth = Right("0" & Month(sNow), 2)
  sDay = Right("0" & Day(sNow), 2)
  sYr = Right("00" & Year(sNow), 4)
  sHr = Right("0" & Hour(sNow), 2)
  sMin = Right("0" & Minute(sNow), 2)
  sSec = Right("0" & Second(sNow), 2)
  GetDTFileName = sMth & sDay & sYr & "_" & sHr & sMin & sSec
End Function

Function WriteFile(sData, sFileName)
  Dim fso, OutFile, bWrite
  bWrite = True
  Set fso = CreateObject("Scripting.FileSystemObject")
  On Error Resume Next
  Set OutFile = fso.OpenTextFile(sFileName, 2, True)
  'Possibly need a prompt to close the file and one recursion attempt.
  If Err = 70 Then
    Wscript.Echo "Could not write to file " & sFileName & ", results " & _
                 "not saved." & vbcrlf & vbcrlf & "This is probably " & _
                 "because the file is already open."
    bWrite = False
  ElseIf Err Then
    WScript.Echo err & vbcrlf & err.description
    bWrite = False
  End If
  On Error GoTo 0
  If bWrite Then
    OutFile.WriteLine(sData)
    OutFile.Close
  End If
  Set fso = Nothing
  Set OutFile = Nothing
  WriteFile = bWrite
End Function
0
Comment
Question by:ellandrd
  • 8
  • 7
15 Comments
 
LVL 35

Accepted Solution

by:
YZlat earned 1500 total points
ID: 16853087
Dim StrComputer As String
        StrComputer = "192.168.0.79"

        StrComputer = Trim(StrComputer)
        If StrComputer = "" Then StrComputer = "."

        Dim sCompName As String = GetProbedID(StrComputer)

        Dim sFileName As String
        sFileName = StrComputer & "_software_list.txt"

        Dim s As String = GetAddRemove(StrComputer)

        If WriteFile(s, sFileName) Then
            'optional prompt for display
            'If MsgBox("Finished processing.  Results saved to " & sFileName & _
            'vbcrlf & vbcrlf & "Do you want to view the results now?", _
            '4 + 32, sTitle) = 6 Then
            'WScript.CreateObject("WScript.Shell").Run sFileName, 9
            'End If
        End If

Function BubbleSort(ByVal sTmp As String) As String
        'cheapo bubble sort
        Dim aTmp(), temp As String
        Dim i, j As Integer
        aTmp = Split(sTmp, vbCrLf)
        For i = UBound(aTmp) - 1 To 0 Step -1
            For j = 0 To i - 1
                If LCase(aTmp(j)) > LCase(aTmp(j + 1)) Then
                    temp = aTmp(j + 1)
                    aTmp(j + 1) = aTmp(j)
                    aTmp(j) = temp
                End If
            Next
        Next
        BubbleSort = Join(aTmp, vbCrLf)
    End Function

Function GetDTFileName() As String
        Dim sMth, sDay, sYr, sHr, sMin, sSec As String
        Dim dtNow As Date
        dtNow = Today.Now
        Month(dtNow).ToString.Substring(0, 2)
        Day(dtNow).ToString.Substring(0, 2)
        Year(dtNow).ToString.Substring(0, 4)
        Hour(dtNow).ToString.Substring(0, 2)
        Minute(dtNow).ToString.Substring(0, 2)
        Second(dtNow).ToString.Substring(0, 2)

        GetDTFileName = sMth & sDay & sYr & "_" & sHr & sMin & sSec
    End Function
0
 
LVL 35

Expert Comment

by:YZlat
ID: 16853179
Sub WriteFile(ByVal str As String, ByVal filepath As String)
        Dim fs As FileStream
        Dim s As StreamWriter
        Try
            fs = New FileStream(filepath, FileMode.Create, FileAccess.Write)
            s = New StreamWriter(fs)
            s.Write(str)

        Catch ex As Exception
        Finally
            s.Close()
        End Try
    End Sub
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16853277
what part is that last part?

how do i use this in ASP.NET then? create new ASPX page and paste it in as the code?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Expert Comment

by:YZlat
ID: 16854838
create a new webform - WebForm1.aspx. Then open code-behind file - WebForm1.aspx.vb

and paste the following code there:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim StrComputer As String
        StrComputer = "192.168.0.79"

        StrComputer = Trim(StrComputer)
        If StrComputer = "" Then StrComputer = "."

        Dim sCompName As String = GetProbedID(StrComputer)

        Dim sFileName As String
        sFileName = StrComputer & "_software_list.txt"

        Dim s As String = GetAddRemove(StrComputer)

        If WriteFile(s, sFileName) Then
            'optional prompt for display
            'If MsgBox("Finished processing.  Results saved to " & sFileName & _
            'vbcrlf & vbcrlf & "Do you want to view the results now?", _
            '4 + 32, sTitle) = 6 Then
            'WScript.CreateObject("WScript.Shell").Run sFileName, 9
            'End If
        End If
End Sub

Function BubbleSort(ByVal sTmp As String) As String
        'cheapo bubble sort
        Dim aTmp(), temp As String
        Dim i, j As Integer
        aTmp = Split(sTmp, vbCrLf)
        For i = UBound(aTmp) - 1 To 0 Step -1
            For j = 0 To i - 1
                If LCase(aTmp(j)) > LCase(aTmp(j + 1)) Then
                    temp = aTmp(j + 1)
                    aTmp(j + 1) = aTmp(j)
                    aTmp(j) = temp
                End If
            Next
        Next
        BubbleSort = Join(aTmp, vbCrLf)
    End Function

Function GetDTFileName() As String
        Dim sMth, sDay, sYr, sHr, sMin, sSec As String
        Dim dtNow As Date
        dtNow = Today.Now
        Month(dtNow).ToString.Substring(0, 2)
        Day(dtNow).ToString.Substring(0, 2)
        Year(dtNow).ToString.Substring(0, 4)
        Hour(dtNow).ToString.Substring(0, 2)
        Minute(dtNow).ToString.Substring(0, 2)
        Second(dtNow).ToString.Substring(0, 2)

        GetDTFileName = sMth & sDay & sYr & "_" & sHr & sMin & sSec
    End Function

Sub WriteFile(ByVal str As String, ByVal filepath As String)
        Dim fs As FileStream
        Dim s As StreamWriter
        Try
            fs = New FileStream(filepath, FileMode.Create, FileAccess.Write)
            s = New StreamWriter(fs)
            s.Write(str)

        Catch ex As Exception
        Finally
            s.Close()
        End Try
    End Sub

Function GetProbedID(ByVal sComp As String) As String
        Dim colItems As New ManagementObjectSearcher( _
               "root\CIMV2", _
               "SELECT SystemName FROM Win32_NetworkAdapter")
        For Each objItem As ManagementObject In colItems.Get()
            GetProbedID = objItem("SystemName")
        Next

    End Function

    Function GetAddRemove(ByVal sComp As String) As String
        'Function credit to Torgeir Bakken
        Dim oReg As Object
        Dim sBaseKey, aSubKeys() As String
        Dim iRC, cnt As Integer
        Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE
        oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
                    sComp & "/root/default:StdRegProv")
        sBaseKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
        iRC = oReg.EnumKey(HKLM, sBaseKey, aSubKeys)

        Dim sKey, sValue, sTmp, sVersion, sDateValue, sYr, sMth, sDay As String

        For Each sKey In aSubKeys
            iRC = oReg.GetStringValue(HKLM, sBaseKey & sKey, "DisplayName", sValue)
            If iRC <> 0 Then
                oReg.GetStringValue(HKLM, sBaseKey & sKey, "QuietDisplayName", sValue)
            End If
            If sValue <> "" Then
                iRC = oReg.GetStringValue(HKLM, sBaseKey & sKey, _
                                          "DisplayVersion", sVersion)
                If sVersion <> "" Then
                    sValue = sValue & " Ver: " & sVersion
                Else
                    sValue = sValue & vbTab
                End If
                iRC = oReg.GetStringValue(HKLM, sBaseKey & sKey, _
                                          "InstallDate", sDateValue)
                If sDateValue <> "" Then
                    sYr = Left(sDateValue, 4)
                    sMth = Mid(sDateValue, 5, 2)
                    sDay = Right(sDateValue, 2)
                    'some Registry entries have improper date format
                    On Error Resume Next
                    sDateValue = DateSerial(sYr, sMth, sDay)
                    On Error GoTo 0
                    If sDateValue <> "" Then
                        sValue = sValue '& vbTab & "Installed: " & sDateValue
                    End If
                End If
                sTmp = sTmp & sValue & vbCrLf
                cnt = cnt + 1
            End If
        Next
        sTmp = BubbleSort(sTmp)
        GetAddRemove = sTmp
    End Function
0
 
LVL 35

Expert Comment

by:YZlat
ID: 16854851
Then go to Project->Ad Reference and select .NET tag. Scroll down to System.Management namespace, hightlight it and click on SELECT, and then OK.

Then open your code-behid page again and put the following line on the very top of the file:

Imports System.Management
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16859193
OK? im using visual web developer 2005 beta and dont have a ad reference and select .NET tag?
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16859222
what software are you using?
0
 
LVL 35

Expert Comment

by:YZlat
ID: 16862786
VS.NET 2003
0
 
LVL 35

Expert Comment

by:YZlat
ID: 16862791
then copy System.Management.dll into your /bin directory instead
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16864223
i dont have a bin dir!
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16864287
i get 18 errors too

in the Default.aspx.vb file.

in my Default.aspx i get this line as an error;

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

"Context is not a member of _Default"....
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16864306
complier output is:

C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Management\2.0.0.0__b03f5f7f11d50a3a\System.Management.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.dll" /D:DEBUG=1 /debug+ /define:_MYTYPE=\"Web\" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.1.vb" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.2.vb"


Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation.  All rights reserved.

C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx(1) : error BC30456: 'InitializeCulture' is not a member of 'ASP.default_aspx'.

            Me.InitializeCulture
            ~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(3) : error BC30001: Statement is not valid in a namespace.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(27) : error BC30001: Statement is not valid in a namespace.

Function BubbleSort(ByVal sTmp As String) As String
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(44) : error BC30001: Statement is not valid in a namespace.

Function GetDTFileName() As String
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(58) : error BC30001: Statement is not valid in a namespace.

Sub WriteFile(ByVal str As String, ByVal filepath As String)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(72) : error BC30001: Statement is not valid in a namespace.

Function GetProbedID(ByVal sComp As String) As String
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(82) : error BC30001: Statement is not valid in a namespace.

Function GetAddRemove(ByVal sComp As String) As String
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(912304) : error BC30311: Value of type 'ASP.default_aspx' cannot be converted to 'System.Web.UI.Page'.

            CType(Me,System.Web.UI.Page).AppRelativeVirtualPath = "~/Default.aspx"
                  ~~                                                              
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(912304) : error BC30284: sub 'FrameworkInitialize' cannot be declared 'Overrides' because it does not override a sub in a base class.

        Protected Overrides Sub FrameworkInitialize()
                                ~~~~~~~~~~~~~~~~~~~  
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(912305) : error BC30456: 'FrameworkInitialize' is not a member of '_Default'.

            MyBase.FrameworkInitialize
            ~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(912307) : error BC30456: 'AddWrappedFileDependencies' is not a member of 'ASP.default_aspx'.

            Me.AddWrappedFileDependencies(Global.ASP.default_aspx.__fileDependencies)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                            
C:\Sean Delaney\Sean Delaney\Testing Folder\WebSite1\Default.aspx.vb(912308) : error BC30456: 'Request' is not a member of 'ASP.default_aspx'.

            Me.Request.ValidateInput
            ~~~~~~~~~~              
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(44) : error BC30456: 'Context' is not a member of '_Default'.

            Return CType(Me.Context.Profile,System.Web.Profile.DefaultProfile)
                         ~~~~~~~~~~                                          
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(50) : error BC30456: 'Context' is not a member of '_Default'.

            Return CType(Me.Context.ApplicationInstance,System.Web.HttpApplication)
                         ~~~~~~~~~~                                                
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(60) : error BC30154: Class 'default_aspx' must implement 'ReadOnly Property IsReusable() As Boolean' for interface 'System.Web.IHttpHandler'. Implementing property must have matching 'ReadOnly' or 'WriteOnly' specifiers.

        Implements System.Web.IHttpHandler
                   ~~~~~~~~~~~~~~~~~~~~~~~
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(60) : error BC30149: Class 'default_aspx' must implement 'Sub ProcessRequest(context As HttpContext)' for interface 'System.Web.IHttpHandler'.

        Implements System.Web.IHttpHandler
                   ~~~~~~~~~~~~~~~~~~~~~~~
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(78) : error BC30456: 'GetWrappedFileDependencies' is not a member of 'ASP.default_aspx'.

                Global.ASP.default_aspx.__fileDependencies = Me.GetWrappedFileDependencies(dependencies)
                                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~              
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(81) : error BC30456: 'Server' is not a member of 'ASP.default_aspx'.

            Me.Server.ScriptTimeout = 30000000
            ~~~~~~~~~                        
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(84) : error BC30284: property 'SupportAutoEvents' cannot be declared 'Overrides' because it does not override a property in a base class.

        Protected Overrides ReadOnly Property SupportAutoEvents() As Boolean
                                              ~~~~~~~~~~~~~~~~~            
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(209) : error BC30284: function 'GetTypeHashCode' cannot be declared 'Overrides' because it does not override a function in a base class.

        Public Overrides Function GetTypeHashCode() As Integer
                                  ~~~~~~~~~~~~~~~            
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(213) : error BC30284: sub 'ProcessRequest' cannot be declared 'Overrides' because it does not override a sub in a base class.

        Public Overrides Sub ProcessRequest(ByVal context As System.Web.HttpContext)
                             ~~~~~~~~~~~~~~                                        
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website1\bbb82a19\670f9727\App_Web_adknk2qp.0.vb(214) : error BC30456: 'ProcessRequest' is not a member of '_Default'.

            MyBase.ProcessRequest(context)
            ~~~~~~~~~~~~~~~~~~~~~        

Hope this helps you figure it out...
0
 
LVL 35

Expert Comment

by:YZlat
ID: 16865381
change

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>


to

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" %>
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16868095
what bout the rest of the errors?
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16868109
now i get file cannot run without Inherits="_Default"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question