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