Asp.Net: invoke WCF method with WCF Test Client

by Pieter Brinkman 20. August 2009 02:53

When deploying a Silverlight application we ran into problems a WCF web-service, to find out what the problem was I wanted to invoke the method.

Microsoft shipped an application for invoking methods from your Windows PC (WCFtestclient.exe). The following steps explain how to use WCFtestclient.exe.

First startup Visual Studio 2008 Command Prompt. In the command prompt type wcftestclient, the application will startup.

Now we need to add the Service. Click File and Add Service.

 Add Service to wcftestclient


Add the URL to your service in the pop-up and pres ok. The service will now add all methods from your service. You can add multiple service URLs.

Double click the method you want to invoke from the tree on the left pane. Enter the values that are required for the Invoke and press Invoke. The method will be invoked.

Invoke WCF method


The right bottom pane will show the response. In my case this shows the Stack-trace because of the error. Normally this will show the web-service response (XML).

With the stack-trace I could located the error and fix it.

Hope this helps,

Pieter

 

Tags: , ,

ASP.Net | Microsoft | Silverlight | Visual Studio

Silverlight: Debugging Silverlight (Attach to proces)

by Pieter Brinkman 17. February 2009 06:27

When attaching to a process for debug Silverligh you need to remember that Silverlight is Client-side code. So attach to IExplorer.exe, FireFox.exe or what ever browser your using.

Cheers,
Pieter

Tags: ,

Silverlight

Silverlight Crossdomain file

by Pieter Brinkman 4. December 2008 05:26

An example of a clientaccesspolicy.xml

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
  <cross-domain-access>
    <policy>
      <allow-from http-request-headers="*">
        <domain uri="*"/>
      </allow-from>
      <grant-to>
        <resource path="/" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

An example of a crossdomain.xml

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
  <allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>


For more info you can read this weblog post.

Tags: , ,

Silverlight: Add .xap as MIME Type to IIS

by Pieter Brinkman 2. December 2008 09:01

When I tried to run a my Silverlight App on IIS7 I got the following error:

Microsoft JScript runtime error: Sys.InvalidOperationException: InitializeError error #2104 in control 'Xaml1': Could not download the Silverlight application. Check web server settings


The solution for this problem is adding .XAP file extension to your IIS MIME Types. The MIME type is application/x-silverlight-app.

If you don't know what a MIME Type is read this post.

Tags: , , ,

Silverlight

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About Me

My name is Pieter Brinkman I am a .NET Software Engineer for Achmea IT in De Meern, The Netherlands. My interests are mainly web applications created with ASP.NET, MSSQL and Silverlight.

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

RecentComments

Comment RSS

Most comments

club penguin cheats club penguin cheats
4 comments
us United States
Web Design Company Web Design Company
2 comments
Web design Web design
2 comments
gb United Kingdom