Solved

"No Security header in message but required by policy" error message when calling a webservice

Posted on 2010-09-22
2
1,196 Views
Last Modified: 2012-05-10
How do I stop getting this error? There is no certificate for the web service. Am I missing something?
 Dim MyService As TESTWEBSERVICE.test.PersonInfoWebServiceClient = New TESTWEBSERVICE.test.PersonInfoWebServiceClient

        Dim MyResult As test.getPersonResponse = New test.getPersonResponse

        MyService.ClientCredentials.UserName.UserName = "uid"
        MyService.ClientCredentials.UserName.Password = "pwd20"
        Try
            MyResult.response = MyService.getPerson("TED")
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

Open in new window

0
Comment
Question by:cobolinx1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:cobolinx1
ID: 33737345
Anyone?
0
 
LVL 15

Accepted Solution

by:
aibusinesssolutions earned 500 total points
ID: 33745129
Try using CredentialCache.DefaultCredentials.

DefaultCredentials represents the system credentials for the current security context in which the application is running. For a client-side application, these are usually the Windows credentials (user name, password, and domain) of the user running the application. For ASP.NET applications, the default credentials are the user credentials of the logged-in user, or the user being impersonated.

http://msdn.microsoft.com/en-us/library/system.net.credentialcache.defaultcredentials.aspx
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question