How can I change Authentication Mode with SQL Server Data Tools in VS10? - visual-studio-2010

I managed my databases in vs10 with SSDT(SQL Server Data Tools). But after creating a login acoount like "CREATE LOGIN netease WITH PASSWORD = '854032390'", and I tried to add a server, problem happened-login failed. I looked for solutions through the Internet and I want to know how can I change Authentication Mode with SQL Server Data Tools in VS10?

Just edit the connect string in the publish profile.

Related

How can I run my project on client pc without installing SQL server on client pc

I have developed a c# windows application which uses SQL server 2012 database in Visual Studio 2015 which is running well on my pc.
I am to install this application on a number of computers without SQL server installed on it, but when I run the application, its gives me database connection error.
My question is, how can I create the setup file to be able to run the app on those clients pc without installing SQL server on all those computers. Please I need your help.
Thank you.
Am Emmanuel.
Use an Azure database and have the clients connect to that.
Have a look at https://azure.microsoft.com/en-us/services/sql-database/
Alter your application connection string and make sure you keep the connection string secret.
Server=tcp:myserver.database.windows.net,1433;Database=myDataBase;User ID=mylogin#myserver;Password=myPassword;Trusted_Connection=False;Encrypt=True;MultipleActiveResultSets=True;
An important fact is that the clients need to allow communication via port 1433.
If this is not an option create an API application and query the database via that.
If you need a private database per client you can use a database file and connect to the file
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver15
Update based on reply
You can create a pop-up on the application allowing the users to add valid settings and credentials when your appsettings.json is blank or "a test connect" to the database fails.

TFS could not connect to database. Login field

I am getting the following error. Cannot solve.New to TFS. Please help.
TF246017: Team Foundation Server could not connect to the database. Verify that the server that is hosting the database is operational, and that network problems are not blocking communication with the server.--> login failed. Login from untrusted domain and cannot be used with windows authentication.
If you open SQL Server Manager on your TFS Server application tier using "runas" to open it under the same credentials that you expect TFS to use you should be able to diagnose more:
1) install SQL Server Manager on TFS AppTier
2) right-click on the SQL Server Manager icon and select 'run-as' ( you may need to hold alt)
3) enter the TFS Service (refer to TFS Installation Guide) credentials to open
4) try to connect to your SQL Server
If you cant connect verify that SQL is installed where you think it is and that there are no firewall issues for the standard SQL ports.

SSRS Report Manager

I am implementing an SSRS project but I have issues with the deployment phase.
My requirements
Deploy the report to the reporting server
Allow Users to access the reports from a custom web application.
Users should access the reports with any browser
I don't have a sharepoint/Domain authentication so I am using a custom web app
My Challenges
After deploying the reports to the report server, If I try to access the Report Manager Url from my client system I receive an prompt requesting for the Windows Login Credentials of my Reporting Server.
I want disable this prompt.
Please I need your help.
Thanks
You need to edit the data source of that report (or of the shared data source if it uses one) and choose the option "Credentials stored securely in the report server", adding the credentials appropriate to the data source there.
The problem you're having is that the default data source authentication (as with SQL Server itself) is Windows integrated authentication, and that's why you're getting prompted for credentials from a browser connection.
See here for an overview on how to store credentials with the data source.
In your web application's web.config add identity impersonate="true" and SSRS 2012 does not use IIS.

Can't login to SQL Azure Management

Actually i have following step by step from http://www.windowsazure.com/en-us/manage/services/sql-databases/getting-started-w-sql-databases/ to create database and etc.
But when i try to login using username and password which i have configured,message error appear " Failed to retrieve connection information. Try to login again. "
I have configure firewall before to allowed my public ip to access the database.
How to solve my problem ?
Thanks
Clear your cookies and browsing history and contact Microsoft support if this persists after some time (like an hour)
That is very interesting problem.
What about checking connection with Microsoft SQL Server (can be Express edition).
If you configured firewalls then you should be able to access Azure database via Microsoft SQL Server Management Studio from your system with no problems.
Alternatively you could check Visual Studio. But I am not sure if Visual Studio Express edition can connect to Azure databases (you might need some paid version).
If you still have some connectivity issue using SQL Management Studio then that would indicate some networking problems between your place and Azure data centre. In that case I would recommend spinning up another Azure database (for very short time) in different data centre, set up firewalls and see if that will work.
EDIT
Any way to configure Firewall for Azure ?
Firewall to database cannot be configured at a level of individual databases; it needs to be configured at a level of server.
In Windows Azure Management portal, go to Database tab and then select database server:
Once you in server dashboard, select configuration top tab. You can change DB Server firewall allowed IP addresses under Allowed IP Addresses
In the same section there is Current Client IP Address which tell you the current IP. That very handy when you work with VPN or change your network quite often.
Allow popups. Chrome was blocking this from me.

Can't Connect to Database when Web Application is deployed to IIS

i have developed an application and it is working fine but when ever i create a virtual directory for it in IIS and run the application i am getting connection failure exception and named pipes exception.
thanks!
It looks like you having some issue with the database connection from your application. Can you post your code and the exact nature of the error.
Without any code or details of the language it is hard to guess what the issue can be however a common one that occurs with asp.net could be your database connection string. Are you using a SQl Server / Sql Server Express database with your application? You need to check that the connection string.
The problem is the Integrated Security=True setting in your connection string. IIS uses the ASPNET windows login which will be different to the Windows login used when running from VS. You've got a few options:
Grant the ASPNET user the required access rights on your database
Use Sql Server authentication: Set up a user on the database as a sql login and pass this username / password in on the connection string and set Integrated Security=False
Change the identity IIS runs under to one that has access to the DB.
There may be other options also however I think these are most common. Which to choose depends on the architecture you are deploying to, personally I almost always go for Sql Server Authentication using a username and password. The web.config can be encrypted for further security if required.

Resources