Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842
This is the forum to discuss the Wrox book Professional WCF Programming: .NET Development with the Windows Communication Foundation by Scott Klein; ISBN: 9780470089842
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional WCF Programming: .NET Dev with Windows Communication Found ISBN: 9780470089842 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 26th, 2007, 12:29 PM
Registered User
 
Join Date: Apr 2007
Location: , , USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default I encounter some problems when ...

I try to do the sample in chapter 3.

First of, when I tried to add the System.ServiceModal.dll file, it doesn't get added into my project. I had to manually created a Bin folder and copy/paste the dll into it. I don't know if that's the right way to do it or not; but that's how I do it on all of my projects.

I published the site into the virtual server as the book stated; http://localhost/WCFServiceDemo/ and ran http://localhost/WCFServiceDemo/Service.svc on my IE, the result on screen is:

<% @ServiceHost Language=C# Debug="true" Service="MyWCFService" CodeBehind="~/App_Code/Service.cs" %>

Exactly what it's written in the Service.svc file.

My WCFServiceDemo properties in IIS setting is:
Application Name = WCFServiceDemo
Execute Permissions = None
Application Protection = Medium (Pooled)

I don't see any 2.0 Pool.

What kind of Framework I installed?
dotnetfx3.exe size ~ 50.3MB it's a redistributable package
After I installed the package, I do not see: WCF Service template in VS2005 -> File -> New -> Web Site.

I downloaded: Microsoft Visual Studio 2005 CTP Extensions for .NET Framework 3.0 (WCF & WPF), then I am able to see it.

Still I cannot the get web service to run. Any idea? Thank you.



Aeries
http://www.AdvanceMicrotech.com

Nothing is impossible when it comes to coding.
  #2 (permalink)  
Old April 26th, 2007, 04:28 PM
Registered User
 
Join Date: Apr 2007
Location: , , USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm stuck!

I tried the same code and same configuration in Windows Server 2003 with Visual Studio "orcas". Published the site to the Local IIS virtual direcotry "WCFServiceDemo", run localhost/WCFServiceDemo/Service.svc ... it comes up with this error:

"Cannot connect to the configuration database. For tips on troubleshooting this error, search for article 823287 in the Microsoft Knowledge Base at http://support.microsoft.com"

which is: http://support.microsoft.com/kb/823287/en-us

I read the knowledge page, and the only Method that is reasonable is "Method 2". Went into the IIS -> Web Sites -> Properties -> Service Tab -> Checked and Un-checked the "Run WWW service in IIS 5.0 isolation mode" checkbox and clicked Apply. Closed IE and re-opened IE and ran localhost again, same message.

hmmmmmmmmmmmmmmmmmmmmmmm how does the author run this sample? Anyone else has problem or is able to run it? Thank you.

Aeries
http://www.AdvanceMicrotech.com

Nothing is impossible when it comes to coding.
  #3 (permalink)  
Old May 20th, 2007, 07:01 PM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to surfer
Default

Re: Chapter 3 Issues

I do NOT have the 2005 CTP Extensions installed, but I did get the service to respond to the browser by modifying the web.config "address" attribute of the "endpoint" element as follows:

<endpoint contract="IMyWCFService" binding="wsHttpBinding" address="" />

Moreover, I reviewed Chapter 15 which addresses potential issues depending on the installation order of IIS, .Net 3.0, etc.

You might double check the way your configuration of IIS handles .SVC files as well.

Is there a way to talk to this service, hosted in IIS, without installing the Windows SDK or 2005 Extensions?

Thanks,

MH
  #4 (permalink)  
Old May 21st, 2007, 11:01 AM
Registered User
 
Join Date: Apr 2007
Location: , , USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi surfer,

I have this in my Web.Config file:

<endpoint contract="IMyWCFService" binding="wsHttpBinding" address="http://localhost/WCFServiceDemo/service.svc" />

Aeries
http://www.AdvanceMicrotech.com

Nothing is impossible when it comes to coding.
  #5 (permalink)  
Old May 21st, 2007, 10:17 PM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to surfer
Default

Hi wishstar99,

RE: Chapter 3

I thought you were having issues, so I thought I would respond with my discovery - sorry if I misunderstood.

I have never been able to get the browser to respond, per the book, with the web.config settings as you have them...which is identical to the book settings. When I set the "address" attribute to an empty string, i.e. address="", I do get the browser to respond per the book.

I don't have the SDK or Extensions installed yet, but I am assuming that to call the service hosted under IIS I will need to run the svcutil.exe to generate the proper proxy class.

Did you get it running under IIS?

Thanks,

MH
  #6 (permalink)  
Old May 22nd, 2007, 09:40 AM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Wellington, FL , USA.
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hi Everyone,

Scott Klein here. I will look into this issue and post here within the next couple of days (I am out of the office but will address this quickly).



Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
  #7 (permalink)  
