IIS7 Connection to SQL 2008 not working - sql-server-2008

Having trouble getting my local IIS7 running C # MVC app to connect to a newly installed Sql 2008. IT was working wiht SQL Express, but we upgraded every machine to full SQL. Now, just my machine, will not connect to SQL 2008.
Followed many websites info, fooled wiht the user account both in IIS7 and SQL2008. Setting permissions to the DB's with db_owner(actually selected every permission) just not connecting.
I noticed the w3wp.exe service is not running. Not sure if that is the issue or if it was even running before.
Messed with the and tried all the sugeestions and tutorials out there that had to do with
Application pools are running, their set to the proper settings
IIs Account NetorkServices
Sql NT AUTHORITY\NETWORK SERVICE
created users for IIS APPPOOL\ASP.NET v4.0
When i check the sql logs there is no sign of it even trying to connect. The only message i get is when i restart IIs. Just says starting and stopping.
Been thru this before when i first tried to connect to SQL express, and was not this hard, and i did not touch anything in IIs when i installed sql 2008. So it should have connected.
Any other suggestions out there?

LLBL DataAccessAdapter should have string property ConnectionStringKeyName which contains app settings key (in web.config), which contains connection string. Visual studio does not use that connection string and you being able to connect to db from VS does not mean that connection string your application uses is valid.

Indirectly you lead me to the solution. lol
Started searching on running IIs and Sql 2008 on the same machine.
Running on a Win7 64bit, IIS7 an sql2008 R2.
Long story short, after hours and hours of fighting with IIS and SQL.
IIS7 --> Application Pools --> Select your pool --> Advanced settings --> General tab --> Enable 32-bit Applications set to true.
How it got to false, or why sqlexpress worked and sql2008 did not, not sure. But this fixed the issue.

Related

The client and server cannot communicate, because they do not possess a common algorithm while connecting to mysql database

I have a console application that runs on .Net framework 4.6.2. It's deployed on Windows server 2012 R2. I'm using MySql.Data.MySqlClient,MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.12.0. My server is configured to use only Tls1.2. It was working fine earlier and now its giving me this error
"System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> System.ComponentModel.Win32Exception: The client and server cannot communicate, because they do not possess a common algorithm"
I checked the DB server (same operating system) and it has tls1.0 , tls1.1 and tls1.2 all enabled. I copied the database from the DB server on to the same production server but still getting this error. It was working fine before so not sure if there is a problem with the code itself but since this is urgent I appreciate any help I can get on this.

UDP port 1433 (ms-sql-s service): NOT LISTENING

Screenshot of cmd console
Image of Main Error:
Image of Configuration manager where no server found:
I have try to search all solution for error 26 of sql server but no solution work for me.
I have check that server is running by going to services.msc and I have also checked through management configuration tool, but all get fail in my case.
I have reinstall it to check any missing file in installation process.
So at the end I have used PortQryUI.exe to find main reason where I get this message on my console
UDP port 1433 (ms-sql-s service): NOT LISTENING
I am attaching some screen shot for more clarification. And I have also follow all the steps given at stackoverflow.com for solving error 26 but no solution work for me so please don't close this question, may it have some other problem but sowing error 26.
UDP 1434 is the SQL Server Browser Service port. This service is disabled by default. This service is only needed when connecting to named SQL Server instances (or default instances listening on non-default ports) from the network. Local connections are able to discover named instances using the registry.
TCP port 1433 is the SQL Server listenning port for default instances. Named instances (like SQLEXPRESS) use a dynamic port by default.
The SQL Server Protocols team has some good practical troubleshooting articles for connectivity issues:
Steps to troubleshoot SQL connectivity issues
How to Troubleshoot Connecting to the SQL Server Database Engine
Solving Connectivity errors to SQL Server
First of all I would like to thank you for you responses. Actually I have installed only management studio so I am facing this problem.
But earlier I have also installed only management studio when I am using visual studio 2010, but at that time it was working nicely. But when I have installed Visual Studio 2015 with SQL Server management studio 2012 after formatting my system, I have started facing this error.
Why this problem
Actually Microsoft have provided a facility in Visual studio that when we install it we will also get sql server installation with it so our management studio work nicely till Visual studio 2013. After that microsoft had removed this feature and now we need to install all the other file of SQL server with management studio.
Solution
We need to install SQL server files by our self. We can download them from Microsoft's site, like i have downloaded 2014 version from Microsoft's site.
You can download SQL server 2014 express from here
After a long time struggling with my SQL Server was just refusing to listen on 1433 despite following all advice online and searching extensively: My network was a public network. It took a long time before I got a thought that maybe SQL Server would have a check to not listen on a public network even if you try really hard to make it.
I don't know how my USB wifi home network was set to public in the first place, but I suppose I must have done that somehow. However I actually couldn't find this in any help or forums that I searched.

