Posts

Showing posts with the label asp.net-core-webapi

C# .net Core reconnect to Oracle after database enabled

C# .net Core reconnect to Oracle after database enabled I have .net Core web-api project in docker, where I connect to Oracle database. For connecting I use nugget package oracleClientCore How I connect and call stoted procedure: string cs = "Data Source = 172.10.200.100:1521/dev;PERSIST SECURITY INFO=True;USER ID=test; Password=devtest;"; using (OracleConnection connection = new OracleConnection(cs)){ connection.Open(); using (OracleCommand cmd = connection.CreateCommand()) { cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "sp_check_db"; cmd.ExecuteNonQuery(); connection.Close(); } } In stored procedure sp_check_db just make insert into table sp_check_db insert into table Sometimes the connection to database falling down and I got exception ORA-03114: not connected to ORACLE . After the database was enabled again I continue to receive same error ORA-03114: not connected to ORACLE till I rebuild and redeploy the project. ORA...

angular 2 test URL differentiates from web API URL

angular 2 test URL differentiates from web API URL I have an angular-cli project, embedded in visual studio 2017. By running vs project the angular project is being served and everything works. then when I want to test the angular project with ng test , it will be served on http://localhost:9876 but API is unavailable on this URL. ng test http://localhost:9876 Web API URL is http://localhost:42339/ . and test fails because request goes to http://localhost:9876 . I changed the service URLs http://localhost:42339/ http://localhost:9876 getTagData(): Observable<any> { return this.adminBaseService.get(`http://localhost:42339/api/admin/Tags/GetTags`); } but it makes calls to http://localhost:9876 http://localhost:9876 Any help? I think you should define route in angular project. this url is for backend. you need define a component and service for http. and use this service in component. then define a route for the component. –...