Help with webservice

i got login failed, when i try to use my ws

Page 1 of 1

2 Replies - 1140 Views - Last Post: 04 October 2009 - 09:51 AM Rate Topic: -----

#1 micke  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 56
  • Joined: 25-August 08

Help with webservice

Post icon  Posted 01 October 2009 - 10:40 AM

Hi,

i got this error when i try to connect to an webservice (Ws)

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> MyWS.HandlerException: In webmethod GetOrderID.Cannot open database "tcpdb_web" requested by the login. The login failed.
Login failed for user 'intergration'. ---> System.Data.SqlClient.SqlException: Cannot open database "tcpdb_web" requested by the login. The login failed.
Login failed for user 'intergration'.


if surf to the ws url : http://<ip of server>/MyWS/Handler.asmx

then it works, i can add the parameters it needed in the test form, and the result appears.

but not if i access it from my applikation.


Handler Handler = new Handler();
Handler.Url = GetUrl(ID);
DataSet dsID = Handler.GetOrderID(ID, orderId);



Get the url from the db, depending on what the settings says

private string GetUrl(string Id)
        {
            String sUrl = "";
            try
            {
                if (cnn.State != ConnectionState.Open)
                    cnn.Open();

                cmdGetURL.Parameters["@ID"].Value = Id;
                if (cmdGetURL.ExecuteScalar() == DBNull.Value)
                    sUrl = "http://localhost/MyWS/Handler.asmx";
                else
                    sUrl = cmdGetURL.ExecuteScalar().ToString() + "/Handler.asmx";
                cnn.Close();
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                s += "";
                sUrl = "http://localhost/MyWS/Handler.asmx";
            }

            return sUrl;
        }


if i try the same WS on my local maschine it works, but not on the production server.
and none of them have any user named intergration. The webconfig in both cases are connected to the same db
where i got the ID... is this an Windows system user?

thanks for any sugestions

Is This A Good Question/Topic? 0
  • +

Replies To: Help with webservice

#2 Jayman  Icon User is offline

  • Student of Life
  • member icon

Reputation: 418
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: Help with webservice

Posted 04 October 2009 - 09:38 AM

As far as I know, 'integeration' is not a system user account.

Are you certain that the parameters are the same in the web.config in the production environment for the web service, as they are on your local machine?
Was This Post Helpful? 0
  • +
  • -

#3 micke  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 56
  • Joined: 25-August 08

Re: Help with webservice

Posted 04 October 2009 - 09:51 AM

The only diffrence is that i'm using Windows Auth. on the SQL server on my local machine, and on the production enviroment i'm using SQL auth, and this user is called dbweb, and does exist and use the same password as other apps on this server, hows connections works...

totaly wierd...
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1