?
Solved

,IIS, Asp.net login and LocalSQLServer

Posted on 2016-07-22
3
Medium Priority
?
115 Views
Last Modified: 2016-07-26
It looks like when a user logs in to a webpage with their credentials, that ASP connects to "LocalSQLServer" which is defined in machine.config.
Is this hardcoded into one of the logon controls or can it be changed to use a server that I specify in my own web.config file?
0
Comment
Question by:AlHal2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 41725502
I work in php w/ms sql server and not .net. However, the answer is you can connect to whatever db you want.  On a small site where you have your sql db on the same server as your site, it is best to use use localhost and not open up the port to your sql server to the outside.

If you have your sql server on a different box than your web server, then you need to open your firewall to allow traffic to your sql server.

https://msdn.microsoft.com/en-us/library/jj653752(v=vs.110).aspx

https://technet.microsoft.com/en-us/library/cc646023(v=sql.110).aspx

If you need more specific help for .net questions, try requesting attention by clicking on the link in the bottom right of your question post and ask the moderator to help.
0
 
LVL 21

Accepted Solution

by:
Tapan Pattanaik earned 2000 total points
ID: 41728119
Hi AlHal2,

When a user logs in to a webpage with their credentials  Asp.net connects to "LocalSQLServer" / "Remote SQL Server " which is defined in Web.config file.

Sample Example:

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
User ID=myDomain\myUsername;Password=myPassword

Open in new window

Is this hardcoded into one of the logon controls ?

Ans. No. (Please check your code, basically not ). It can be changed to use a server that you specify in your own web.config file.

Regards,
Tapan Pattanaik
0
 

Author Closing Comment

by:AlHal2
ID: 41729990
Thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Developer tools in browsers have been around for a while, yet they are still heavily underused by developers. Developers still fix html or CSS then refresh page to see effect, or they put alert or debugger in JavaScript and then try again and again …
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question