Can applications hosted in IIS Express utilize SQL Server aliases?

I have a Web-API project that is configured with a connection string which sets the Data Source to an alias defined in SQL Server Configuration Manager. The server runs fine when launched through Visual Studio 2013, but when launched as a separate process using %PROGRAMFILES%\IIS Express\iisexpress.exe it fails to connect and eventually times out with the error:
System.ComponentModel.Win32Exception (0x80004005): The network path was not found
The process works as expected if the connection string is modified to specify the actual server (e.g. localhost) rather than using the alias.
I discovered this question asked on a RedGate forum which seems to indicate that at least one other person has had this issue as well.
This issue of the alias not getting picked up ended up being a result of the 64-bit version of IIS Express running a process that tries to connect to a 32-bit install of SQL Server 2008. Once I changed the execution path to %PROGRAMFILES(x86)%\IIS Express\iisexpress.exe then it worked correctly.

Connect to sql server 2008 using Microsoft Server Management Studio

I have difficulties connecting to my MS SQL Server and I can't find tutorial or answer how to do this, even though I think this should be something pretty standard.
My current setup is this - I have freshly new Installed Visual Studio 2010 and followed Beth Massi's article Step-by-Step: Installing SQL Server Management Studio 2008 Express after Visual Studio 2010 : http://blogs.msdn.com/b/bethmassi/archive/2011/02/18/step-by-step-installing-sql-server-management-studio-2008-express-after-visual-studio-2010.aspx
But I'm not able to connect to a SQL Server. In my Configuration Tools\SQL Server Configuration Manager I see this when I open it :
I set to Enable all TCP\IP and Named Pipes (Just saw that this may be a problem) and in the properties of the SQL Server (SQLEXPRESS) from Services I see this:
I also see in the Log On tab this :
some sort of password (not entered by me) it seems to be something default, but since I'm not sure where the problem is I try to show everything I think may have something to do with solving my problem.
At the end I tried different options to connect to my SQL Server form the Management Studio I ended up with this:
As you see I get an error (included in order to be able to read it). I read the the machine name may be required so my User Account name is Xman and my machine's name is Xman-PC. Eveh though my printscreen image is not from this try I made an attempt to connect to the Server with XMAN-PC\SQLEXPRESS but again - no success.\
Could you point me to a good tutorial on how to connect to a MS SQL Server (I can't believe there's nothing that explains in simple steps what you need to do to connect to a server) or could you tell me how to set-up my configurations so I actually can start to work with databases?
P.S
Forgot to mention in Command Prompyt - sqlcmd command also returns error - Could not open SQL connection.
P.S
Finally I managed to connect using Windows Authentication and (local)\sqlexpress for ServerName. Which at least means that everything is working. But now even more I would like to know how to connect using SQL Server Authentication. It must be something default as it was for Windows Authentication?!
Looks like you've done the hard work - last step will be turning on SQL Server Authentication.
Since you installed with the default values, only Windows Authentication is allowed; you need to set it to SQL Server and Windows Authentication mode. You can do this through Management Studio through the instance Properties -> Security.
See this link for full details: Change Server Authentication Mode.

Cannot connect SQL Server 2008 Reporting Services and Database on separate server

I have two virtual machines runs on my laptop, let's say their name are VMApp and VMDB, and both are runs the same OS, Windows Server 2008 R2.
On VMDB, I installed all SQL Server 2008 features except the Reporting Services. in contrast, I installed only SQL Server 2008 Reporting Services on VMApp.
I run Reporting Services Configuration Manager on VMApp and point the Server Name to the VMDB's computer name, then I got an error message
"A connection to the computer cannot be established"
I enabled the named pipe from SQL Server Configuration Tools on VMDB, but I still get that error message on VMApp.
I think the problem is not network connection because the VMs are connected in same domain network and they could ping each other.
Sorry for this dumb case because I am newbie in SQL Server, and I really appreciate any help from you guys!
Regards,
Chrisma Andhika
You cant set the DB path to SERVERNAME\INSTANCENAME on the configuration manager. There isnt even that option. First you set the server:
and then the DB:
where exactly are you having your issue?
FYI: try to enable SQL Browser on VMDB or to connect by IP if you cant enable browser