By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,561 Members | 3,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,561 IT Pros & Developers. It's quick & easy.

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

P: n/a
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";
}

}

Dec 24 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
"Coward 9" <Co*****@gmail.comwrote in message
news:11**********************@a3g2000cwd.googlegro ups.com...
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?
Dec 24 '06 #2

P: n/a
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";
}

}

Dec 24 '06 #3

P: n/a
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/MsH...op&__lf=Static
My dev environment:

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


Mark Rae wrote:
"Coward 9" <Co*****@gmail.comwrote in message
news:11**********************@a3g2000cwd.googlegro ups.com...
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?
Dec 24 '06 #4

P: n/a
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";
}

}
Dec 24 '06 #5

P: n/a
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";
}
>
}
>
>

Dec 25 '06 #6

P: n/a
HI,

Surprise, everything looks correct if I right mouse button | View in
Browser the folder has Service.asmx

http://localhost:1854/WebSite1/wsc12...e/Service.asmx

Dec 25 '06 #7

P: n/a
"Coward 9" <Co*****@gmail.comwrote in message
news:11**********************@48g2000cwx.googlegro ups.com...
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...
Dec 25 '06 #8

P: n/a
"Coward 9" <Co*****@gmail.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
Surprise, everything looks correct if I right mouse button | View in
Browser the folder has Service.asmx
Yes, well it will do, because everything it needs is on your local machine
anyway...
http://localhost:1854/WebSite1/wsc12...e/Service.asmx
There's no point posting a link to http://localhost - you're the only person
who can see it... :-)
Dec 25 '06 #9

P: n/a
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/wsc12...e/Service.asmx

Dec 25 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.