Solved

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

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
The task of choosing a web design company to build a website for your business should never be taken in a light manner. Provided the fact that your website will act as a representative to your business and will be responsible for imposing an online …
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now