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

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Create multiple proxy intances (cliente side)

Posted By:      Posted Date: September 20, 2010    Points: 0   Category :WCF

Hello to all


I want to what is the best way to use a proxy intance of my wcf service.

I have an asp.net app that consume a wcf service. In a page a have 5 DropDownLists that must be filled with data provided by the service. Do I create a a new intance of the proxy for each call to the service (in this case a total of 5 instances), or it will be better, for example, have a session variable with a singleton instance of the proxy? 

I'm using username and password security mode 



Thanks in advance


View Complete Post

More Related Resource Links

How do you create a custom BDC data field that allows for multiple selected values?

I need help creating a custom data field using the BDC column as a base.  We need to allow for multiple selected values instead of just a single one.  I can't find anything on the net which shows how to do this.

Proxy failed to create remote object on the server

Hi, I am using .net remoting for inter-process communication between two processes on the same machine 1.   The first process is one of the Office application: Ecxel /   Word /   PP 2.   The other process is another application that interacts with one of the above. For that it needs office application object. For example: Excel The solution is comprised with 3 projects: Project #1: The remote object is a simple Called RemoteOfficeApplication – that simply wraps the required application object (Word / Excel / PP).   Project #2: The Server is a simple Office add-in, written with a Visual Studio Extensibility -> Shared project. This add-in is instantiated whenever Excel is lunched. This project reference project #1. Code: var channel = new TcpChannel (5003); ChannelServices.RegisterChannel(channel,true ); RemotingConfiguration.RegisterWellKnownServiceType( typeof (RemoteOfficeApplication.RemoteOfficeApplication ), “AppObj”, WellKnownObjectMode .Singleton);   Project #3: The Client is the process that requires the application object. This project also reference project #1. Code:   //Get Remote object proxy object remoteAppObject = Activator.GetObject(typeof(RemoteOfficeApplication.RemoteOfficeApplication), “tcp://localhost:5003/AppObj" ); //Cast the proxy var r

How to create an activity that allows multiple exit paths similar to FlowSwitch and FlowDecision

There have been several threads around this type of request but none have provided a definitive outcome for my requirements:I am looking to emulate the FlowSwitch or FlowDecision in a custom activity so as to simplify end user workflow authoring in a rehosted environment.Currenty I am limited to linking my custom activity to a FlowSwitch or FlowDecision to allow for simple logic to be visually composed. This creates additional complexity that I am trying to avoid.I understand that these are sealed types and even the abstract FlowNode base class of these types does not have any overridable types by design as WF 4.0 favours composition over inheritance.What options do I have to accomplish my objective?If activity composition is the response to my question then could I kindly request that some samples or links to samples are provided?

Create PDF file in server side

Hi,I need to create a .pdf file which can download by client clicking on the link in my web site. That pdf should be generated using stored information in database. It has different types of fonts which has not installed in client machine and only installed in web server. In this case, I'm not interesting to use crystal report or any other third party components that need to register to use and has some limitations.How can I do that using ASP.NET with C#?Thanks.

How to create SharePoint workflow[Visual studio] with Infopath multiple views?

Hi Every body,I have Travel Request infopath form with 3 views(Requester/Manager/Traveldesk).Ones the user submitt the data then workflow will be start. In manager view he will select next level approver also. Ones manager approve/reject then pass to Traveldesk and they will forward travel inforamtion to user.I am new to workflow so How to approach my requirment any ideas and examples.Thanks in advance  

How to create single wsp for multiple projects sharepoint 2010 solution

We have multiple projects (4 projects) in single sharepoint 2010 solution. We want to create single wsp deployment for this. But when I right click on any project, it creates package means wsp on its own. How to create single wsp for multiple projects sharepoint 2010 solution? Is wsp builder which we are using for sharepoint 2007 project (works really great) also works in sharepoint 2010?

What are my options when I need to create a report with data from multiple sources?

Hello all,  What are my options when I want to create a report that will get records from multiple data sources based on data from a parameter? The user will enter the customer ID, I have to check that ID against 5 different data sources. Have you guys done anything similar? Should I leverage SSIS on this request, adding an extra layer of complexity? Should I do this all from SSRS? What are my options?

Cannot create email alerts for multiple users

Hello, I created an email alert for a document in a library. In the "Send Alerts To" box, I added multiple user names separated by semicolons and saved the alert. However, when I open the alert again, only my user name appears and the additional user names are gone. Why is this happening and how do I fix this problem?  Thank you in advance.

Unable to create instance of proxy class in WCF

Hello, I created proxy class using svcutil.exe and added it in App_Webreference folder. I want to access objects and methods from this proxy. But I am unable to create instance of this proxy class. In inellisence, it is not showing this proxy class. What could be the problem ? I am using VS 2008 and Visual Basic.   Thanks in advance.  Amit Lohakare

create multiple columsn based on a passed in variable

