HighTechTalks DotNet Forums  

Error with Getting Started Sample from WCF

Dotnet Distributed Applications microsoft.public.dotnet.distributed_apps


Discuss Error with Getting Started Sample from WCF in the Dotnet Distributed Applications forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
michael sorens
 
Posts: n/a

Default Error with Getting Started Sample from WCF - 12-13-2007 , 03:36 PM






I am a newbie to WCF. According to the Getting Started Sample
(http://msdn2.microsoft.com/en-us/library/ms751519.aspx) I loaded and bebuilt
the GettingStarted solution from the WCF samples collection and attempted to
execute it. Upon executing the client code, I get an error "(405) method not
allowed".

Since I did not write or change any code, I presume there is something in my
environment I did not set up correctly. I observe that if I load this URL --
http://localhost/servicemodelsamples/service.svc --
it does access the service.svc file. What are appropriate steps to diagnose
this?


Reply With Quote
  #2  
Old   
Steven Cheng[MSFT]
 
Posts: n/a

Default RE: Error with Getting Started Sample from WCF - 12-14-2007 , 02:26 AM






Hi michael,

From your description, I understand that you encountered the following
error when try running the WCF "Getting started" sample, correct?

"(405) method not allowed".

As for the "getting started" sample, it has two projects, a client console
application and a service application. I thinik the problem you met is
likely due to the service appliction. The service application is a class
library project, and it contains a WCF service class(with contract) and
service.svc and web.config files. This means it is supposed to be hosted in
IIS. So my first question is whether you've successfully deploy the service
application into IIS? A simple way is "Web Share" the "service" project
folder(give IIS worker process account access permission to the folder) and
make sure the virtual directory is mark as "application" and set to ASP.NET
version 2.0. also, to test it, you can try visiting the service.svc file
in browser(through its IIS http:// based url ) to see whether you can
correctly see the service description page.

If you haven't done the above, you need to do it first. You can have a look
at the following reference:

#How to: Host a WCF Service in IIS
http://msdn2.microsoft.com/en-us/library/ms733766.aspx

http://msdn2.microsoft.com/en-us/library/aa751792.aspx

here is a more visual one:

#Hosting WCF Service in IIS
http://blogs.msdn.com/amitlale/archi...service-in-iis
..aspx

If you've deployed the service correctly and can visit the service.svc
(through http url) correctly. We may look for something else. Here are some
web threads I've found on web mentioned some similar issues. You may also
have a look to see whether they help some.

http://forums.microsoft.com/MSDN/Sho...36775&SiteID=1

http://forums.microsoft.com/MSDN/Sho...47078&SiteID=1

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.







--------------------
Quote:
From: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= <m_j_sorens (AT) newsgroup (DOT) nospam
Subject: Error with Getting Started Sample from WCF
Date: Thu, 13 Dec 2007 13:36:04 -0800

I am a newbie to WCF. According to the Getting Started Sample
(http://msdn2.microsoft.com/en-us/library/ms751519.aspx) I loaded and
bebuilt
the GettingStarted solution from the WCF samples collection and attempted
to
execute it. Upon executing the client code, I get an error "(405) method
not
allowed".

Since I did not write or change any code, I presume there is something in
my
environment I did not set up correctly. I observe that if I load this URL
--
http://localhost/servicemodelsamples/service.svc --
it does access the service.svc file. What are appropriate steps to
diagnose
this?




Reply With Quote
  #3  
Old   
michael sorens
 
Posts: n/a

Default RE: Error with Getting Started Sample from WCF - 12-18-2007 , 01:23 PM



You were wondering whether I was able to visit the service.svc (through http
url) correctly; in my initial post I indicated that I was. However, I was
wrong. (When least expecting it, assumptions can cause an inevitable
"Arrrggghhh!". :-)
What *I* meant--being a novice at web services--was that I was seeing the
text of the .svc file. What *you* meant was whether I could see a web page
describing the service.

Given that I saw only the text of the file, the second link you provided led
me to this link
(http://blogs.msdn.com/wenlong/archiv...10/748294.aspx) entitled "Get
Plain Text for WCF .svc Files From IIS" and a tool to clean the IIS mappings.
Once I did that, I then received the correct service page when loading the
..svc file, and the Getting Started code now runs successfully.

Reply With Quote
  #4  
Old   
Steven Cheng[MSFT]
 
Posts: n/a

Default RE: Error with Getting Started Sample from WCF - 12-18-2007 , 08:37 PM



Thanks for your reply michael,

I'm glad that you've got it working.

Enjoy WCF

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
Quote:
From: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= <m_j_sorens (AT) newsgroup (DOT) nospam
References: <031E44AF-4B54-4D6D-BD13-DD46DC602D2C (AT) microsoft (DOT) com
DrC$DsiPIHA.360 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl
Subject: RE: Error with Getting Started Sample from WCF
Date: Tue, 18 Dec 2007 11:23:01 -0800

You were wondering whether I was able to visit the service.svc (through
http
url) correctly; in my initial post I indicated that I was. However, I was
wrong. (When least expecting it, assumptions can cause an inevitable
"Arrrggghhh!". :-)
What *I* meant--being a novice at web services--was that I was seeing the
text of the .svc file. What *you* meant was whether I could see a web page
describing the service.

Given that I saw only the text of the file, the second link you provided
led
me to this link
(http://blogs.msdn.com/wenlong/archiv...10/748294.aspx) entitled
"Get
Plain Text for WCF .svc Files From IIS" and a tool to clean the IIS
mappings.
Once I did that, I then received the correct service page when loading the
.svc file, and the Getting Started code now runs successfully.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.