Tuesday, September 26, 2017

‘Unable to connect to master or target server ‘mydb_svr’. You must have a user with the same password in master or target server ‘mydb-db’

Error message: ‘Unable to connect to master or target server ‘mydb_svr’. You must have a user with the same password in master or target server ‘mydb-db’

The firewall ports were open. The issue (I think) was the source database from which the dacpac was generated did not have the sql user which was being used in the publish profile. Once I specified the password in the publish profile's connection string, it started working. I assume if the same user was set up on source database - which is being used in the publish profile, I could probably get away without mentioning the password in the publish profile's target connection string. 
Data Source=xx.xx.xx.xx,port#;Persist Security Info=False;User ID={user_id};Password={password};Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True
Hope this helps someone!

Wednesday, September 20, 2017

Oracle VM VirtualBox VM screen goes black after installing GuestAdditions


Just created a new VM on Oracle VM VirtualBox using Windows Server 2012 R2 for OS. The screen size was small and I installed GuestAdditions (unsuccessfully multiple times since the screen went black during installation). The GuestAdditions.iso itself is located in C:\Program Files\oracle\VirtualBox and that is the correct version for the VirtualBox version.

Anyway after installation and when the screen went black, I powered off the VM and unchecked the "Enable 3D Acceleration" in Display tab of the Oracle VM settings for this VM and started and it worked fine.

Hope this helps!

Wednesday, September 6, 2017

Remote debugging with Visual Studio 2015

Here are the steps for enabling remote debugging using Visual Studio 2015 Update 3.  

Note: This is for asp.net web application using Visual Studio 2015 update 3, IIS 8.5, asp.net 4.5. So, it may or may not work for other versions of .Net apps. 

- Code deployed on remote server (on a different domain) 
- Source code and visual studio running on your local machine. 

On the remote server:

- Deploy the code (bin should have exact same pdb files as that of local) on the remote server. 
- Install the remote debugging tools on the server. Here is the link for VS 2015 update 3 - remote debug tools for VS 2015 update 3. But you will have to use the exact one for the VS version you have. 
- Need to have admin permissions on the remote server. Run the debugger as administrator (Important! - otherwise when we connect from Visual Studio, we cannot connect to the w3wp).



On the local machine:

- (Do not build because then your dll/pdbs will be different from those deployed on the remote server) 
- In the Visual Studio menu, click Debug -> Attach to Process. On the window select "Default" in the Transport box. (If on the remote debugger options on the remote server, you have any user selected, you can select Remote (no authentication) here).
In the Qualifier, type in the IP, port number as shown on the remote debugger. If the remote server is on different domain, it should prompt for username and password. I had problem for one day where it was not giving me the prompt for username and password to the remote server. I am still not sure how it started prompting after a day. I did clean up credential manager, reinstall VS 2015 but nothing seemed to help a day before. 




- Need to check "Show processes for all users" because w3wp process may run under different account than the user account you are using to connect to remote server. 
- Always should attach to w3wp and we can connect ONLY if the remote debugger is running as "administrator"
- Set break point in code
- Open the browser and go to the url. The break point should hit. 

Other notes:
- In the Debug-options-symbols menu options window, I did set the symbols as explained on other articles but did not make any difference in this case. 

Hope this helps. Please feel free to comment if you run into issues. Good luck!!