Visual Studio 19 not recognising SQL Server 2012 for ASP.NET - asp.net

I want to run an ASP.NET project on VS 19 but whenever I open it, it shows an error dialog box that “this project requires SQL Server 2012 which is not installed on this computer” - but SQL Server 2012 is installed with all services running.
And database cannot be created showing an error
A network related or instance specific error
I guess Visual Studio 19 is somehow not recognising SQL Server 2012 services and I can't figure out how to fix it.
Also tried to disable firewall and enable all TCP/UDP Connections but of no use, kindly help as it's very frustrating.

I'm sorry for using sloppy naming schemes as i'm new to Stack Overflow.
Installing SQL Express LocalDB helped me solve the problem, i thought i had it installed from the SQL Express tools available Microsoft SQL Download, but the SQL Express LocalDB was missing. It sounds stupid, but it is what it is, hope it helps anyone else.

Related

Microsoft Visual Studio 2015 Community - Unable to connect to the configured development Web server' error when trying to build website

I know it's a re-post but I've tried so many different solutions and so far nothing fixed my problem.
I'm having an annoying issue with my Microsoft Visual Studio 2015:
Every time I build my project, I get an alert message saying "Unable to connect to the configured development Web server".
I had an issue when I tried to install MVS 2015 at first but fixed it by disabling the HTTP driver in device manager. After that everything worked great for a week or so, I only had to able/disable the HTTP driver depending on what I wanted to work on. Since today, disabling HTTP doesn't change anything and I always get the same alert message.
My set-up:
HP EliteBook 8560w
Windows 7 professional with Service Pack 1
Intel Core i7-2630QM # 2.00GHz
8.00 GB of RAM
64-bit Operating System
What I've done:
Disabled/Enabled HTTP driver
Install every windows update (windows 7 pro)
Install every MSV 2015 update
Uninstall/Install IIS Express
Delete the automatically generated IIS Express Folder
Inserting this command in Command Shell
netsh http add urlacl url=http://{ip_addr}:{port}/ user=everyone
Opening MVS in administrator
Look if SSL was enabled (it wasn't)
Closing skype or any apps using IIS Express
Close Chrome
And probably more since I got to page 4 of google's results when I searched for this error message.
So yeah, I'm pretty clueless about what to try next, I've read somewhere that installing windows 10 could fix it but I have my doubts about that.
If anyone has any solutions or anything to help me troubleshoot the problem it would be SUPER appreciated!
Thanks,
C.
Update: I should of done a while ago but I forgot, managed to make it work by installing Windows 10.

Why is no database shown in Visual Studio?

My SQL Server Object Explorer is not showing any databases:
I also get an error A network-related or instance-specific error occurred while establishing a connection to SQL Server. .... When I run the website, the error being shown is The system cannot find the file specified. Furthermore, SQL Server is missing from Services:
(It was installed together with Visual Studio and was never used separately)
Yesterday, everything worked like charm; I had multiple databases with tables and was able to access the data. Today, the same project can't even start, no db's either. What's wrong with Visual Studio here? Thanks
I've had the same problem before. Took me a while to figure it out. What you need to do is go here: https://www.microsoft.com/en-us/download/details.aspx?id=42299
In my case, i'm using SQL Server 2014 Management Studio. You must find the one that suits the version of SQL studio that you're using (2008, 2012, 2014).
Click the big download button and now, it is very important that you choose the proper version. Check:
Express 32BIT\SQLEXPR_x86_ENU.exe if you're running on a 32-bit PC, or
Express 64BIT\SQLEXPR_x64_ENU.exe if you're running on a 64-bit PC
It is very important that you install Express version.
Next, once you install that, you should be able to see the SQL Server (MSSQLSERVER) in your services.msc, along with few other SQL services installed.
Open Visual Studio 2015 and in SQL Server Object Explorer window right click on SQL Server and choose Add SQL Server... option. It should prompt you to connet to the server from SQL Server Management Studio.
If you kept everything by default during the installation, just type . (dot) for the Server name and click connect. Now it should load the database.
It turns out that Visual Studio does not come with MS SQL Server in the default installation. It is necessary to install SQL Server Data Tools from the MS website manually. VS custom installation also allows to do that, but you will need an installer. Just make sure to select SSDT in the custom installation components menu. Additionally, I also ran an update from VS itself that allowed me to install SQL Server 2008, 14, and 16. I am finally able to access DB in VS!

Crystal reports v12 doesnt show the report after hosting

I am working on a project in ASP.net 3.5 (with VB script) and Crystal Reports 2008 (V12). It works fine when I run my solution in visual studio(2008) but after publishing it to local IIS(7) it doesnt show the report in the report viewer. I don't see any error either.
I have placed the 'aspnet_client' folder under wwwroot folder that contains crystal report related files.
I had used crystal report 10.5 previously but then I had converted it to V12 as my host doent't support old versions.
Your support in this regard would be appreciated.
Thanks in advance :)
I recently faced this issue and successfully managed to get the reports running. I am using Visual Studio 2005 but I published my project on a local server with Windows 2008 Server R2 Enterprise.
I fixed the issue by changing the Application Pool settings of IIS 7. I changed it to Classic ASP.NET for .NET 2.0 Framework. I guess you may not require this setting, but I am not sure.
Secondly, when you open your report in Visual Studio 2005, check that you are using OLE DB Provider for SQL Server and not SQL Native Client, just in case you are using SQL Server database.
Which OS you are using? I hope you are not using Windows XP. Windows XP has issues with the Integrated Security thing mentioned in your Connection String.

