?
Solved

,IIS, Asp.net login and LocalSQLServer

Posted on 2016-07-22
3
Medium Priority
?
141 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 54

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 22

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
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.
Suggested Courses
Course of the Month13 days, 10 hours left to enroll

750 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