views:

76

answers:

1

I'm trying to have access to a back.end system through webservices, everytime i try to take data out I'm facing this Soap Exception I've been struggling with this for a while now. Any tips?

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Incorrect Login Name: 'NT AUTHORITY\NETWORK SERVICE' ''.

Source : XXX Type : YYY Time : 15-09-2009 17:40:56 Place : MyMachine @ C:\MyFolder\ End User : NT AUTHORITY\NETWORK SERVICE User : AAA\bbb Assembly : MyAssembly, Version=6.1.9.2100, Culture=neutral, PublicKeyToken=null rscEnumType: ZZZ RscCode : BadLoginName Translated : Incorrect Login Name: 'NT AUTHORITY\NETWORK SERVICE' ''. Version : MyServices.build : Date: 28-05-2009 20:00 Machine: MachineNAme Version: Version

+1  A: 

Requests to your service are likely executing as anonymous, and the NETWORK SERVICE account needs permissions on the folder where your service is located to take whatever action your SOAP method requires (C:\MyFolder\, it seems.)

Add at least Read permission to that folder for NETWORK SERVICE. If you're doing any sort of I/O, you will likely need Modify permission as well.

Permissions setup on your service depends on the OS (Win2K3, Win2K8, Vista, Windows7....), so your mileage may vary.

jro
hi jro, turns out the problem wasn't that, I already had the necessary permissions turned on. The problem was about the web service I was calling. I enabled anonymous authentication on IIS and it's fine now, I don't have much experience with this and didn't have much notion of what it is 'NetworkService' but your first words "...your service are likely executing as anonymous..." kinda gave me a clue... The point is for that hint =) Tks
Bee gud
Glad it helped resolved your problem. As a suggestion, do some reading on permissions and authentication with IIS. If you're going to be running a web service, it's important to know the fundamentals of operation; authentication/authorization is a big piece of that.
jro