I use an intranet tool that has a database created using VS 2005(UI) and SQL Server 2005 and it was working just fine on windows server 2003.
Now I have transferred the database to a Windows 2008 Server which has SQL Server 2012 installed. I changed the connection string, reference assemblies and debugged using visual studio, It works perfect( I am able to login and access the database ). But When I try to do the same in IE, I get userid incorrect error on the login page(first page of UI).
I do not get any connection errors or user errors from the server. The target framework was 2.0 on the previous version but I had to change it to 4.0 in here because the new environment didn't like 2.0. What should I do to solve this?
Related
I'm trying to learn how to create a simple application using Visual Studio IDE in C#.
I wrote a little application that uses a local SQL Server database for reading and storing data. On my machine, the program seems to work normally, but when trying to install the application on client computer it seems unable to read from the database.
I've tried to include the following prerequisites to the publish properties but it doesn't work:
Microsoft .NET Framework 4.5.2
SQL Server 2012 Express LocalDB
Any ideas about the right way to do it?
Thanks to all.
You need to install SQL Server Express LocalDB (SqlLocalDB.MSI) on the computer you are deploying your ClickOnce application to.
Selecting "SQL Server Express LocalDB" in the Prerequisites window and using "Download prerequisites from the component vendor's web site" should take care of that:
If you do that it should install the LocalDB for you and any database errors are more than likely resulting from connection string errors or leaving Integrated Security enabled.
You need to test on a target computer which does not have "SQL Server Express LocalDB" installed and verify that after the ClickOnce deployment it is installed. This will confirm that the problem is not the missing prerequisites but the database access issues...
I am using Visual Studio 2012 working on a web application, a registration page. I have installed SQL Server 2008 Express and done the configuration but still when when I try to add a SQL Server database file in the project, I get an error
Connection to SQL Server Database file (.mdf) requires SQL Server 2005 or SQL Server 2008 Express to be installed and running on you local computer
Please help I am stuck here.
You need to install the LocalDB or to change your connection string to use the SQL server you have installed, it seems like you are trying to use a MDF file.
i was trying the MVC Music Store project but i encountered a problem when going to the administration tool, it says
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.
The following message may help in diagnosing the problem: Unable to connect to SQL Server database.
I searched online and tried numerous ways and found out it is because i don't have sqlserver express edition, so i can't use the AttachDbfile feature to auto create aspnetdb.msd file to store administration data
as i stated in the title, the truth is i installed sql server 2012 express first, but because i need reporting services i then installed the full sqlserver 2012, but i didn't create a new instance when installing instead i selected adding new feature to existing instance, so why does the VS say i don't have the express version now, i am totally buffled
does this mean if i want to use the app_data file feature again, i have to install sql server 2012 express as a new instance again?
SQL Server Express Edition is the only edition of SQL Server that supports User Instances. Thus, if you want to use a User Instance and do not have SQL Server Express Edition installed, you must install SQL Server Express Edition.
If you have a "full" version of SQL Server, I would suggest using the ASP.NET SQL Server Registration Tool (aspnet_regsql.exe) to create the equivalent of the aspnetdb.mdf database.
Edit:
As indicated in the answer to Can we install Express edition and Standard edition of SQL Server on same PC User?, it is possible to install both SQL Server Express Edition and a "full" version of SQL Server on the same computer.
However, it sounds like you performed an Edition Upgrade which replaced SQL Server Express Edition with the "full" version of SQL Server. If this is the case and you still want to use a User Instance, install SQL Server Express Edition again.
If you are not sure which edition(s) of SQL Server is installed, see How to determine the version and edition of SQL Server and its component.
I don't normally do .NET development but I have a small .NET app that I need to set up on a new Win2K8 IIS 7.5 server, the SQL 2005 server is on a different box. I've tested the .NET app on an Win7 IIS 7/SQL 2005 machine and it works fine. When I run the app on the new server I get the following error:
The 'SQLNCLI11' provider is not registered on the local machine.
I googled the error and found out that I needed to install the native client drivers. I found the sqlncli.msi file on the database server and installed it on the IIS server. Same problem.
I then installed the SQL Management Studio thinking that might have some drivers that it needed. Same error. I can connect through the management studio but the .NET app keeps giving me the same error.
Any suggestions?
Thank!
I changed the provider in my connection string from SQLNCLI11 to SQLNCLI10.
Works like a charm.
I have written c# application that uses mdf file for database.when i make setup of that project and runs on other computer having dotnetframework and sql server compact 3.5 then id dose not runs and exception is shown saying something sql server not found or not ready for connection something like that what should i do
mdf is not for sql server compact edition, it is for the real sql server. You need to deploy it to Sql Server Express edition or higher.
Edit:
You can install SQL server express edition or if you want to use the sql compact server you need to create a "local database" in visual studio.
When adding a mdf-database to your visual studio project is is attached to your local sql express database server behind the scenes when you start your project.