Solved

,IIS, Asp.net login and LocalSQLServer

Posted on 2016-07-22
3
79 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
3 Comments
 
LVL 52

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 500 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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
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…

810 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