Click here to Skip to main content
13,092,310 members (58,006 online)

lepipele - Professional Profile





Summary

    Blog RSS
103,155
Author
665
Authority
1,489
Debator
165
Editor
5
Enquirer
172
Organiser
1,140
Participant
If you liked this article, consider reading other articles by me. For republishing article on other websites, please contact me by leaving a comment.

Bitcoin wallet:
1ARXmh58S6aRiZPCbneDCzrB1HUU6PLmDQ

Blogs I enjoy:
http://blog.codinghorror.com/

Reputation

For more information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilverAdmin
Bypass spam checks when posting contentsilversilversilversilversilversilversilverSitebuilder, Subeditor, Mentor, Protector, Editor, Staff, Admin
Store personal files in your account areaplatinumplatinumSitebuilder, Subeditor, Supporter, Editor, Staff
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubeditor, Protector, Editor, Staff, Admin
Edit a Question in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Edit an Answer in Q&AsilversilversilversilverYesSubeditor, Protector, Editor, Admin
Delete a Question in Q&AYesSubeditor, Protector, Editor, Admin
Delete an Answer in Q&AYesSubeditor, Protector, Editor, Admin
Report an ArticlesilversilversilversilverSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubeditor, Mentor, Protector, Editor, Staff, Admin
Edit other members' articlesSubeditor, Protector, Editor, Admin
Create an article without requiring moderationplatinumSubeditor, Mentor, Protector, Editor, Staff, Admin
Approve/Disapprove a pending QuestionProtector, Admin
Approve/Disapprove a pending AnswerProtector, Admin
Report a forum messagesilversilverbronzeProtector, Editor, Admin
Approve/Disapprove a pending Forum MessageProtector, Admin
Create a new tagsilversilversilversilverAdmin
Modify a tagsilversilversilversilverAdmin

Actions with a green tick can be performed by this member.


 
GeneralAdding custom headers to Silverlight's WCF calls Pin
Predrag Tomasevic28-Feb-10 13:00
memberPredrag Tomasevic28-Feb-10 13:00 
Bah... this proved tougher than I originally thought, because all I could find were bunch of smart-ass comments that contained no code. You'll hopefully evade that path by following these steps:

1. Download Solution from -> http://www.sendspace.com/file/465sb6[^]
2. Open .sln, press F5 -> press Button -> you should get dialog with bunch of variables showing that server is aware of calling client's credentials and culture
3. Open SilverlightWcf/Page.xaml.cs to see how calls are initialized - note that you only set culture/username/password during proxy's creation.

How to import this into your solution? Easy:

1. Copy Util.CustomHeader.Silverlight & Util.CustomHeader.WcfService projects into your solution's folder
2. Reference Util.CustomHeaders.Silverlight from your Silverlight project, Util.CustomHeaders.WcfService from your WCF project
3. Decorate your WCF service with [CustomHeadersBehaviorAttribute] attribute (alternatively you can set this in config by using CustomHeadersBehavior, see ref #3 for more details)
4. Add reference to your WCF service from Silverlight project and after proxy class generation is finished you'll use code like this to initialize your service:

public Page()
{
    InitializeComponent();
 
    ClientChannelBinding binding = new ClientChannelBinding();
    ClientChannelBinding.Culture = "sr-Latn-CS";
    ClientChannelBinding.Username = "username";
    ClientChannelBinding.Password = "password";
 
    EndpointAddress endpoint = new EndpointAddress(
        "http://localhost:1654/SilverlightWcf.Web/Services/Service1.svc");
 
    client = new SilverlightWcf.ServiceReference1.Service1Client(binding, endpoint);
    client.GetDataCompleted += client_GetDataCompleted;
}
 
private ServiceReference1.Service1Client client;


Of course, I recommend that you create some kind of WebServiceFactory.cs in your Silverlight project that will create services for you and do this initialization... while also exposing that web service URI in some config.

For those interested in details of how this works:

#1 - http://fluffyidentity.blogspot.com/2008/08/custom-wcf-channel-in-silverlight.html[^]
#2 - http://geekswithblogs.net/SunnyCoder/archive/2009/03/15/username-password-amp-ws-security-with-silverlight.aspx[^]
#3 - http://weblogs.asp.net/paolopia/archive/2007/08/23/writing-a-wcf-message-inspector.aspx[^]

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 21 Aug 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid