.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

WCF DataService - Global Parameters

Posted By:      Posted Date: August 23, 2010    Points: 0   Category :ASP.Net

Greetings.  I am searching for a way to provide a couple "global" parameters to my WCF DataService.

What I would like to be able to do is set a couple properties on the server which will be held onto by the server for future queries by the client. 

For example, it would be great when I create my client if in the constructor I can just say: 

MyDataService service = new MyDataService("http://somurl/myservice.svc?param1=value1¶m2=value2


 I can then use param1 and param2 when a client calls my service and use QueryInterceptors to provide filters to the queries.  I want to avoid having to write custom WebGet methods.

If there is a way to accomplish this; great!

If there is a way to accomplish this with just 1 call; even better!

View Complete Post

More Related Resource Links

Linq: how to share parameters between lambda expressions ?

When using Linq to objects, you will quickly feel the need to pass some parameters from a method to another but it's not so easy because each Linq method is not calling the following one. In a Linq sequence, each method is using the result computed by the previous one. So, local contexts are not visible from one method to another.
The compiler is using two technical different ways to let parameters go out of a method.

Global Exception Handling with ASP.NET

After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

How to Encrypt Query String Parameters in ASP.NET

Encrypt Query String Parameters in ASP.NET.u can send secure data one page another page u can also use query string to encrypt

view state vs request parameters


If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


FormView -- Parameters and asp:Table


I've already solved this problem to my satisfaction, I just want to know WHY it works this way.

I have a FormView control bound to an ObjectDataSource.  Let's say our data source is a hypothetical table with three columns:  id, name, age.  Why is it that when I use the <asp:Table> element inside of the FormView, the parameter values are not set, but when I use the standard <table> tag, it works fine?

This seems like a .NET problem to me.  I expect the <asp:Table> element to work in the same way as <table> because they are, for all intents and purposes, the same thing.  Am I missing something?

linqdatasource parameters question



I'm currently getting to know the linqdatasource control. What would happen if several WHERE parameters are added to the linqdatasource control declaritively in the aspx page but no WHERE clause is defined? 

1. is there any issue with setting up multiple WHERE parameters in the aspx markup for linqdatasource but then deciding which ones actually get used at runtime by setting the actual WHERE clause at run time? Would the unused parameters simply be ignored and cause no issues?

2. when you need to modify WHERE clause or WHERE parameters at runtime do you need to do so in an event handler? such as linqdatasource.selecting?
I see from the above link it is possible, but is that the standard way to handle controlling filtering in code behind for linqdatasource?

2b. if you use an event such as linqdatasource.selecting to add where parameters and/or modify the where clause in code will that also break the builtin sorting and paging support of the linqdatasource with a gridview? 

Can't read global resource in asp button


I have translated Text Ok in arabic and I have that placed in global Navig.resx file

<asp:Button ID

Worldly Windows: Extend The Global Reach Of Your Applications With Unicode 5.0


When using global applications, people want to communicate with others on their terms, in their own languages. Unicode 5.0 brings that ideal closer to reality.

Julie D. Allen, Michael S. Kaplan, Cathy Wissink

MSDN Magazine January 2007

Locale Hero: Enable Global Apps With Locale Builder And Windows Vista


Everything you need to know about locales in Windows Vista.

Kieran Snyder and Shawn Steele

MSDN Magazine December 2006

Custom Cultures: Extend Your Code's Global Reach With New Features In The .NET Framework 2.0


The upcoming Microsoft .NET Framework 2.0 adds a number of globalization features that address the important issues of extensibility, standards support, and migration. Here authors Michael Kaplan and Cathy Wissink explain what these features mean to your globalization effort.

Michael Kaplan and Cathy Wissink

MSDN Magazine October 2005

Go Global: Make the .NET World a Friendlier Place with the Many Faces of the CultureInfo Class


CultureInfo is a complex .NET class whose objects are used for resource loading, formatting, parsing, casing, sorting, and other conventions that change as the language, location, or writing system is changed. It can be tricky to use correctly in every situation. Here Michael Kaplan explains some common scenarios in which you will use CultureInfo and provides information about the behavior, best practices, and consequences of a wrong decision.

Michael Kaplan

MSDN Magazine March 2005

Win32 Resources: Using C++ to Programmatically Retrieve a Global Cursor's Shape and ID


Getting global cursor information is useful when developing software that drives or gathers information about other UI-based applications, including information about a remote machine. This article describes a way to programmatically identify the current cursor's ID and bitmap at any point in time. The first technique described is based on polling for information and shows how to get the handle of the current global cursor. This handle will then allow you to get information about the cursor. You can also monitor WinEvents for changes to the global cursor.

Dmitri Klementiev

MSDN Magazine October 2001

Go Global: Localizing Dynamic Web Apps with IIS 5.0 and SQL Server


The success of a database-driven international Web site depends on how well the code and localized content work together with the software on the client and server. Localizing a dynamic Web site is more complicated than localizing a static one. The use of HTML and ASP code for static and dynamic content on IIS 4.0 or 5.0, coupled with Microsoft Data Access Components (MDAC) and SQL Server, enables Web sites to support as many languages as necessary. Choosing the right character sets and code pages, the variations in the Unicode support for IIS 4.0 and 5.0, as well as ways to avoid some common pitfalls are all discussed.

Jeremy Bostron and Doug Rothaus

MSDN Magazine May 2001

Go Global: Designing Your ASP-based Web Site to Support Globalization


If you have a Web site for your business, you already have an international presence. But how can you make sure users in any country can access your site effectively? The Trigeminal Software site at http://www.trigeminal.com has pages localized into up to 48 languages and allows users to see pages in the language of their choice. This article describes how the site was implemented and how issues such as whether the site should use frames and what character set to choose for multibyte languages were dealt with. Which database to use for storing dynamic content, whether to use static or dynamic pages, and how to implement localized solutions on both Windows NT 4.0 and Windows 2000 is also discussed.

Michael Kaplan

MSDN Magazine July 2000

Quick Error messages with Global.asax

The article Quick Error messages with Global.asax was added by lykasd on Wednesday, August 11, 2010.

Error pages without any effort void Application_Error(object sender, EventArgs e) { Server.Transfer("/error.aspx"); //Displays the error page } In error.aspx add this to the content area. p>We&#39;re sorry, but the %=Server.GetLastError

Optional named parameters work pretty well

Rob has found a use for dynamic: http://blog.wekeroad.com/2010/08/06/flexible-parameters-with-csharp Yay! Let's celebrate! Well, I was a little puzzled because I don't think it quite adds up in the specific example he chose (although please see no aggressiveness here: Rob's a friend; peace!). The idea is to have the same flexibility that a dynamic language can offer in terms of evolution of an API. Here's his original Ruby example: def my_method(args)   thing_one = args["thing1"]   thing_two = args["thing2"] end my_method :thing1 => "value", :thing2 = Time.now The idea, which is quite common in dynamic languages, is that instead of passing a list of predetermined parameters in a specific order, you...(read more)
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