Hi, I am clueless as to how the following would be done. Would appreciate imputs: i would be passed in a StartDate and EndDate along with a Period(Week,Month,Quarter,Year).  this would be an INT which is calculated in the following way -- Suppose he selects StartDate = 2010-01-01, EndDate = 2010-02-28, and Period = Weeks ---> Which would mean my resultset would have a additional 9 columns (9 weeks using DateDiff(Week,@startdate,@enddate) The number of fixed columns always will be 4 Total # of records that would always come back is > 10 something like this CategoryTypeId(int),ParentCategory(uniqueidentifier),Id(uniqueidentifier),Name nvarchar(50),Wk1,Wk2.....Wk9 1,xxxx,xxxx,'Shopping',650,300,1275....1000   (i dont't need to total the wk,month,qurter or yearly.This would be taken care on the front end) Thanks!

How to create an activity that allows multiple exit paths similar to FlowSwitch and FlowDecision

Hi, I saw replies about create an multi path activity and it's container and they are guid me alot but i can not setup link between two activities in my container with System.Windows.Shapes.Line . can any one help me . can any one send me a sample code please . thanks

Create Multiple datafields in a Web Service

I have been working on this for awhile.  What I am trying to do is to retrieve the telephonenumber, mail and physicalDeliveryOfficeName from active directory  I have debugged it and it seems to work but when I connect to the data source in Infopath, there is no value.  Also, the data source has a group field called "choice."  I have no idea what that is.  I am using a contact select to fill out and the value of the AccountId will populate another field.  I use this field to choose the LoginName on the query and then run the query on the data source.  This should pupulate the email, phone, and location fields on the main data source.  Here is a sample of my code: Imports System.Web.Services Imports System.Web.Services.Protocols Imports System.ComponentModel Imports System.Net Imports Microsoft.sharepoint Imports Microsoft.SharePoint.WebControls Imports System.DirectoryServices Imports System.Data ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. ' <System.Web.Script.Services.ScriptService()> _ <System.Web.Services.WebService(Namespace:="http://microsoft.com/webservices/")> _ <System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _ <ToolboxItem(False)> _ Public Class GetADProperty     Inherits System

Is it possible to create attribute relationship across multiple dimensions?

In other data warehouse tools such as Microstrategy, you can create attribute relationship between different dimensions easily. For example, I can define a joint-child relationship(Attr1 from Dim1, Attr2 from Dim2) decide Attr3 from Dim3. In another word, if it is in a natrual hierarchy, it is                                   Attr3                                      |                             (Attr1, Attr2) If we can build such kind of relationship, first Attr3(dim3) is not necessary to appear in fact table. Second, if query without fact data, you can simple pull out Attr1, Attr2 and Attr3 relationship. Is it possible to make such kind of relationship in SSAS? If not, I think put Dim3 in fact table should be an alternative way to relate Attr1, Attr2 and Attr3.    

How to create a new Html control which contain multiple html control ?


Hi all,

I am realizing a table with multiple rows for a Sharepoint webpart.

In this project, I would like to have a new html control which contain a LinkHtml in one column and another label in another column.

Essentially this html control would be a row used for my html table.

At the moment i am doing a row like this in the main class :

HtmlTableRow Row = new HtmlTableRow();

            //create colum 1
            HtmlTableCell _Column11 = new HtmlTableCell();
            _Column11.Style.Add(HtmlTextWriterStyle.Width, linkColumnWidth);

            // Create the input textbox
            Label _LinkButton = new Label();
            //_LinkButton.ID = claimsLinkButtonID + contentLabel;
            //_LinkButton.CommandName = IdTask;
            _LinkButton.Text = contentLink;
            //_LinkButton.Style = 

            Label _NumberOfMessagesLabel = new Label();
            _NumberOfMessagesLabel.Text = contentLabel;

            //add the textbox into column 1

            //add column 1 into row 1

            //create column 2
            HtmlTableCell _Column12 = new HtmlTableCell();
            _Column12.Style.Add(HtmlTextWriterStyle.Width, priorityColumnWidth);

            // add the label into colu

How to create a View to return all multiple child fields in one record?


I have an application where the users can define up to 5 extra fields for a particular table (e.g. tblMaster). The custom data is all held in one table (e.g. tblCustom) so there could be up to 5 records in tblCustom for each tblMaster record. In my application I build a select statement based on the number of custom fields so that I can get a single row of data for each tblMaster record (sample below). I am now adding new features to the application and I want to expose an SQL View to the users for a report writer that will achieve the same result but still cater for the variable number of custom fields. I realise this needs to use probably a RIGHT OUTER JOIN so that NULL is returned if there is no matching field but I can't work it out. If I had five separate files it would be easy as each one would be a RIGHT OUTER JOIN for each. I could build 6 views (e.g. with no custom fields, with one custom field, with two custom fields etc) but that is not very efficient. I don't particulaly want to restructure the database as there would be a lot of work and retesting.
Any help would be very welcome!

SELECT tblProcess.ProcessNumber, tblProcess.Process, tblProcess.Risk, tblProcess.MRR, tblProcess.Version, tblProcess.LastChange, tblProcess.SecurityLevel, 

How to create wsdl proxy of web service with out event handler for .net compact framework 4


Hi All

i have one problem while access web service axis 1.4 in compact frame work

Create web service object using client

 MIScreenSoapClient ser = new MIScreenSoapClient();

create event handler for method to access web service

ser.GetLoginRequestCompleted += new EventHandler<GetLoginRequestCompletedEventArgs>(proxy_getloginrequest);
    ser.GetLoginRequestAsync(strLogin, strPass, Program.VersionNumber, "WM1", "test", "WP7");

Event Handle for method

 void proxy_getloginrequest(object sender, GetLoginRequestCompletedEventArgs e)
   string eee = e.Result;
is there any way to access webservice without call event handler?
Please help me


Can a single form create multiple entrys in a custom Sharepoint list



I want to have a form where the user can specify how many items she wants to create for a custom sharepoint list? When submitting the form, that will start creation of X number of new items in a custom Sharepoint list.

Is this doable with forms?



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