Old May 22nd, 2007, 12:36 PM
Registered User
 
Join Date: Apr 2007
Location: , , USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

surfer, no need to say sorry, it's nice that you reply.

I just set address="" and re-published the site, it's the same result.
In my WCFServiceDemo Properties from IIS, under Virtual tab, the last dropdown list --> Application Pool, I don't have "2.0 pool". My options are "Low, Medium and High". Is that the case why I cannot run the service? I have others virtual webs that work fine.

When I hit F5, i'll get a Directory Listing of my project files. I added Service.svc, and I get this error:

Parser Error Message: Unrecognized element 'serviceMetadata'.

in the web.config at: <serviceMetadata httpGetEnabled="true" />

Odd ...

--------------------------------------------------------------------------------------
I just tried it on a virtual server with Windows Server 2003 and Visual Studio "orcas" of March 2007. The IIS -> Localhost/WCFDemoeService/Service.svc is not working, the result is the same as my second post. There is no "2.0 Pool" in the Application Pool either.

I set the address="" and hit F5, and it works.

Now I wonder why it doesn't work on my system with Visual Studio 2005 and Windows XP. Should I re-install the .NET 3.0? Or do I need the SDK version?

Thanks again.


Aeries
http://www.AdvanceMicrotech.com

Nothing is impossible when it comes to coding.
  #8 (permalink)  
Old May 23rd, 2007, 01:22 AM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to surfer
Default

Hi wishstar99,

It sounds like progress. FYI - I have the same settings for IIS as you and I left it set to Medium (default).

I did not run the WCFDemoService project in the debugger using VS 2005. After I deployed it to the web site, i.e. to the WCFServiceDemo virtual directory, I pulled up a new browser and typed in the URL http://localhost/WCFServiceDemo/Service.svc. This resulted in the books result. I then verified the WSDL by typing in http://localhost/WCFServiceDemo/Service.svc?WSDL - and that appeared to look correct...well as best as I can tell :)

Since you have the CTP Extensions and the SDK installed, I would presume you could Add Service Reference for the WCFDemoClient winforms project.

Keep us posted!!

Thanks,

MH
  #9 (permalink)  
Old May 23rd, 2007, 12:00 PM
Registered User
 
Join Date: Apr 2007
Location: , , USA.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

surfer,

I did the same thing as you did, build and publish the site to IIS virtual directory as the book does.

So there error message I received last time:

Parser Error Message: Unrecognized element 'serviceMetadata'.

Because <serviceMetadata httpGetEnabled="true" /> is not inside a <behavior> tag in the web.config. Now when I hit F5, it works. But when I publish the site and run http://localhost/WCFDemoService/Service.svc, it doesn't do anything. It gives me this on my IE:

<% @ServiceHost Language="C#" Debug="true" Service="MyWCFService" CodeBehind="~/App_Code/Service.cs" %>

which is the same thing inside the Service.svc file. I also tried to create a new virtual directory and let the Application Pool = Medium ... but still it doesn't do it ... Any other thought or idea I can try?

Thanks again.

Aeries
http://www.AdvanceMicrotech.com

Nothing is impossible when it comes to coding.
  #10 (permalink)  
Old May 23rd, 2007, 04:06 PM
Registered User
 
Join Date: May 2007
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to surfer
Default

Hi wishstar99,

It sounds like the .svc file is being rendered as Text. In other words, IIS does not know what to do with it so it serves it up as Text to the browser.

Double check your Mappings Settings on the WCFServiceDemo virtual directory by going to Properties and then Configuration of the virtual directory WCFServiceDemo. The first tab has the Mappings for the virtual directory. You should be able to locate the .svc file extension to see how it is handled.

The Executable Path should be pointing to a .Net 2.0 framework dll - like aspnet_isapi.dll or something like that. Moreover, the Verbs should be GET, HEAD, POST, and DEBUG.

If that is NOT set correctly, then I think you have to run aspnet_regiis.exe. Pass it the /? option to get the help. This executable is down in the Microsoft.Net Framework folders in your Windows folder.

** Try reviewing Chapter 15 to double check your installation. It has some helpful hints depending on the installation order of .Net, IIS, etc.


Let me know.

Thanks,

MH
 


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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems already! KennySargent BOOK: Professional XNA Programming 2nd Edition ISBN: 978-0-470-26128-6 4 April 7th, 2008 03:36 AM
Hi all I encounter a prob while passing values.. geethan85 BOOK: Beginning Ruby on Rails 0 May 14th, 2007 01:17 AM
validate.asp problems and logon.asp problems p2ptolu Classic ASP Databases 0 February 16th, 2005 02:34 PM
ie problems cat CSS Cascading Style Sheets 1 October 27th, 2004 10:46 PM
Encounter ORA-00933 when use RETURN_GENERATED_KEYS ykchua Java Databases 0 August 10th, 2004 05:38 AM



All times are GMT -4. The time now is 11:46 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.