0

We will open Visual stdio command prompt 2010 (svcutil.exe) tool for create client proxy and auto generated code will create by this tool.

svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config localhost:8000/...

The same process will do programmatically using System.CodeDom.Compiler.CodeGenerator namespace to create auto generate proxy code without open svcutil.exe tool in new window.

I need, How to do it using slsvcutil.exe tool for silverlight 4.0 applications programmatically?. How to create auto generate proxy code using C# source code for slsvcutil.exe tool without open the VS command prompt in new? I need C# source code this.

We can execute this tool as process using System.Diagnostics.Process namespace, but this is we can apply only in windows authentication or set username and password. This is not a convenient way to the customers to set credentials.

Is there any alternative solution for this to create client proxy programmatically using slsvcutil tool? Is it possible to change the svcutil proxy code to silverlight slsvcutil proxy code? What namespace in silverlight 4.0 to download service meta documents?

Euphoric
  • 12,645
  • 1
  • 30
  • 44

1 Answers1

0

The key point of proxy generation by svcutil is to use the generated code for creation of service contract and strong type-checking. This is of course not needed when you are creating proxy at runtime.

To create proxy at runtime, you need to know beforehand the contract. Then you can use standard WCF feature to create a proxy class with this contract.

Euphoric
  • 12,645
  • 1
  • 30
  • 44
  • Yeah, I know well about the create a proxy class using standard WCF and proxy generation by svcutil. I need, proxy generation by slsvcutil for silverlight application at runtime. – PRABAKAR G GOVIND Jul 20 '12 at 14:48