Solved

,IIS, Asp.net login and LocalSQLServer

Posted on 2016-07-22
3
64 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
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 …
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now