Webservice SOAP Exception

sharadsharad Member Posts: 112
edited 2013-04-25 in NAV Three Tier
Hello Friends,

I made asp.net application using NAV webservices. it runs fine on developement mode but when i publish this project and call by browser it gives following error :

Please Help me

The login failed when connecting to SQL Server SHARAD.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.Services.Protocols.SoapException: The login failed when connecting to SQL Server SHARAD.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SoapException: The login failed when connecting to SQL Server SHARAD.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +734213
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +345
NavisionPortal.CompanyInfo.CompanyInfo_Service.ReadMultiple(CompanyInfo_Filter[] filter, String bookmarkKey, Int32 setSize) in C:\Users\SHARAD\Documents\Visual Studio 2010\Projects\NavisionPortal\NavisionPortal\Web References\CompanyInfo\Reference.cs:135
NavisionPortal.WebForm1.Page_Load(Object sender, EventArgs e) in C:\Users\SHARAD\Documents\Visual Studio 2010\Projects\NavisionPortal\NavisionPortal\WebForm1.aspx.cs:32
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178
Sharad Gupta
Navision Technical Consultant & .Net Developer

Comments

  • Excepti0nalExcepti0nal Member Posts: 74
    Are you using the same user name as when you are in dev. Is the username you are using able to access the SQL Server? Also in development, are you using your production server for the web reference or do you have a separate development server?
  • AvallackAvallack Member Posts: 18
    Can you give me the way when you connect on your web service ?

    UseDefaultCredential or Credential = NetworkCredent(user,pwd,domain) ...

    Maybe, you have forgotten to switch the connection way :p

    Then, if you use NetworkCredential, you must check your rules (SQL, NAV ..)
    Navision Technical Consultant & .Net Developer
  • sharadsharad Member Posts: 112
    Avallack wrote:
    Can you give me the way when you connect on your web service ?

    UseDefaultCredential or Credential = NetworkCredent(user,pwd,domain) ...

    Maybe, you have forgotten to switch the connection way :p

    Then, if you use NetworkCredential, you must check your rules (SQL, NAV ..)


    I use UseDefaultCredential = true.

    so tell me what should i do to solve this error. and Deploy machine and developement machine same.

    Please Help
    Sharad Gupta
    Navision Technical Consultant & .Net Developer
  • AvallackAvallack Member Posts: 18
    If you use UseDefaultCredential, you consume the login who use the local session. So you must check that your user is registered on your NAV. I propose you use : Credential = new NetWorkCredential("User","Pwd","Domain") with a NAV account.
    Navision Technical Consultant & .Net Developer
  • thegunzothegunzo Member Posts: 274
    You can use the applicaton pool settings,
    See here --> http://www.dynamics.is/?p=487
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
Sign In or Register to comment.