Oracle.ManagedDataAccess and ORA-01017: invalid username/password; logon denied

后端 未结 9 1266
青春惊慌失措
青春惊慌失措 2020-12-01 13:11

I have a challenging situation on one of our servers. I have an ASP.NET MVC 3 application that needs to connect to an Oracle 12c database. It does so using the following co

9条回答
  •  醉酒成梦
    2020-12-01 13:33

    I did not quite have the same scenario as this case does, but I did have very similar results. What I did to sort out the problem was, I enclosed the password in quotes like the following (VB.NET):

    cnx.ConnectionString = "User ID=MYID;Password=""MyPass"" ;Data Source=MyTEST"

    or use chr(34) as follows

    cnx.ConnectionString = "User ID=MYID;Password="+chr(34)+"MyPass"+chr(34)+" ;Data Source=MyTEST"
    

提交回复
热议问题