Parser error "could not create type" w .NET Framework 2.0

Discussion in 'ASP .Net Web Services' started by Joakim Sundén, Nov 10, 2005.

  1. Hi.
    I have created a simple web service project, only using the HelloWorld
    sample already there, with Visual Studio 2005. If I browse the web service
    ..asmx file by right-clicking it using the new built-in web server everything
    works just fine.

    All attempts to access the service through IIS fails with the parser error
    "Could not create type 'Service1'" with a reference to line 1 of the .asmx
    file:

    <%@ WebService Language="C#" CodeBehind="~/App_Code/Service1.cs"
    Class="Service1" %>

    This is true if I publish the site/service with precompilation or if I copy
    it to a different location. Whatever I do I can only get it to work with the
    built-in web server. Can someone please help me figuring out what is wrong?

    I have configured the web site to use ASP.NET 2.0 so that is not the problem.

    /Joakim
    Joakim Sundén, Nov 10, 2005
    #1
    1. Advertising

  2. Joakim Sundén

    Roy Kiesler Guest

    I'm running into the very same error -- has anyone been able to figure
    this out?

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

    Source Error:

    Line 1: <%@ WebService Language="C#"
    CodeBehind="/APDemo/App_Code/Service.cs" Class="Service" %>

    Source File: /APDemo/Service.asmx Line: 1

    Version Information: Microsoft .NET Framework Version:2.0.50727.42;
    ASP.NET Version:2.0.50727.42


    Joakim Sundén wrote:
    > Hi.
    > I have created a simple web service project, only using the HelloWorld
    > sample already there, with Visual Studio 2005. If I browse the web service
    > .asmx file by right-clicking it using the new built-in web server everything
    > works just fine.
    >
    > All attempts to access the service through IIS fails with the parser error
    > "Could not create type 'Service1'" with a reference to line 1 of the .asmx
    > file:
    >
    > <%@ WebService Language="C#" CodeBehind="~/App_Code/Service1.cs"
    > Class="Service1" %>
    >
    > This is true if I publish the site/service with precompilation or if I copy
    > it to a different location. Whatever I do I can only get it to work with the
    > built-in web server. Can someone please help me figuring out what is wrong?
    >
    > I have configured the web site to use ASP.NET 2.0 so that is not the problem.
    >
    > /Joakim
    Roy Kiesler, Nov 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. The unProfessional

    Could not create type...

    The unProfessional, Oct 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,924
    The unProfessional
    Oct 15, 2004
  2. Rotsey
    Replies:
    0
    Views:
    3,962
    Rotsey
    May 14, 2006
  3. DevMountain
    Replies:
    7
    Views:
    1,460
    DevMountain
    Apr 17, 2009
  4. AAaron123
    Replies:
    1
    Views:
    839
    AAaron123
    Jul 27, 2009
  5. OsamaBG
    Replies:
    4
    Views:
    272
    OsamaBG
    Aug 30, 2005
Loading...

Share This Page