Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4530476
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T13:48:17+00:00 2026-05-21T13:48:17+00:00

I have a secured METRO 2.1 web service, and I want to develop a

  • 0

I have a secured METRO 2.1 web service, and I want to develop a .NET (3.5) client that can use it. I already succeded if the WS was unsecured, but once I get

Security mechanism is Username Authentication with Symmetric Key and it’s using the Development Defaults

How do I set up security in .NET? I’ve been reading the METRO guide, but I only found broken links to the examples and the guides didn’t get me through. I successfully generated a proxy class with svcutil, but I don’T know how to use it.

svcutil warnings:

Warning 1 Custom tool warning: A security policy was imported for the endpoint. The security policy contains requirements that cannot be represented in a Windows Communication Foundation configuration. Look for a comment about the SecurityBindingElement parameters that are required in the configuration file that was generated. Create the correct binding element with code. The binding configuration that is in the configuration file is not secure.

Warning 2 Custom tool warning: The wsam:Addressing element requires a wsp:Policy child element but has no child elements.

EDIT

I’ve got really close to solving this (i think). I exported the default GlassFish certificate with keytool.exe:

keytool -exportcert -alias xws-security-server -storepass changeit -keystore keystore.jks -file server.cer 
keytool -printcert -file server.cer //This line shows it's content

I use server.cer certificate on client side:

KDTreeWSClient wsClient = new KDTreeWSClient();
X509Certificate2 server_cert = new X509Certificate2("FullPathToCertificate/server.cer", "changeit");
wsClient.ClientCredentials.ServiceCertificate.DefaultCertificate = server_cert;
wsClient.ClientCredentials.UserName.UserName = "wsitUser"; //Default GF username
wsClient.ClientCredentials.UserName.Password = "changeit"; //Default GF password

Question This results in a MessageSecurityException, because the expected DNS-identity of the endpoint is localhost, however the endpoint has xwssecurityserver. Can I set it to localhost/xwssecurityserver manually?

Any help would be appreciated!
Thanks in advance,
Daniel

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T13:48:18+00:00Added an answer on May 21, 2026 at 1:48 pm

    try to set DNS identity in client application’s config file as described bellow

          <endpoint address="http://localhost:8080/SecureCalculatorApp/CalculatorWSService"
              binding="customBinding" bindingConfiguration="CalculatorWSPortBinding1"
              contract="ServiceReference3.CalculatorWS" name="CalculatorWSPort1">
            <identity>
              <dns value="{YOUR ALIAS}" />
            </identity>
          </endpoint>
    

    As dns value set “xwssecurityserver”. In my case it works (by the way I used your question as a base when solved this problem, so thank you for pointing the right way 🙂 )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .Net service running on IIS 6 and WCF that I want
I have a web-service which I secured using certificates. Now, I want to identify
I have a WCF service that needs to be secured to be consumed by
I'm using ASP.NET MVC 2 and have a login page that is secured via
I have a web application and would want it to be secured using a
Imagine you have a secured site and a View that can be generated in
I have an unsecured domain and want to create a secured sub-domain. On the
I have a wcf service that is secured using WIF. I'm implementing token caching
I have a web application secured with Spring Security that needs two separate login
I have web service secured with SPNego (HTTP challenge returns WWW-Authenticate: Negotiate). This security

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.