none
Web service problem in Sharepoint

    Question

  • Hi,

       When i try to access the Sharepoint web service from the Client side (ie) using Silverlight,  i got the Exception that "Remote server returned an error : Not Found".

       Apart from this when i try to access my custom webservice, it give the result back to the Clientside for non database operation. If i use the database operation in my custom webservice it also give the same exception  "Remote server returned an error : Not Found.". Is there is any access permission have to set for SQL server?.

    In my event viewer i got detailed error that 

    "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Reason: Failed to open the explicitly specified database. [CLIENT: <local machine>]"

    Tuesday, December 15, 2009 1:42 AM

Answers

  •  Ok, here goes:

    1. Open Sql Server Management Studio from the start menu
    2. Connect to the local database server (assuming that's the one you're working with)
    3. Open the Security folder for the server
    4. Right click Logins and click New Login...
    5. Click the Search button
    6. In the box opened type the username and click Check Names
    7. If all is ok, click the Ok button
    8. Click User Mapping
    9. In the top list, check the database(s) that you want the account to have access too
    10.  In the lower list, check the role(s) you want to assing to the account for the selected database. In a development scenario, assigning the db_owner role will do the trick.
    11. Click Ok and you're done.
    HTH.
    Tuesday, December 15, 2009 5:07 AM

All replies

  •  The NT AUTHORIY\NETWORK SERVICE account is running your webservice. You should give this account permission to access your database in SQL Server Management Studio.

    Don't get confused by the Not Found error. For security reasons error messages are not by default send to the client, so any exception you don't handle results in a Not Found error for the client.

    HTH.

    Tuesday, December 15, 2009 2:26 AM
  • Sorry i don't have much knowledge in SQL Server, Can u tell how to add the NT AUTHORIY\NETWORK SERVICE account which is running in Web service to SQL server Management studio.
    Tuesday, December 15, 2009 3:53 AM
  •  Ok, here goes:

    1. Open Sql Server Management Studio from the start menu
    2. Connect to the local database server (assuming that's the one you're working with)
    3. Open the Security folder for the server
    4. Right click Logins and click New Login...
    5. Click the Search button
    6. In the box opened type the username and click Check Names
    7. If all is ok, click the Ok button
    8. Click User Mapping
    9. In the top list, check the database(s) that you want the account to have access too
    10.  In the lower list, check the role(s) you want to assing to the account for the selected database. In a development scenario, assigning the db_owner role will do the trick.
    11. Click Ok and you're done.
    HTH.
    Tuesday, December 15, 2009 5:07 AM
  • It not work for me even after i give permission . Till it shows the Exception. In VS output window i find one exception "'System.ServiceModel.CommunicationException' occurred in System.ServiceModel.dll'" in the silverlight. This error is occurred after calling the Web service method
    Tuesday, December 15, 2009 6:05 AM
  • Thanks ..it is best answer ..

    You really saved so much headache ..

    :)

    Regards

    manish

    Manishnathchoudhary@gmail.com

    Friday, April 27, 2012 6:26 PM