470,831 Members | 1,313 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,831 developers. It's quick & easy.

Convert web service to Framework 2.0

I have a web service that I converted from VS 2003 Framework 1.1. to VS 2005
Framework 2.0. I tried to use the same IIS web site to run the web service.
I deleted the Framework 1.1 files published the 2.0 files changed IIS to use
Framework 2.0 and changed the application pool, also restarted IIS. When I
try to get to the web service it tells me the file cannot be found. The web
service file(asmx) is in the same place and named the same. The only thing
that did change was the assembly file name. Do I need to create a whole new
web site to run the Framework 2.0 web service or am I missing something in
my IIS configuration?

Thanks in advance!
Rick
Sep 5 '07 #1
7 3637
"Rick" <rf*****@newsgroups.nospamwrote in message
news:OS**************@TK2MSFTNGP05.phx.gbl...
>I have a web service that I converted from VS 2003 Framework 1.1. to VS
2005 Framework 2.0. I tried to use the same IIS web site to run the web
service. I deleted the Framework 1.1 files published the 2.0 files changed
IIS to use Framework 2.0 and changed the application pool, also restarted
IIS. When I try to get to the web service it tells me the file cannot be
found. The web service file(asmx) is in the same place and named the same.
The only thing that did change was the assembly file name. Do I need to
create a whole new web site to run the Framework 2.0 web service or am I
missing something in my IIS configuration?
Be careful! Microsoft in its wisdom introduced the "Web Site" model to
VS2005. It is apparently the default when you do a conversion.

The only problem is that it's not at all the same thing that you had in
VS2003. There is no project, there is no bin folder, and nothing ever gets
built.

If this is what happened to you, then you want to install Visual Studio
2005 SP1, then create a new Web Service PROJECT (File->New->Project), then
copy your VS2003 source files to the new project directory and use Add
Existing Item to add the files to the new (old) project.

You should then be able to build your project and be exactly where Microsoft
_should_ have left you after an upgrade.

If this was your problem, then you should feel lucky. This wasted six weeks
of development for us, as the build machine kept reverting to a Web Site,
every single night for six weeks.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Sep 6 '07 #2
Thanks for John's input.

Hi Rick,

Yes, as John has mentioned, ASP.NET 2.0 web application project model has
changed a lot. For the default "web site" project model, it will not
generate precompiled dll like the VS 2003/ASP.NET 1.1 project. Therefore,
for the problem you met here, I think there are two parts we can check:

** Whether you've deployed all the necessary stuff specific to the
webservice project to the target IIS virtual dir. I suggest copy all the
stuffs from your webservice project folder(at development environment)

** Whether the ASP.NET 2.0 runtime has been configured correctly on the
target machine. For test, you can try put a simple aspx page in that
virtual directory or a test asmx file in it to see whether you can use IE
browser to correctly visit them(or at least get any exception or error from
ASP.NET runtime).

To manually register ASP.NET 2.0 runtime, you can use the
"aspnet_regiis.exe" command line tool from .NET framework folder:

#ASP.NET IIS Registration Tool (Aspnet_regiis.exe)
http://msdn2.microsoft.com/en-us/lib...8h(VS.80).aspx

If you have anything unclear or any other question, please feel free to
post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
From: "John Saunders [MVP]" <john.saunders at trizetto.com>
References: <OS**************@TK2MSFTNGP05.phx.gbl>
Subject: Re: Convert web service to Framework 2.0
Date: Wed, 5 Sep 2007 19:53:48 -0400
"Rick" <rf*****@newsgroups.nospamwrote in message
news:OS**************@TK2MSFTNGP05.phx.gbl...
>I have a web service that I converted from VS 2003 Framework 1.1. to VS
2005 Framework 2.0. I tried to use the same IIS web site to run the web
service. I deleted the Framework 1.1 files published the 2.0 files changed
IIS to use Framework 2.0 and changed the application pool, also restarted
IIS. When I try to get to the web service it tells me the file cannot be
found. The web service file(asmx) is in the same place and named the same.
The only thing that did change was the assembly file name. Do I need to
create a whole new web site to run the Framework 2.0 web service or am I
missing something in my IIS configuration?
Be careful! Microsoft in its wisdom introduced the "Web Site" model to
VS2005. It is apparently the default when you do a conversion.

The only problem is that it's not at all the same thing that you had in
VS2003. There is no project, there is no bin folder, and nothing ever gets
built.

If this is what happened to you, then you want to install Visual Studio
2005 SP1, then create a new Web Service PROJECT (File->New->Project), then
copy your VS2003 source files to the new project directory and use Add
Existing Item to add the files to the new (old) project.

