WCF / ASMX :: Strategy Required : Different Binding For Different Contracts?

Dec 23, 2010

I am developing a clickonce application that talks to the server via WCF. So far it works fine with a WCF service that uses wsHttpBinding to talk to the server.Here's what works so far: -

1. I have a WCF web site named "TotemWCF" that runs on an SBS 2003 server (=IIS V6).

2. The service.svc for this is

<%@ ServiceHost Language="VB" Debug="true" Service="Service" CodeBehind="~/App_Code/Service.vb" %>

3. There is a contract: IService.vb, containing several contracts like

<OperationContract()> _
Function NTVSearch() As totem.NTViewDataTable[code]......

In initial testing I used this for ALL communication, but it seems to me that it's a bad idea to use streaming for simple "Get a value from the database" communication and it seems to be introducing errors into my program. So my question is: - "What is the best way of managing this, so that Function1 goes via one binding, and Function 2 goes via another binding. Do I create separate services at the level of the web site, the contract, the service, or the function?

View 3 Replies


Similar Messages:

WCF / ASMX :: Use Optional Parameterss In C# While Defining Service Contracts?

Oct 1, 2010

I mean can I do something like this:

[Code]....

and then implement it the same way as below

List<String> GetEmployees(String EmployeeId, String DepartmentID= "00")
{
}

I tried this, but it didn't work. Its always expecting DepartmentID when I tried to use invoke 'GetEmployees' using service reference.

View 7 Replies

Web Forms :: Binding Required Field Validator To Only Single Button?

Jun 12, 2010

i have two button in form i want to bind required field validator to only one button, bcaz it invoke in both button.

View 3 Replies

WCF / ASMX :: How To Automatically Switch Binding

Aug 13, 2010

I have a wcf service which is running on IIS7 using WsHttpBinding but further requirement I need to create another end point using NetTCPBinding.And I want to host my wcf service like if my client application in intranet it will use NetTcpBinding or if it is in internet then it will use WSHttpBinding.

View 3 Replies

ASMX :: Using WCF To Binding To A Remote WebSphere MQ?

Jan 11, 2011

I am new to WCF, I have read where you can Bind to a MSMQ, my question is can you also bind to a remote queue running on a Unix box? If this is possible, how would you define your endpoint (address,bining) and what Binding type and binding configuration do you need to use?

using .NET 3.5, IBM WebSphere MQ on unix the QManager is running v6.0.

View 1 Replies

WCF / ASMX :: Kerberos Authentication Custom Binding?

Sep 15, 2010

I am using Kerberos as the Authentication mode for a WCF Client to interact with an ASMX Web Service. I am using customBinding in the WCF Client. I am getting the below mentioned Fault Exception when I invoke the HelloWorld Method by creating a Proxy using SVCUTIL.

