Solved

,IIS, Asp.net login and LocalSQLServer

Posted on 2016-07-22
3
72 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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Anyway to make "All" the default in the dropdown? 6 34
Two different visual studio versions 3 23
Error on Add method 1 38
Split in Javascript 5 31
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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…
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.

863 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

22 Experts available now in Live!

Get 1:1 Help Now