WCF Ria services exception caused by missing. SVC handler ing

Source: Internet
Author: User

Data cannot be retrieved from the database when the code, compilation result, and database are determined to be normal. Error prompt: sysyem. net. webexception: the remote server returns the error notfound. The Listener finds that the requested Database Service is abnormal and the access address http404 is incorrect.

An error occurred while initiating a request to the database.

Error message after access to SVC address

After confirming that the other aspects are normal and the VS is fixed, the reasons are still not found after various IIS settings checks, and the project can run properly on a colleagues' computer. The final confirmation is only possible. NET framework or IIS has a problem, because my colleague installed the test tool on the machine. net framework3.5 and vcredist_x86. An error occurs immediately after the debugging result is returned. If you uninstall the two items later, the debugging can be successful. However, the preceding error occurs.

Finally, find the cause: it may be because of the absence of. SVC handler ing due to the previous installation and uninstallation operations, which leads to the failure of WCF.

Solution:

Run the following two commands ("% Windir % is c: \ windows by default ):

 "%WINDIR%\Microsoft.Net\Framework\v4.0.30319\aspnet_regiis" –i –enable "%WINDIR%\Microsoft.Net\Framework\v4.0.30319\ServiceModelReg.exe" -r

Access the. SVC address again, and you can use the WCF Ria services to interact with the database.

  References:
W? C? F? Mail? Su? I? I? S? Hour? ? Error? Question? Question
One-time setup procedure for the Windows Communication Foundation Samples

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.