Click here to Skip to main content
15,884,023 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All

I have migrated am application from framework 1.1 to framework 4.5. Every thing is going well, but a got an error and I am not able to resolve it.

XML
Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not create type 'WS_GF.WS_GF'.

Source Error:


Line 1:  <%@ WebService Language="vb" Codebehind="WS_GF.asmx.vb" Class="WS_GF.WS_GF" %>

Source File: /WS_GF.asmx    Line: 1

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18447



Please reply with solution

Bellow is my WS_GF.asmx.vb code

VB
Imports System.Web.Services
Imports System.Reflection
Imports System.Configuration
Imports System.Web.Security
<System.Web.Services.WebService(Namespace:="http://tempuri.org/WS_GF/WS_GF")> _
Public Class WS_GF
    Inherits System.Web.Services.WebService
    Public configReader As AppSettingsReader = New AppSettingsReader
    Public Obj As Object = Nothing
    Public sResult As Object
    Public MyAssembly As [Assembly] = Nothing
    Public typs As Type() = Nothing
    Public arrObj(30) As Object
    Public myFile, loadFile, AsmbString, AblyModule As String
    Public fetcherMethod As MethodInfo
    Public MyType, objType As Type

    Public Sub New()
        MyBase.New()
        'This call is required by the Web Services Designer.
        InitializeComponent()
        loadFile = CType(configReader.GetValue("DATABASE", GetType(System.String)), String)

        'Load the Assembly from a file according to the given
        Try
            Select Case UCase(loadFile)
                Case "ORACLE"
                    MyAssembly = [Assembly].LoadFrom("CIMS_ORA_AsmGF.dll")
                Case "SQL"
                    MyAssembly = [Assembly].LoadFrom("CIMS_SQL_AsmGF.dll")
                Case "DB2"
                    MyAssembly = [Assembly].LoadFrom("CIMS_DB2_AsmGF.dll")
            End Select
        Catch ex As Exception
            Dim EEx As String
            EEx = ex.Message
        End Try
        'Add your own initialization code after the InitializeComponent() call

    End Sub

    'Required by the Web Services Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Web Services Designer
    'It can be modified using the Web Services Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        components = New System.ComponentModel.Container
    End Sub
    

    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        'CODEGEN: This procedure is required by the Web Services Designer
        'Do not modify it using the code editor.
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

End Class


bellow is my WS_GF.asmx code

<%@ WebService Language="vb" Codebehind="WS_GF.asmx.vb" Class="WS_GF.WS_GF" %>


Please reply with solution.
Posted
Updated 26-Aug-14 0:19am
v3

Start by looking at your asmx file and finding the WS_GF class: what namespace is it in? Is it contained in any other classes? It may be that you need to change the WS_GF.WS_GF reference in the asmx file to just WS_GF - but without looking we can't tell!

This is not something we can directly solve: we don't have access to your source files, so we can;t even look for you!
 
Share this answer
 
XML
Line 1:  <%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/BGT/UI/PreJoining/PreJoiningMasterPage.Master" CodeBehind="ResumeUpload.aspx.vb" Inherits="ARMS.ResumeUpload" %>
Line 2:  <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
Line 3:  <title>Resume Upload</title>
 
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