XML service publishing problem: Server Error in '/' Application

Discussion in 'ASP .Net Web Services' started by Coward 9, Dec 24, 2006.

  1. Coward 9

    Coward 9 Guest

    HI,

    I created the simplest "ASP .NET Web Service" by using VS 2005 and
    Visual C#( File | New | Web Site). However, when I tried to access the
    service from IE 7.0

    http://www.aztao.org/WebService/Service.asmx
    (the fie DOES exist which can be verified by typing
    http://www.aztao.org/WebService/ in address bar only).

    it gave me error messages below. This is my 1st try with ASP. Anybody
    generous enough to help?


    Server Error in '/' Application.
    --------------------------------------------------------------------------------

    The resource cannot be found.
    Description: HTTP 404. The resource you are looking for (or one of its
    dependencies) could have been removed, had its name changed, or is
    temporarily unavailable. Please review the following URL and make sure
    that it is spelled correctly.

    Requested URL: /WebService/Service.asmx




    the source codes of service.asmx are

    <%@ WebService Language="C#" Class="Service" %>

    using System;
    using System.Web;
    using System.Web.Services;
    using System.Web.Services.Protocols;

    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class Service : System.Web.Services.WebService
    {
    public Service () {

    //Uncomment the following line if using designed components
    //InitializeComponent();
    }

    [WebMethod]
    public string HelloWorld() {
    return "Hello World";
    }

    }
    Coward 9, Dec 24, 2006
    #1
    1. Advertising

  2. The "WebService" folder your asmx endpoint file is in needs to be marked as
    an Application in IIS.
    Peter

    --
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short urls & more: http://ittyurl.net




    "Coward 9" wrote:

    > HI,
    >
    > I created the simplest "ASP .NET Web Service" by using VS 2005 and
    > Visual C#( File | New | Web Site). However, when I tried to access the
    > service from IE 7.0
    >
    > http://www.aztao.org/WebService/Service.asmx
    > (the fie DOES exist which can be verified by typing
    > http://www.aztao.org/WebService/ in address bar only).
    >
    > it gave me error messages below. This is my 1st try with ASP. Anybody
    > generous enough to help?
    >
    >
    > Server Error in '/' Application.
    > --------------------------------------------------------------------------------
    >
    > The resource cannot be found.
    > Description: HTTP 404. The resource you are looking for (or one of its
    > dependencies) could have been removed, had its name changed, or is
    > temporarily unavailable. Please review the following URL and make sure
    > that it is spelled correctly.
    >
    > Requested URL: /WebService/Service.asmx
    >
    >
    >
    >
    > the source codes of service.asmx are
    >
    > <%@ WebService Language="C#" Class="Service" %>
    >
    > using System;
    > using System.Web;
    > using System.Web.Services;
    > using System.Web.Services.Protocols;
    >
    > [WebService(Namespace = "http://tempuri.org/")]
    > [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    > public class Service : System.Web.Services.WebService
    > {
    > public Service () {
    >
    > //Uncomment the following line if using designed components
    > //InitializeComponent();
    > }
    >
    > [WebMethod]
    > public string HelloWorld() {
    > return "Hello World";
    > }
    >
    > }
    >
    >
    Peter Bromberg [C# MVP], Dec 24, 2006
    #2
    1. Advertising

  3. Coward 9

    Coward 9 Guest

    HI, Mark:

    thanks for your reply. I used "File | New | Web Site" to create the
    project. I tried to build the solution and did NOT see any
    differences(I am wondering why too)

    1. Other than to copy asmx file to the web, what else should I do?
    (I just followed the steps in
    http://msdn2.microsoft.com/en-us/library/7hs6sw69.aspx.

    2. according to the description of my hosting package, looks like the
    server should have everything needed ?

    http://order.1and1.com/xml/order/Ms...AE5844686D964F.TC61a?__frame=_top&__lf=Static


    My dev environment:

    Windows xp, sp 2
    VS 2005
    (I do NOT have local IIS installed)




    Mark Rae wrote:
    > "Coward 9" <> wrote in message
    > news:...
    >
    > > I created the simplest "ASP .NET Web Service" by using VS 2005 and
    > > Visual C#( File | New | Web Site). However, when I tried to access the
    > > service from IE 7.0
    > >
    > > http://www.aztao.org/WebService/Service.asmx
    > > (the fie DOES exist which can be verified by typing
    > > http://www.aztao.org/WebService/ in address bar only).
    > >
    > > it gave me error messages below. This is my 1st try with ASP. Anybody
    > > generous enough to help?

    >
    > A couple of things spring to mind:
    >
    > 1) How have you compiled and deployed the service? You've not simply copied
    > Service.asmx onto the webserver, have you...?
    >
    > 2) Does the webserver have the (correct version of the) framework installed?
    Coward 9, Dec 24, 2006
    #3
  4. Coward 9

    Coward 9 Guest

    HI, Peter:

    How can I mark the folder as an applicaition? I do NOT have local IIS
    installation. Do I need to ask hosting company to do something
    specifical for that purpose?

    Thanks,



    Peter wrote:
    > The "WebService" folder your asmx endpoint file is in needs to be marked as
    > an Application in IIS.
    > Peter
    >
    > --
    > Site: http://www.eggheadcafe.com
    > UnBlog: http://petesbloggerama.blogspot.com
    > Short urls & more: http://ittyurl.net
    >
    >
    >
    >
    > "Coward 9" wrote:
    >
    > > HI,
    > >
    > > I created the simplest "ASP .NET Web Service" by using VS 2005 and
    > > Visual C#( File | New | Web Site). However, when I tried to access the
    > > service from IE 7.0
    > >
    > > http://www.aztao.org/WebService/Service.asmx
    > > (the fie DOES exist which can be verified by typing
    > > http://www.aztao.org/WebService/ in address bar only).
    > >
    > > it gave me error messages below. This is my 1st try with ASP. Anybody
    > > generous enough to help?
    > >
    > >
    > > Server Error in '/' Application.
    > > --------------------------------------------------------------------------------
    > >
    > > The resource cannot be found.
    > > Description: HTTP 404. The resource you are looking for (or one of its
    > > dependencies) could have been removed, had its name changed, or is
    > > temporarily unavailable. Please review the following URL and make sure
    > > that it is spelled correctly.
    > >
    > > Requested URL: /WebService/Service.asmx
    > >
    > >
    > >
    > >
    > > the source codes of service.asmx are
    > >
    > > <%@ WebService Language="C#" Class="Service" %>
    > >
    > > using System;
    > > using System.Web;
    > > using System.Web.Services;
    > > using System.Web.Services.Protocols;
    > >
    > > [WebService(Namespace = "http://tempuri.org/")]
    > > [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    > > public class Service : System.Web.Services.WebService
    > > {
    > > public Service () {
    > >
    > > //Uncomment the following line if using designed components
    > > //InitializeComponent();
    > > }
    > >
    > > [WebMethod]
    > > public string HelloWorld() {
    > > return "Hello World";
    > > }
    > >
    > > }
    > >
    > >
    Coward 9, Dec 24, 2006
    #4
  5. Re: XML service publishing problem: Server Error in '/' Applicatio

    Yes.
    Most shared hosting arrangements have some sort of control panel page you
    can log into and do this for yourself.
    Peter

    --
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short urls & more: http://ittyurl.net




    "Coward 9" wrote:

    > HI, Peter:
    >
    > How can I mark the folder as an applicaition? I do NOT have local IIS
    > installation. Do I need to ask hosting company to do something
    > specifical for that purpose?
    >
    > Thanks,
    >
    >
    >
    > Peter wrote:
    > > The "WebService" folder your asmx endpoint file is in needs to be marked as
    > > an Application in IIS.
    > > Peter
    > >
    > > --
    > > Site: http://www.eggheadcafe.com
    > > UnBlog: http://petesbloggerama.blogspot.com
    > > Short urls & more: http://ittyurl.net
    > >
    > >
    > >
    > >
    > > "Coward 9" wrote:
    > >
    > > > HI,
    > > >
    > > > I created the simplest "ASP .NET Web Service" by using VS 2005 and
    > > > Visual C#( File | New | Web Site). However, when I tried to access the
    > > > service from IE 7.0
    > > >
    > > > http://www.aztao.org/WebService/Service.asmx
    > > > (the fie DOES exist which can be verified by typing
    > > > http://www.aztao.org/WebService/ in address bar only).
    > > >
    > > > it gave me error messages below. This is my 1st try with ASP. Anybody
    > > > generous enough to help?
    > > >
    > > >
    > > > Server Error in '/' Application.
    > > > --------------------------------------------------------------------------------
    > > >
    > > > The resource cannot be found.
    > > > Description: HTTP 404. The resource you are looking for (or one of its
    > > > dependencies) could have been removed, had its name changed, or is
    > > > temporarily unavailable. Please review the following URL and make sure
    > > > that it is spelled correctly.
    > > >
    > > > Requested URL: /WebService/Service.asmx
    > > >
    > > >
    > > >
    > > >
    > > > the source codes of service.asmx are
    > > >
    > > > <%@ WebService Language="C#" Class="Service" %>
    > > >
    > > > using System;
    > > > using System.Web;
    > > > using System.Web.Services;
    > > > using System.Web.Services.Protocols;
    > > >
    > > > [WebService(Namespace = "http://tempuri.org/")]
    > > > [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    > > > public class Service : System.Web.Services.WebService
    > > > {
    > > > public Service () {
    > > >
    > > > //Uncomment the following line if using designed components
    > > > //InitializeComponent();
    > > > }
    > > >
    > > > [WebMethod]
    > > > public string HelloWorld() {
    > > > return "Hello World";
    > > > }
    > > >
    > > > }
    > > >
    > > >

    >
    >
    Peter Bromberg [C# MVP], Dec 24, 2006
    #5
  6. Coward 9

    Coward 9 Guest

    Coward 9, Dec 25, 2006
    #6
  7. Re: XML service publishing problem: Server Error in '/' Applicatio

    Surprise? I'm not surprised! That http://localhost:1854 (port 1854) means you
    are running this in WebSite project mode under the built-in Development
    Server in Visual Studio. It's not even running under IIS.
    Peter

    --
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    Short urls & more: http://ittyurl.net




    "Coward 9" wrote:

    > HI,
    >
    > Surprise, everything looks correct if I right mouse button | View in
    > Browser the folder has Service.asmx
    >
    > http://localhost:1854/WebSite1/wsc125083449/WebService/Service.asmx
    >
    >
    Peter Bromberg [C# MVP], Dec 25, 2006
    #7
    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. Saber S
    Replies:
    1
    Views:
    5,437
    Saber S
    Nov 14, 2003
  2. Stylus Studio
    Replies:
    0
    Views:
    399
    Stylus Studio
    Jul 26, 2004
  3. Replies:
    0
    Views:
    381
  4. Stylus Studio
    Replies:
    0
    Views:
    411
    Stylus Studio
    Sep 26, 2006
  5. Coward 9
    Replies:
    9
    Views:
    2,424
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 25, 2006
Loading...

Share This Page