I have SQL Server 2008 R2 installed, but I still can't run the project and open the database because "the server supports version 655 and earlier."

I have a database in my App_Data folder that was created using SQL Server 2008 R2.
When I try to view a page, I get this error message:
The database 'C:\My Projects\NCPA\APP_DATA\NCPA.MDF' cannot be opened
because it is version 661. This server supports version 655 and
earlier. A downgrade path is not supported.
Could not open new database 'C:\My Projects\NCPA\APP_DATA\NCPA.MDF'.
CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file C:\My
Projects\NCPA\APP_DATA\NCPA.MDF failed. A database with the same name
exists, or specified file cannot be opened, or it is located on UNC
share.
Here's my connection string:
<add name="NCPA" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NCPA.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
I have SQL Server 2008 R2 and Visual Studio 2010 installed on my computer. I've searched this problem all over, and everything says "You need R2", but I already have it.
I've also seen that I need to check the SQL Server instance name by going to Tools > Options > Database Tools > Data Connections, mine just says SQLEXPRESS. Is that right? Should it be something else?
What do I need to do here? Is there something that I might not have installed? Is there a setting in Visual Studio that I need to change? I feel like every solution I've found is so vague, or the solution is something I've already done.
EDIT: Here's what I have if I start up SQL Server, and go to Help > About:
Microsoft SQL Server Management Studio - 10.50.1617.0
Microsoft Analysis Services Client Tools - 10.50.1617.0
Microsoft Data Access Components (MDAC) - 6.1.7600.16385
Microsoft MSXML - 3.0 4.0 6.0
Microsoft Internet Explorer - 9.0.8112.16421
Microsoft .NET Framework - 2.0.50727.4961
Operating System - 6.1.7600
While you may have installed SQL Server 2008 R2, are you sure you upgraded the instance you're using to R2?
Use the SQL Server Installation Center from your R2 media and the "Upgrade from SQL Server 2000, SQL Server 2005, or SQL Server 2008" option to upgrade your SQLEXPRESS instance to R2.
My guess is that your code is trying to connect to the database instance that was install with Visual Studio 2010 instead of the SQL Server 2008 R2 instance that you have installed.
Are you really, really sure that the SQL Server you are trying to attach the database to is SQL Server 2008 R2?
Your error message says that your SQL Server only supports version 655, and everything I found concerning these version numbers said that version 655 is SQL Server 2008 (non-R2):
SQL Server: Attach incorrect version 661
SQL Server 2008 R2 bumps the database version
Cannot read SQL Server 2008 database - version increased to 661 from 655
If you really have SQL Server 2008 R2 and it still doesn't work, you'll probably have to re-install the server, like raym0nd said in the comment to his answer.
EDIT:
Steven, none of the numbers you posted is the "real" version number of your SQL Server.
You can find out the actual version number by running select ##version in a query window in Management Studio.
On my machine, Help --> About says Microsoft SQL Server Management Studio - 10.50.1617.0 like on your machine, but when I run select ##version I get this:
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52
Copyright (c) 1988-2008 Microsoft Corporation Express Edition (64-bit)
on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
And here comes the weird part:
I am 100% sure that I installed SQL Server 2008 R2 on my machine.
In fact, the SQL Server stuff in my start menu says "SQL Server 2008 R2" everywhere, and the Help --> About window that you mentioned has a huge SQL Server 2008 R2 logo as well.
But according to several lists that I just found, 10.0.2531.0 is SQL Server 2008 SP1.
So my installation seems somehow messed up as well.
Strange, very strange...
I encountered the similar issue, when trying to attache an .mdf files that was created on another machine running SQL Server 2008 R2 Express, to the SQL Server 2008 R2 Express on my machine..
I did install 2008 (non-R2) and then 2008 R2 on my machine.
After spending hours googling to find a solution, eventually unsuccessful, I simply decided to download the installer SQLEXPR_x64_ENU.exe from here and run it again, hoping it would solve (Windows 7 64 bit)
On the installation Wizard under Installation, I selected Upgrade from SQL Server 2000, SQL Server 2005 or SQL Server 2008 and continued to press Next until it disappeared (Obviously you will have to wait until it finish processiong each step).
That's it. I was able to attach the same file..
Download and reinstall the new MS R2 SQL SERVER , When Microsoft updates something, it doenst support older versions most of the time.
Here what worked for me without trying any updates!
From Visual Studio --> Server Explorer --> Add New Connection
Change the data source to Microsoft SQL server
Server name : My computer's name or localhost
At the drop down list choose the database you want
Everything works fine! No updates and no 661 problems!

