Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > Windows Communication Foundation
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Windows Communication Foundation Discussion of the beta version of Windows Communication Foundation formerly know as codename "Indigo"
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Windows Communication Foundation 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 November 3rd, 2006, 10:15 AM
Registered User
 
Join Date: Nov 2006
Location: Pune, Maharshtra, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default getting plain text for .svc file

I was getting plaint text for all .svc files from IIS. I used CleanIISScriptMaps.exe tool to clear ScriptMaps. Still .svc is not supported for some virtual directories. For one .svc file I am getting proper service description but for another I am getting plain text. How to resolve the problem?


Regards,
Chandrak
  #2 (permalink)  
Old November 3rd, 2006, 10:33 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 Chandrak,

What are you using to create the .svc files? Are you using the built-in VS templates?

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
  #3 (permalink)  
Old November 3rd, 2006, 10:42 AM
Registered User
 
Join Date: Nov 2006
Location: Pune, Maharshtra, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Scott,

Thanks for your reply.

.svc file is xml file hardly of one line so I am just copying it from the existing project. for example <%@ServiceHost language=c# Debug="true" Service="DerivativeCalculatorService.CalculatorSer vice" %>. It contains the name of the service hosted in IIS.

Regards,
Chandrak
  #4 (permalink)  
Old November 3rd, 2006, 11:41 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

Right, I think you can't just copy it, because IIS needs to know "This is a WCF Service" so that it knows to use the .svc file. I will look at something and get back to you.


Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
  #5 (permalink)  
Old November 4th, 2006, 12:15 PM
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 Chandrak,

I apologize for taking so long to back with you on this. I had to find what I was looking for.

OK, you need to add a mapping for the .svc file. In IIS, right mouse click on the web site that isn't working, and select properties. On the Virtual Directory tab, click the Configuration button. That will bring up the Application Configuration screen. On the mappings tab, under the Appliction Extenstions, look to see if you have an entry for the .svc extension.

If you don't, you need to add one, and map it to the aspnet_isapi.dll.

To do this, simply click the Add button and browse to the isapi dll and enter an extension of .svc.

You should be good to go!

Let me know if I can help you with anything else.



Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
  #6 (permalink)  
Old November 6th, 2006, 01:45 AM
Registered User
 
Join Date: Nov 2006
Location: Pune, Maharshtra, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Scott,

Thanks for your help. But the mapping for .svc file is there in both applications. And both are mapped to the same aspnet_isapi.dll.:(

Regards,
Chandrak
  #7 (permalink)  
Old November 6th, 2006, 12:14 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Wellington, FL , USA.
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

What error are you receiving? From you posts, it looks like you are creating multiple applications in IIS, correct?

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
  #8 (permalink)  
Old November 7th, 2006, 12:31 AM
Registered User
 
Join Date: Nov 2006
Location: Pune, Maharshtra, India.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Scott,

Yes I have one application which is sample from microsoft. Another application is the one I am creating. If I browse the .svc file of sample I am getting proper service description but if I browse the .svc file of the one which I created then I am getting text displayed from .svc file. Sometimes if I browse to that .svc file then I get "Server Application Unavailable" errror.

Regards,
Chandrak
  #9 (permalink)  
Old November 9th, 2006, 02:27 PM
SQLScott's Avatar
Wrox Author
 
Join Date: Dec 2004
Location: Wellington, FL , USA.
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts
Default

How did you create your application? Meaning, how did you create teh IIS application? You are missing some configuation that tells your application that it is a WCF service application. I would suggest looking at the differences between the Microsoft setup and your setup.

In fact, you had to run a command file, if I am not mistaken, to propertly set up the Microsoft sample. There is probably some step in the command file that you have not done on our setup.

Scott Klein
Author - Professional SQL Server 2005 XML
http://www.wrox.com/WileyCDA/WroxTit...764597922.html
 


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
map .svc file type to aspnet_isapi.dll Bob Bedell ASP.NET 3.5 Professionals 1 November 30th, 2008 11:51 PM
Grouping plain text into paragraphs igraham XSLT 4 July 16th, 2007 01:10 PM
Changing between bold and plain text in a text box funkybuddha Access 2 January 3rd, 2006 10:15 AM
text/plain forces download pgtips Classic ASP Basics 1 September 12th, 2003 05:33 AM



All times are GMT -4. The time now is 04:03 PM.


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