Solved

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

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
compare between entities in entity framework 8 71
Alert on Server memory 2 21
DataTables + iCheck + pagination Issue 2 17
Convert datetime to time string 10 21
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
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…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

776 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