Solved

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

Posted on 2010-09-22
2
1,186 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 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