1

I know this is a bad idea since everyone can see the credentials but this is going to happen from a stored procedure so it is pretty secure anyway. I just want to call the webservice GetPerson method and send in SSN, username and password

http://79.171.249.41/nasherpopman/PopManWebService.asmx/GetPerson?personnumber=197310101212&username=myusername&password=mypassword

But when i do this the page goes blank and the only thing on the page is:

Index was outside the bounds of the array.

and i get 500 Internal Server Error if i go to chrome developer bar under network and look at the call. Do i have to send the credentials to the method in another way?

this is what the webservice method looks like:

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetPerson xmlns="http://tempuri.org/">
    <personnumber>string</personnumber>
  <username>string</username>
  <password>string</password>
</GetPerson>
 </soap:Body>
</soap:Envelope>
Daniel Gustafsson
  • 1,725
  • 7
  • 37
  • 78
  • Firstly, using a stored procedure or not does not change the fact that you're sending the credentials in clear text so anybody can get them. Use HTTPS. Now that's aside, about sending the credentials to your method, this is not how you send the credentials to a web-service, but if all what you want is to send them to the `GetPerson` method specifically, then what you did is fine. Finally, for the error you're getting, you need to provide the code for the `GetPerson` method so we can have a look and help you. – Racil Hilan Mar 11 '14 at 12:23
  • Okej thanks!:) My problem is that i don't have the code to the webservice. All i have is the xml-structure that i have posted above :/ – Daniel Gustafsson Mar 11 '14 at 12:27
  • Well, so how do expect yourself to fix it? The code for the `GetPerson` has an issue and if you don't have the code, you cannot fix it. – Racil Hilan Mar 11 '14 at 12:35
  • Okej! Then ill have to beg for the code first :) – Daniel Gustafsson Mar 11 '14 at 12:36
  • That's right. Then post it here if you still need help. – Racil Hilan Mar 11 '14 at 12:38

0 Answers0