Connecting to AdventureWorks database (SQL Server 2005 Express) through Visual Studio Professional 2008

I am following the learning ASP.NET 3.5 by O'REILLY to write some ASP.NET 3.5 code using Visual Studio 2008 SP1. I have gotten to the point to where I need to Configure a Data Source using the SqlDataSource control. I chose Microsoft SQL Server (SqlClient) even though I have SQL Server Express 2005 - This seems like the only logical choice.
I get to the Add Connection window and successfully add a Server name and I use the Select or enter a database name of AdventureWorks. When I click on Test Connection I get the Test Connection Succeeded message box.
Unfortunately, when I click OK I get an error message of the following:
Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=10.0.0.0, Culture=neutral,
PublicKey Token=89845dcd8080cc91' or one of its dependecies. The system cannot find
the file specified.
At his point I am at a loss and everywhere I look and find something similar to my issue it involves other versions of either Visual Studio or SQL Server.
I'd really appreciate any help on this!
You may investigate this recipe.
You may need to reinstall your copy of SQL 2005 Express. But sure to install all of the client-side developer packages in the installer.
I had the exact same issue.
Following the suggestions in this thread , I went to the "Microsoft SQL Server 2008 Feature Pack, August 2008 " - and downloaded (and installed) the "Microsoft SQL Server 2005 Backward Compatibility Components ". This did not help.
Then I also downloaded and installed the following components: SharedManagementObjects.msi, sqlncli.msi, SQLSysClrTypes.msi.
And now it works for me.
I'm using SQL Server 2008 Express and Visual Web Developer 2008 Express Edition.

Resources