Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
programming4us
Windows 7

Visual Basic 2010 : Hosting WCF Services in Internet Information Services & Configuring Services with the Configuration Editor

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
6/18/2011 4:19:19 PM

Hosting WCF Services in Internet Information Services

Host applications for WCF services can be of different kinds. Other than the ASP.NET Development Server, you can host services inside managed applications, Windows services, and Internet Information Services as well. In most cases the need will be to deploy to IIS so we will cover this scenario. To host your WCF service in IIS on your development machine, follow these steps:

1.
Restart Visual Studio 2010 under administrator privileges.

2.
Go to the My Project designer for the WCF service project and select the Web tab.

3.
Check the Use Local IIS Web Server option and specify, if required, a different directory; then rerun the WCF service (see Figure 1).

Figure 1. Setting IIS as the deployment Web server.

Visual Studio will request your permission for creating and configuring a virtual directory on IIS so you just need to accept. When this is done, remember to replace the endpoint address in the client application configuration file with the new service URI. To host a WCF service on a nondevelopment machine, you need to create a directory under the Default Website and link the physical folder to the folder where the .svc file is placed together with the compiled dll service. This is accomplished via the Internet Information Services Manager administrative tools available in the Windows operating system.

Configuring Services with the Configuration Editor

WCF services enable high-level customizations over their configuration. This task can be complex if you consider that there are hundreds of options that you should translate into Xml markup. Fortunately the .NET Framework offers a graphical tool called WCF Service Configuration Editor that you can also launch from the Tools menu in Visual Studio. In this section you see how this tool can be used for enabling tracing for WCF services. Tracing is useful because it enables recording into log file (with .svclog extension) events occurring during the WCF service running time. When launched, open the Web.config file for your service. When ready click the Diagnostics folder on the left and then click the Enable Tracing command under the Tracing title on the right (see Figure 2).

Figure 2. Enabling tracing for WCF services.

By default tracing records messages classified at least as warnings. To modify this behavior simply click the Trace Level link. If you click the ServiceModelTraceListener link you can also specify additional information to be tracked, such as the process ID, the call stack, and the Thread ID. To view the log of recorded information you need to run the Service Trace Viewer tool that is available in the shortcuts folder for Visual Studio in the Windows’ All Programs menu. When the tool is running, open the .svclog file, which usually resides in the service folder. Figure 3 shows an example of log analysis.

Figure 3. The Service Trace Viewer tool in action.

The tool provides tons of information about every event occurring at the service level and is helpful if you encounter any problems.

Other -----------------
- Supporting Mobile Windows 7 Users : Understanding DirectAccess & Using BranchCache
- Microsoft Excel 2010 - Creating and Modifying Charts - Changing Chart Titles
- Microsoft Excel 2010 - Creating and Modifying Charts - Changing Chart Gridlines and Axes
- Microsoft PowerPoint 2010 : Working Together on Office Documents - Working with SharePoint Workspaces
- Microsoft PowerPoint 2010 : Working Together on Office Documents - Collaborating with Documents on Windows Live
- Microsoft Visio 2010 : Starting a New Diagram from a Sample Diagram
- Microsoft Visio 2010 : Creating a New Diagram - Using AutoAdd and AutoDelete
- Microsoft Visio 2010 : Creating a New Diagram - Using AutoConnect and Quick Shapes
- Troubleshooting Remote Access Issues (part 3) - Troubleshooting a VPN Client & A Few Words about Teredo
- Troubleshooting Remote Access Issues (part 2) - Creating a VPN Connection & Add a Certificate
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server