You should then be able to build your project and be exactly where
Microsoft
_should_ have left you after an upgrade.

If this was your problem, then you should feel lucky. This wasted six weeks
of development for us, as the build machine kept reverting to a Web Site,
every single night for six weeks.
--
----------------------------------------------------------------------------
----
John Saunders | MVP - Windows Server System - Connected System Developer
Sep 6 '07 #3
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:PS**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for John's input.

Hi Rick,

Yes, as John has mentioned, ASP.NET 2.0 web application project model has
changed a lot.
Actually, Steven, the "Web Application Project" is identical to the original
model. It's the "Web Site" model that's new but not improved.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Sep 6 '07 #4
Yes, I was aware of the SP1 issue. I created a Hello World web service,
tested on my local machine, pushed everything to the web server. As far as I
can tell everything is configured correctly. But I still get the following
error: Even though the file is there.

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: /Service1.asmx

--------------------------------------------------------------------------------

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

"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message
news:uf**************@TK2MSFTNGP04.phx.gbl...
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:PS**************@TK2MSFTNGHUB02.phx.gbl...
>Thanks for John's input.

Hi Rick,

Yes, as John has mentioned, ASP.NET 2.0 web application project model has
changed a lot.

Actually, Steven, the "Web Application Project" is identical to the
original model. It's the "Web Site" model that's new but not improved.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Sep 6 '07 #5
"Rick" <rf*****@newsgroups.nospamwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Yes, I was aware of the SP1 issue. I created a Hello World web service,
tested on my local machine, pushed everything to the web server. As far as
I can tell everything is configured correctly. But I still get the
following error: Even though the file is there.

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: /Service1.asmx
Are there any error or warning messages in the Windows event log?

Also, though you said you're aware of the SP1 issue, you didn't say if
you're running SP1, or whether you built this as a Web Application Project
or as a Web Site?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Sep 6 '07 #6
I am running SP1 and build it as an ASP.net Web Service. I figured it out.

By default the following is added when creating a web service:
<System.Web.Services.WebServiceBinding(ConformsTo: =WsiProfiles.BasicProfile1_1)>
_

<ToolboxItem(False)_

This was causing the problem even though it was giving a bogus error message
as far as Page not found.

I removed these lines from the web service, published it. had to run the
aspnet_regiis -i. and it works now.

thanks for the help!
"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message
news:Ob**************@TK2MSFTNGP03.phx.gbl...
"Rick" <rf*****@newsgroups.nospamwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Yes, I was aware of the SP1 issue. I created a Hello World web service,
tested on my local machine, pushed everything to the web server. As far
as I can tell everything is configured correctly. But I still get the
following error: Even though the file is there.

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: /Service1.asmx

Are there any error or warning messages in the Windows event log?

Also, though you said you're aware of the SP1 issue, you didn't say if
you're running SP1, or whether you built this as a Web Application Project
or as a Web Site?
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Sep 6 '07 #7
Thanks for your followup Rick,

Sorry for the followup late as I was on sick previous days. Anyway, glad
that you've figured out the problem. If you need any further help later,
welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Reply-To: "Rick" <rf*****@newsgroups.nospam>
From: "Rick" <rf*****@newsgroups.nospam>
I am running SP1 and build it as an ASP.net Web Service. I figured it out.

By default the following is added when creating a web service:
<System.Web.Services.WebServiceBinding(ConformsTo: =WsiProfiles.BasicProfile1
_1)>
_

<ToolboxItem(False)_

This was causing the problem even though it was giving a bogus error
message
as far as Page not found.

I removed these lines from the web service, published it. had to run the
aspnet_regiis -i. and it works now.

thanks for the help!
"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message
news:Ob**************@TK2MSFTNGP03.phx.gbl...
"Rick" <rf*****@newsgroups.nospamwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Yes, I was aware of the SP1 issue. I created a Hello World web service,
tested on my local machine, pushed everything to the web server. As far
as I can tell everything is configured correctly. But I still get the
following error: Even though the file is there.

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: /Service1.asmx

Are there any error or warning messages in the Windows event log?

Also, though you said you're aware of the SP1 issue, you didn't say if
you're running SP1, or whether you built this as a Web Application
Project
or as a Web Site?
--
----------------------------------------------------------------------------
----
John Saunders | MVP - Windows Server System - Connected System Developer


Sep 11 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by David C. Taylor | last post: by
5 posts views Thread by Stu Carter | last post: by
5 posts views Thread by Gardar | last post: by
2 posts views Thread by John A | last post: by
5 posts views Thread by Peter Lapic | last post: by
dmjpro
3 posts views Thread by dmjpro | last post: by
13 posts views Thread by dancer | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.