martedì 27 settembre 2011 #

How to use IIS to debug a Service Application WCF on IIS 64Bit

This is as usual a post to avoid forgetting how to set up something you don’t do every day.

When you create a new Webservice using a WCF service application project, the system proposes automatically to debug it on the development webserver. But if you need to test the service from different machines especially if you work in team with somebody who is developing the client, it could be difficult to set up a connection to the development webservice, so it is easier to publish the application on IIS. To do it you need to modify the application configuration:

webapp_service_01

You need to select “Use local IIS Web Server”, confirm or change the project URL and click on Create Virtual Directory.

webapp_service_05

Important!!! After the previous setting, change also the Output Path to the bin\ instead of bin\debug or bin\x86\debug or things won’t work correctly for the .dlls referenced.

If you are working on a 64bit computer and your application is a 32 bit application, like in my case, you need to open the IIS manager.

webapp_service_02

Select the application pool used by the Webservice from the Application Pools list.

webapp_service_03

Click on the Application pool advanced settings.

webapp_service_04

activate the 32 bit applications and restart the Website.

If launching the webservice application you obtain the following screenshot:

webapp_service_06

Your webservice is working correctly you just need a startup page, but using the multiple startup projects from your
Solution > Right click > Properties

webapp_service_07 

You can start both the webservice and a test application where you can add a webreference to your service and debug it.

HTH

Tag di Technorati: ,,,

posted @ martedì 27 settembre 2011 18.00 | Feedback (0)

Copyright © Sabrina C.

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski