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

C

Coward 9

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";
}

}
 
M

Mark Rae

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?
 
G

Guest

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

Coward 9

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)
 
C

Coward 9

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,


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 said:
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";
}

}
 
G

Guest

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 said:
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,


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 said:
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";
}

}
 
M

Mark Rae

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.

Well, you'll need the contents of the \bin folder with the DLL, and you'll
almost certainly need web.config...
2. according to the description of my hosting package, looks like the
server should have everything needed ?

As Peter explained, the service will need to reside in an IIS application...
 
G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top