.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
ASPEvil
david stephan
Santhakumar Munuswamy
Fauzul Azmi
Post New Web Links

WCF proxy generation encapsulates original method using MessageContracts

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :WCF
 
I am having an issue generating the client proxy for a set of WCF services. I am sending a MessageContract as a parameter to the service and returning a MessageContract. The generated proxy has the resulting method as private and generates another public method that accepts all the properties of the message as individual parameters, then assembles the MessageContract, and calls the private method. I can’t seem to figure out how to get it to generate a proxy with original signature for the method.   My message contracts are thus:      [MessageContract(IsWrapped=false)]    public class FlashFileMessage    {       [MessageHeader]       public string Filename { get; set; }         [MessageHeader]       public long FileSize { get; set; }         [MessageBodyMember]       public Stream Data { get; set; }    }      [MessageContract(IsWrapped=false)]    public class TransferFileToInstrumentResponse    {       [MessageHeader]       public bool Success { get; set; }         [MessageBodyMember]       public string Message { get; set; } &n


View Complete Post


More Related Resource Links

Need help in Webservices.How to make external Web Services method call in case of proxy in Asp.net 2

  

How to make external Web Services method call in case of proxy in Asp.net 2.0? 

 

The scenario is I have webservice Client dll.Now when  i Invoke the One of the Method in Client.dll,its not sending the request to server bcz the system is blocked with Proxy settings.I need to know call this method by bypassing the Proxy settings.

@Note:The client.dll is in different location.we are trying to contact the server with this dll.but its not contacting

pls help .its deeply appreciated .

 

Thanks

 

 


Http proxy for SSL using relay method on chunked transfer

  

hi,

 

I'm working on a proxy application; everything works find but ssl connections. here is what i'm doing and the problem description:

The proxy detects Connect request from browser and starts to relay ssl traffic to an external server and then receives the answer then sends the response directly to browser:

The request: Browser Ssl request <--> proxy application <--> external proxy server <--> remote website

I could implement ssl data relay (without touching any byte of it), but it only works for images and a few html pages.

I've checked the transferred data with Wireshark and Fiddler, they reports that all the traffic is sent ok and the data size was ok. But browser only displays direct request to images. (e.g: https://a.fsdn.com/sf/images/develop/logo.png)

 

Here is my guess about the issue:

I'm buffering all response/request traffic, when buffering is done the app sends it to proxy server/browser. After one full day investigation i realized that the browser only receives the very first part of request for html pages. In my opinion it receives only first chunk of response (but the response in not sent in chunks!) this is what i guess though!

I'm using TcpListener for both Proxy App and Proxy Server.

Please help me through this; what should I do ? :(

Many

proxy generation from nettcpbinding

  

HI,

How can i generate proxy for a servie with nettcpbiding.

when i try to add service referene to my service which only have nettcpbinding, it fails with message "metadata contains a reference that can't be resolved. There was no endpoint listening at that could accept the message".

My service config has

<endpoint address="mex" binding="netTcpBinding" contract="IMetadataExchange" bindingConfiguration="mexTcp" />
<netTcpBinding>
&nb

Abort() method of wcf client proxy doesn't release session after catching FaultException

  

Hello,

I have created a simple wcf service hosted in IIS and wcf client and figured out that when u catch a FaultException from the wcf service and then call client.Abort() to release the session (as the microsoft samples said) it doesn't release the session and hangs up on the 11th call.

Here is example:

Wcf Service:

[ServiceContract]   
public interface IService1 
{ 
    [OperationContract] 
    string GetData(int value); 
} 
 
 
public class Service1 : <

Abort() method of wcf client proxy doesn't release session after catching FaultException

  

Hello,

I have created a simple wcf service hosted in IIS and wcf client and figured out that when u catch a FaultException from the wcf service and then call client.Abort() to release the session (as the microsoft samples said) it doesn't release the session and hangs up on the 11th call.

Here is example:

Wcf Service:

[ServiceContract]   
public interface IService1 
{ 
    [OperationContract] 
    string GetData(int value); 
} 
 
 
public class Service1 : <

Generation of proxy class using svcutil

  

Hello All,

I created a simple host application for hosting a class of mine. I have created endpoint, address binding and contract.

I am able to use svcutil to generate a proxy class. I am able to connect to the host application from my client, when both are put up onthe same machine. But when I try to host the application on my PC and try to obtain proxy class by running svcutil on someo ther machine, I am not able to generate the .cs and .config file.


Can u pls help.. as to what setting i have to change in order to generate the config file on the other machine.

Thanks
Sandeep

 

Error Message - The document at the url ________ (request URL) was not recognized as a known document type.

-Report from the url __________ is ' The document format is not recognised ( the content type is text/htmll charset  = utf-8)

- Report from Disco Document = there was an error downloading ____ url ? disco


Thinking about new C# method prototypes: object as dictionary

  
I recently had to write a small Flickr API. I know many .Net API for Flickr already exist but I needed one for a Silverlight application. Whatever, it's only about building some querystrings so I did it by myself. It's been an opportunity to think again about a classical question: how to pass parameters to a method ?

Imagine you have a generic method to call some Flickr functions.

Visual Studio Add-In for Web Parts Generation

  
This article will introduce you to a new Visual Studio 2005/2008 add-in that can be used for Web Parts generation based on a prepared ASCX control/template. The add-in should allow Web Part developers to easily make Web Parts using the Visual Studio HTML designer. It should save you a lot of time and make Web Part development an enjoying experience even for beginners.

This article is written in the form of a step-by-step tutorial. It will give beginners a chance to successfully make, deploy, and try their first Web Parts, and will save some time for advanced users as you can always run into challenges when working with SharePoint.

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:

  

 Hello...

Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

[WebMethod]
        public static string aaa(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

        [WebMethod]
        public static string aaa1(int i)
        {
            Thread.Sleep(1000);
            return i.ToString();
        }

 

 

<div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        </asp:ScriptManager>
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method

  

 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

deploying to msdeploy does not support a proxy server

  

I am trying to deploy through webmatrix but my system Proxy server configuration is not being used. I assume that webmatrix would detect the proxy server settings and use that for the msdeploy calls under the hood. Can anyone confirm this is a know issue? 


Using CreateNewUserWizard SendingMail method to email me, not applicatnt.

  

I have staff area of my site I am protecting with forms authentication using c# and .Net 4.0. What I want to do is let the staff members register on the site but instead of the confermation email being sent to them I want it sent to me so I can go in and approve it. I have been trying to use the SendingMail method  but can not figure out how to get it to email me instead of the person that registered. I have searched around this site and find many topics on the SendingMail method but none seem to properly address my issue. Can anyone help me out?


statement cannot appear outside of a method body

  

hi all,

  i am posting my vb.net problem .plz tell me how to resolve this :-


Dim conn As String = ConfigurationManager.ConnectionStrings("NorthwindConnectionString").ConnectionString
    'Dim mysqlconnection As New SqlConnection(conn)
    'If mysqlconnection.State=ConnectionState.closed Then mysqlconnection.Open();
    'Dim mySqlcommand As New SqlCommand("select CategoryId,CategoryName from Categories", mysqlconnection)
    'Dim mySqlDataAdapter As New SqlDataAdapter(mySqlcommand)
    'Dim mydataSet As New DataSet()
    'mySqlDataAdapter.Fill(mydataSet);

    'Gridview1.DataSource=ds;
    'Gridview1.DataBind();
    'if mysqlconnection.State=ConnectionState.closed Then mysqlconnection.Open();

i m getting 5 errors in this code

declaration expected in mySqlDataAdapter.Fill method; Gridview1.DataSource=ds; Gridview1.DataBind();


Question in Get method in C#

  

I got a recent working code from client.I see errors in the get methods when i compile , below are some place where the error happens.Can any one help me out?

System.Environment.get_NewLine()

Error 2 'System.Environment.NewLine.get': cannot explicitly call operator or accessor C:\Documents and Settings\shankar\My Documents\Visual Studio 2008\Projects\DKCLwin\DKCLwin\LocalizationAdmin.cs 150 170 DKCLwin

Error 2 'System.Environment.NewLine.get': cannot explicitly call operator or accessor C:\Documents and Settings\shankar\My Documents\Visual Studio 2008\Projects\DKCLwin\DKCLwin\LocalizationAdmin.cs 150 170

UI Frontiers: Sound Generation in WPF Applications

  

A good case could be made that computers should not make noise except in response to a specific user command. We're going to ignore that and show you how to play custom sounds in a WPF application.

Charles Petzold

MSDN Magazine February 2010


Generation Test: Automated Unit Tests for Legacy Code with Pex

  

Creating and maintaining a unit test suite for legacy code can be a challenge. Pex automatically produces a small test suite with high code and assertion coverage.

Nikhil Sachdeva

MSDN Magazine December 2009


C++: An Inside Look At The Next Generation Of Visual C++

  

The next version of Visual Studio (code-named "Orcas") will help C++ developers take full advantage of the new capabilities in Windows Vista.

Tarek Madkour

MSDN Magazine June 2007


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend