Problem with login

Hi,
Using this
	<connectionStrings>
		<add name="Mssqlconn2" connectionString="Data Source=MYSERVER2\MSSQLSERVER;Initial Catalog=proj_sch;Integrated Security=False;User ID=itelog;Password=myite00" providerName="System.Data.SqlClient"/>
	</connectionStrings>

Open in new window

in the project, and I can login the database using itelog login in SSMS, but I don't know why I get this
https://dl.dropboxusercontent.com/u/40211031/t558.png

when running the project.
LVL 12
HuaMin ChenProblem resolverAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
It might be picking up the default SQLExpress connection from the machine.config. Try changing your connectionStrings section to:
<connectionStrings>
        <clear />
	<add name="Mssqlconn2" connectionString="Data Source=MYSERVER2\MSSQLSERVER;Initial Catalog=proj_sch;Integrated Security=False;User ID=itelog;Password=myite00" providerName="System.Data.SqlClient"/>
</connectionStrings>

Open in new window

0
HuaMin ChenProblem resolverAuthor Commented:
Thanks. I've put this instead

	<connectionStrings>
		<clear />
		<add name="Mssqlconn2" connectionString="Data Source=MYSERVER2\MSSQLSERVER;Initial Catalog=proj_sch;Integrated Security=False;User ID=itelog;Password=myite00" providerName="System.Data.SqlClient"/>
	</connectionStrings>

Open in new window

in Web.config, and have also stopped all services of SQLEXPRESS (by also changing its service to "Manual"), but I am still getting the same problem.
0
Carl TawnSystems and Integration DeveloperCommented:
OK, so you need to start with the basics. Double check the instance name is correct and that it is listening on port 1433. When you connect from SSMS are you connecting remotely, or locally on the server itself?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

HuaMin ChenProblem resolverAuthor Commented:
Thanks. How to ensure it is listening on port 1433? I'm connecting to that locally, using SSMS.
0
Carl TawnSystems and Integration DeveloperCommented:
You would need to look in SQL Server Configuration Manager to determine what port it is listening on. That should be on the start menu as part of the SQL Server installation.

Open that and look under the "SQL Server Network Configuration" section, your SQL instance should be listed under there. Firstly, make sure TCP/IP is set to Enabled. Then right-click on it, bring up the properties, and check what is listed under the Port field.

Also check if the server has a firewall, and if it does, that it is allowing inbound traffic on the port SQL Server is listening on.
0
HuaMin ChenProblem resolverAuthor Commented:
Many thanks.
I see that it is listening on port 1433 and TCP/IP is set to Enabled. It seems there is no firewall on this server as I've got the message in Fig 2.
t559.png
0
Carl TawnSystems and Integration DeveloperCommented:
OK. Follow the instructions here: http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx

To make sure that Remote Connections are enabled.
0
HuaMin ChenProblem resolverAuthor Commented:
Very sorry Carl.
As I'm using Win 2003 server, can you please give me the relevant steps, which are for Win 2003 server, to change the Firewall?
0
Carl TawnSystems and Integration DeveloperCommented:
I don't have a 2003 box available to test this on, but the instructions here should be correct: http://technet.microsoft.com/en-us/library/cc778563(v=ws.10).aspx

If you are on a large corporate network there may be a hardware firewall in the way as well, but you'd need to check with your network people about that.
0
HuaMin ChenProblem resolverAuthor Commented:
Thanks Carl.
0
HuaMin ChenProblem resolverAuthor Commented:
Sorry Carl. I did ever do the same (to do something like Inbound/Outbound rules) against Win 2008 server (like the steps you showed in the previous url). But I do need the similar steps which can be applied to my Win 2003 server now, as currently nothing improves, after I've added the following within Win 2003 server.
t560.png
0
Carl TawnSystems and Integration DeveloperCommented:
That screenshot indicates that your firewall is switched off, so it shouldn't be a problem anyway. Did you do the part about checking that Remote Connections are enabled?
0
HuaMin ChenProblem resolverAuthor Commented:
Yes, I did check that Remote connection is enabled. Please see the attached. thanks
t561.png
0
Carl TawnSystems and Integration DeveloperCommented:
OK. Open a command prompt on your machine and enter "ping <your_server_name>" and see if it responds. If that works enter "telnet <you_server_name> 1433" and see what happens.

Do you have SSMS on your local machine, can you connect to the remote server with that?
0
HuaMin ChenProblem resolverAuthor Commented:
Many thanks. Here is what I've got

C:\Documents and Settings\Administrator>ping MYSERVER2

Pinging MYSERVER2 [127.0.0.1] with 32 bytes of data:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

Ping statistics for 127.0.0.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\Documents and Settings\Administrator>

Open in new window

But I get no response returned to this.

telnet MYSERVER2 1433
0
Carl TawnSystems and Integration DeveloperCommented:
If you just get a blank screen rather than any errors then that should mean it has connected ok. I'd try creating an temporary data source under Start > Settings > Control Panel > Administrative Tools > Data Sources.

Create it with the same settings you are using in your connection string and see if that will connect.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.