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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:06:56+00:00 2026-05-26T20:06:56+00:00

I have created webservice and published it on local machine. Then I have uploaded

  • 0

I have created webservice and published it on local machine. Then I have uploaded it on server.

Now while I tried to access webservice it gives following error :

Parser Error Message: Could not create type 'webservice.myservice'

Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="myservice.asmx.cs" Class="webservice.myservice" %>

I tried This link but unable to solve my problem.

What should I do?

  • 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-26T20:06:56+00:00Added an answer on May 26, 2026 at 8:06 pm

    I don’t know if this is dragging something up from the dim and distant past, but I had this problem. I fixed it. So I thought I’d to share it.

    When you create a web service in Visual Studio (I’m using 2010 but I’d imagine it’s the same for others), it creates a file called Service1.asmx

    You will be tempted to rename it to MyService.asmx (or whatever).

    Then you’ll look inside and see the line

    public class Service1: System.Web.Services.WebService
    

    which you’ll change to

    public class MyService: System.Web.Services.WebService
    

    and then when you try running it, you get the error

    Could not create type ‘MyProject.MyService’

    Because it still thinks the class is called Service1.

    If you right click the .asmx file and select view markup, you’ll see it still says:

    <%@ WebService Language="C#" CodeBehind="MyService.asmx.cs" Class="MyProject.Service1" %>
    

    change it to

    <%@ WebService Language="C#" CodeBehind="MyService.asmx.cs" Class="MyProject.MyService" %>
    

    save it, try it.

    It worked for me.

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

Sidebar

Related Questions

I have created a cxf webservice within my cxf.xml file I have the following
I have created an webservice its working fine, but now i need to implemet
I have created a .NET WebService. There I have implemented the following WebMethod: [WebMethod]
I have created a webservice in .net 2.0, C#. I need to log some
I have created a console application that calls a method on a webservice. I
I have created one application in flex that is accessing the Java webservice using
I have created a function in PHP that calls a webservice and parses through
I have created a web service via WCF. Then I exposed it as a
I have created one webservice for accessing database.it's working fine .but when i am
I have problem with sending a object from my webservice. I have created a

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.