ASP. NET-SQL server does not exist or access is denied

Source: Internet
Author: User
Tags sql client

When I got home last night, I got a call from a colleague who called for help.ProgramProblem: the home page cannot be opened and an exception occurs. Because I am already at home, I can only ask my colleagues to check the problem. The following dialog appears.

Me: is IIS running normally?
Colleague: normal
Me: What about opening the homepage in IIS?
Colleague: No, but the error confidence has changed to "SQL server does not exist or access is denied ".
Me: Are there any problems with the database server?
Colleague: No. I am working on data liquidation.
Me: Can you connect to the database on the Web server?
Colleague: Yes.
Me: Check whether the configuration of the program is correct. Is the server pointing to an incorrect one?
Colleague: the configuration is correct.

This makes me difficult. Everything is normal. How can this problem happen? In addition, you did not access the database when you opened the homepage. Even if you did, you should use WebService instead of directly reporting such errors to the front-end. When I was puzzled, I heard someone on the phone saying that the database server used by our program was removed today after the migration was completed. When I heard this sentence, I suddenly saw that our program had created an aspstate library during installation, and as long as the program was used, it should access this library, and the operation on this database is.. NET environment, which is not under our control. In this case, we can explain why the error "SQL server does not exist or access is denied" occurs. So why was it good before? Why is it wrong today? Is it related to the removed database server? So I asked my colleagues to open the SQL client network utility on the Web server and check the alias settings. We found that the machine corresponding to the database server alias was the one that was removed. The cause of the problem was found and it was easy to solve it. After modifying the address, try the program again, everything is normal.
Although the problem has been solved, it reveals that there are still some carelessness in the work, and the value should be taken as a warning-"You Should Not Be casual"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.