`System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.ApplicationException: WSE841: An error occured processing an outgoing fault response. ---> System.Web.Services.Protocols.SoapException:

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.InvalidOperationException: WSE914: This instance of derived key token does not support encryption, decryption, or key wrapping. It can only be used to sign or verify signature. Please make sure that the length of the derived key matches the length of the key required by the symmetric encryption algorithm configured for the derived key token manager.

at Microsoft.Web.Services3.Security.Tokens.DerivedKeyToken.Psha1SymmetricKeyAlgorithm.get_EncryptionFormatter()
at Microsoft.Web.Services3.Security.EncryptedData.ResolveDecryptionKey(String algorithmUri, KeyInfo keyInfo)
at Microsoft.Web.Services3.Security.EncryptedData.Decrypt(XmlElement encryptedElement)

I am badly struck with this exception and unable to progress further.

View 2 Replies

WCF / ASMX :: Error While Adding Pollingduplex Binding?

Aug 20, 2010

I am making samle of polling duplex in .net 4.0

when ever i put binding this tag in web.config it shows error.

<bindings>
<pollingDuplexHttpBinding/>
</bindings>

Warning 1 The element 'bindings' has invalid child element 'pollingDuplexHttpBinding'. List of possible elements expected: 'basicHttpBinding, customBinding, msmqIntegrationBinding, netPeerTcpBinding, netMsmqBinding, netNamedPipeBinding, netTcpBinding,
wsFederationHttpBinding, ws2007FederationHttpBinding, wsHttpBinding, ws2007HttpBinding, wsDualHttpBinding, netTcpContextBinding, wsHttpContextBinding, basicHttpContextBinding, mexHttpBinding, mexHttpsBinding, mexNamedPipeBinding, mexTcpBinding, webHttpBinding'.
D:DuplexTestTestPollingDuplexWcfTestPollingDuplexWcfTestPollingDuplexWcfWeb.config 9 8 TestPollingDuplexWcf

View 3 Replies

WCF / ASMX :: Want To Use Https, Endpoint Binding Doesnt Work

Sep 3, 2010

I am very new to WCF, I have read a lot and seen several presentations about it. I can get the basicHttp endpoint to work on my server but when i wanted to use https, I found that that endpoint binding doesnt work. I think through my research that the wsHttp binding is what i need. I can get the client to work but the service gives me a few different errors when I try to call the ssl endpoint.

Currently i get the following error:

The requested service, 'https://devwcftestsite.crata.ucf.edu/services/Person.svc/Person' could not be activated. See the server's diagnostic trace logs for more information.

Below I have included the web.config for my service project which is hosted at:https://devwcftestsite.crata.ucf.edu/services the service is called:Person.svc

[Code]....

View 2 Replies

WCF / ASMX :: How To Provide Security / Cleared All The Binding,Endpoint,Contract Concepts

Aug 10, 2010

How I provide Security In wcf . I have Cleared All the binding,Endpoint,Contract Concepts.

View 4 Replies

WCF / ASMX :: Unable To Import Binding 'CalcualteBinding' From Namespace 'http://Calcualte?

Feb 16, 2010

I am developing web application using csharp on Visual studio 2008. Now I want to use a web service which was developed in Java. I am able to add the web service to my application as a refrence but when I want to build or compile I am getting the following Unable to import binding 'CalcualteBinding' from namespace 'http://Calcualte.webservices.CourseZa.org'. .

View 2 Replies

.net Calling Sp And Performance Strategy?

Apr 5, 2010

I find my self in a situation where I have to choose between either creating a new sp in database and create the middle layer code. so loose some precious development time. also the procedure is likely to contain some joins.Or use two already existing sp(s), the problem of this approach is that I am doing two round trips to database. which can be poor performance especially if I have database in another server.

View 3 Replies

C# Vs VB And Generally Code Strategy?

Apr 5, 2010

web design has been hobby of mine for many years now but I am new to ASP.NET. My program language of choice is C# even though Im not very skilled in it.Even though I wish to use C# it seems to me that maybe VB would be of better choice because most of the videos from asp.net use VB primarily even though C# code is availible. So really, would it be better to start with VB even though deep down (I dont know why) I wish to learn C#? Also, I'm struggling with how best to learn it. I get confused when watching the videos (even in the fundamentals section) when it comes to code behind writting.

View 7 Replies

Website Build And Release Strategy?

Mar 10, 2010

We have an ASP.Net MVC solution built in VS2008 and TFS2008. We use TFS Build and use Continuous Integration.We have a deployment pipeline that enables us to progress a build, eventually, to our live site...

Internal Dev (immediate deployment following a build)
External Dev (used by internal testers to make sure it works on the production server)
External Test (used by our client to test themselves)
Live (self explanatory).

I have 2 questions relating to thisWhich ones of these should be built in Debug and which in Release?How should I write my TFSBuild.proj files to cope with this strategy?

View 1 Replies

Strategy For Sharing Project Dependencies / Resources?

Sep 20, 2010

I work in a small developing team with 3 developers and none of us are really 'uber elite programmers' but we get by pretty well for our company. One thing that has been constantly recurring is we keep using the same resources in multiple projects. One example being the fckeditor control, however it stinks to constantly add this folder to every project (I've got the control set-up in my toolbox, but it won't be able to find the code unless you have the folder in there). This also applies with constantly recurring master pages and controls. Now we have made some steps for improving this, including making a 'back end' project where we put our shared functions, and made a CDN for images and scripts. But I still run into issues. For instance all developers must make sure they have the latest version of the back end project checked out, and built. Also when you add a reference to that .dll, the paths have to be the same between developers, otherwise it breaks the reference.

Now I just found out you can add a project reference, which will make the back end project build anytime I build the front-end project, but again you still have to make sure you have the latest version checked out. But I wonder what else I could do? Things I find annoying are making sure the relative locations of the back end project to the front end project has to be the same, and making sure they have the latest version of the back end checked out. Are there better ways to do this?Also the back-end project is a class library, but how can I share resources like a user control? I tried putting a user control in a normal project, and then adding that project as a reference, but it doesn't give you access to the control in the file list like I am used to for dragging into a page.

View 2 Replies

Strategy For Handling Variable Time Queries?

Apr 4, 2011

I have a typical scenario that I'm struggling with from a performance standpoint. The user selects a value from a dropdown and clicks a button. A stored procedure takes that value as an input parameter, executes, and returns the results to a grid. For just one of the values ('All'), the query runs for roughly 2.5 minutes. For the rest of the values the query runs less than 1ms.

Obviously, having the user wait for 2.5 minutes just isn't going to fly. So, what are some typical strategies to handle this? Some of my own thoughts:New table that stores the information for the 'All' value and is generated nightlyCache the data on the caching server

View 2 Replies

Manipulating HTTP Response - Strategy According To Parameters Feasibility

Jan 5, 2011

my current question is tightly related to this one, but is far more specific. We have to plan a design strategy for the objective described in that question. We want to do this by rewriting HTML on ASP.NET web forms. My question is: which strategy is the best according to parameters of feasibility, performance impact and implementation effort on legacy applications.

what I have to do is to basically get the HTML output of a Web Form, parse it, and replace certain URLs according to user-defined rules. In that example, I would rewrite all static content to CDN URLs, but it can be easily extended to URL rewriting techniques. I found lots (and I really mean lots) of articles about URL rewriting from the perspective of having URLs like [URL]interpreted as [URL] but I found none showing me how to smartly format old-style URLs to shorter format right from inside HTML (so the page will render the short-form URL directly) [edit] without deep code intervention.

Strategy 1

Like suggested in an answer of the above question, write an HTTP Module that intercepts the HTML and rewrites it. Actually, I looked around and saw I can set a Response.Filter stream object that performs the HTML filtering.

Pros:
I can inject the HTTP Module on a legacy application, configure rewriting rules via XML and have the oldest CRM/ecommerce application load static content from a CDN without touching its code at all.

Cons:
I suspected that (and a comment here confirms my suspects) having to reimplement a Stream's Write method, which operates on a partial buffer in the general case, can result in bad replacements. Suppose the Write method is first called with a chunk like [URL] (where I assume <img src="h was already written before) and later ge.png" /> (so guess the final URL :-P) with a rewrite rule that regexes [URL][^"]* into [URL] the substitution is not done. To workaround that, I could use a MemoryStream or something like that to buffer the complete set of data and then perform the substitutions, but it could cause troubles on highly loaded servers

Strategy 2

Overriding Page's Render method in a way such as described here

Pros:
doesn't suffer the chunking problem

Cons:
requires defining a base class for all pages. Feasible on new applications, not sure for maintaining legacy applications. Seems has a problem as you cannot instantiate HttpTextWriter directly Obviously, for the new webapps we'll have to develop, I would adopt strategy 2, but I really like using dynamic components a lot, as they can be plugged with ease when application requires them (so if our new app will be installed without a CDN the feature is turned off).

Briefly, my questions are How would you fix both strategies' cons (particularly 1st)? And, of course, do you have other strategies to suggest to achieve this objective?

View 1 Replies

Strategy For Making A Mobile Version Of A EPiServer Site?

Feb 16, 2011

I am about to a client develop a mobile version of their EPiServer site. The mobile version should have different functionality than the regular but some content might be shared so that it won't have be maintained twice.

I'm thinking about using jQuery Mobile as the user interface system to reach as many users as possible with the same solution and possibly 51degrees.mobi for best detection of mobile devices.

Does anyone have any experience in how to do this with EPiServer? How to structure? I'm thinking of using a sub-node (/mobile) that gets hidden on the regular site but I'm not sure it's the best solution.

View 1 Replies

Implement The Locking And Unlocking Strategy In Login Page?

Apr 30, 2010

I want to make a User login Form, in which account get lock if number of attempts gets exceed by three.

How can i implement the locking and unlocking strategy in login page?

View 2 Replies

Security :: Strategy For Multiple People To Edit Different Records On One Page?

Feb 24, 2010

I've been developing a database system that stores test results from two different machines. (It's a foundry, each machine tests for the amounts of a collection of elements in a piece of metal. One machine does the tests on iron, the second on aluminium. Both produce the same list, but each machine will have much more of some elements than others.)

I used folder security to limit who has access to what folders, so there is a general page for anyone to view results from any machine in the root, one folder has a page to allow people in a particular group to edit/correct the iron results, and a second folder has a page to allow another group of people to edit/correct the aluminium results. Now, we've picked up a third machine which tests aluminium samples too, and it belongs to a third group of people. What is the best or recommended method to allow this third group to edit samples from the third machine only?

1) Should I have a third folder, and copy in the page from the other aluminium folder, and tweak it so it only shows and allows edits to results from this new machine? This seems like the quickest, easiest method, but a waste of effort as it's mostly duplication of existing work.

2) The other option I see is to keep one aluminium editing page, but to limit the results that are shown to the ones that the current user should be allowed to see. (One page which shows one group of people one half of the results, and shows a second group of people the other half of the results). Is there a way to achieve this that is almost as easy as using folder-based permissions?

3) Is there another way that I'm missing?

View 2 Replies

WCF / ASMX :: WCF Service "No Protocol Binding Matches The Given Address" Error

Dec 13, 2010

I am recieving the following error when I try to browse to "http://10.28.2.246/SQLDataService.svc" yet it works fine at "http://localhost/SQLDataService.svc".

Server Error in '/' Application.

No protocol binding matches the given address 'http://10.28.2.246/SQLDataService.svc'. Protocol bindings are configured at the Site level in IIS or WAS configuration.

Description:

An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: No protocol binding matches the given address 'http://10.28.2.246/SQLDataService.svc'. Protocol bindings are configured at the Site level in IIS or WAS configuration.

Source Error:

[Code]....

Stack Trace:

[Code]....

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

Am I correct in my belief that this is caused by the Web.config file?

[Code]....

View 6 Replies

Configuration :: Error Handling Strategy For Exceptions Causing Page Request Fail?

Nov 1, 2010

I have been tasked with implementing a strategy to catch all errors in an ASP.net application which cause a user request or interaction to crash and then e-mailk this exception to a support team in advance of a user calling about the error.Some errors however are not causing the page to crash or be redirected to the custom error page but these are being emailed to the support team instead of simply being loggedMy requirement is to seperate what exception types will cause a page fail and which will not.Example I am currently receiving a System.Web.HttpUnHandledException which is not causing any page to fall over and therefore is not of relevance to the support team. this can be logged but does not require emailing.

View 1 Replies

Data Access Strategy For Single Stored Procedure Retuning Multiple Recordsets In Webpage?

Sep 18, 2010

what is the recommended data access strategy for the following environment: single stored procedure, many parameters, asp.net 4.0, sql server 2008, and the stored proc returns 11 different recordsets, all of which get displayed in various different elements too complex and specific to be handled by server controls.

View 1 Replies

WCF / ASMX :: Content Type Text / Html Of The Response Message Does Not Match The Content Type Of The Binding

May 7, 2010

I'm getting this message when going to a web app that accesses my service.

"The content type text/html of the response message does not match the content type of the binding (text/xml; charset=utf-8)..."

The thing is, it happens once in a while even when no changes have been made to the service or the web app. And I can make it go away most of the time by going directly to the .svc?wsdl page in my browser and then coming back to the web app.

View 2 Replies

C# - What's The Difference Between Binding Data To The Repeater In The Mark-up Or Binding It Programatically

Mar 4, 2011

What's the difference between binding for example a column called ("Name") in both cases ? and is there's any performance difference ?1- Assigning the data in the mark-up

<asp:Label ID="Name_Lbl" runat="server" Text='<%# Eval("Name") %>' ></asp:Label>

2- defining a control object for every control inside the repeater ItemTemplate and find it and then assign the data in the column "Name" to ite.Item.FindControl("Name_Lbl")

View 2 Replies

Difference Between Static Binding And Dynamic Binding?

Dec 17, 2010

May I know what is the diffrence between static binding and dynamic binding and which binding is used in

1)Virtual Functions

2)Abstract Class

3)Function Overloading

4)Operator Overloading

5)Fuction Overriding

6)Delegates

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved