Login failed for User sa in and RMI

Posted on 2005-04-13
Last Modified: 2011-09-20
i have strange problem
1:i have been working on remoting project  with sql server database on different server
authentication works well. now i have changed the server and export database to my local server.
i check the connection in a simple c# window project and it work fine retriving data.
but when i try the same connection in Remoting project it give me eexception "Login failed for user sa"
no sa problem and password problem koz it is working in simple window project.
 same problem occurs in Java RMI
and same error generates
i use ODBC in RMI and ODBC works fine and tested successfully.
for RMI i uses the same database and tables.
it was also working fine it was on differnt server.

if it is sa or password problem or ip problem then why it is working fine in other Projects.

kindly guide me.
Question by:Klusner
    LVL 8

    Expert Comment

    Check whether your local server is configured so that remoting can work
    I guess there are configuration differences between the servers

    Also check if there is a firewall between where the remoting object is hosted and the local server...

    i think one of the above reasons may cause the issue. Hope it is of help. Apologies if it doesnt

    LVL 8

    Expert Comment

    try specifying either "persist security info" either as true or false (forgot whicht one it had to be but my guess is "true") in your connection string.
    although iirc that behaves weird with the sa account so you might want to change to a normal user account (which is always a good idea anyway)

    Author Comment

    Ok problem solved

     i  was sending password as parmater to function where connection is coded but i never conconate the password. on previous server the sqlserver the password was emty therefore code didnt mind and executed and nver able to detect the bug.
    when i specify other  server name , well it definitaly require password and therefore i was unable to detect the bug.
    now conconate the password parameter in the string and works fine now
    now ssi integrated stuff i included koz the connection string works okay in other projects. it was only a parameter concanation mistake
    thanks for help

    Accepted Solution

    PAQed with points refunded (500)

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
    This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now