My exception-vs2012 "System.accessviolationexception: attempts to read or write protected memory. ”

Source: Internet
Author: User

my system is win7 64-bit system that is installed by Visual Studio 2012. From SVN downloaded the source code, a B/s system, can load the landing page normally, but when entering login information to log in, the error:    -- no sources availableSystem.accessviolationexception: Attempt to read or write protected memory. asked the same group of personnel, we use the same source code, the database is also access to my PC, but others can access the normal. Later asked the river, try to put the database connection string in the IP address, change to local, login success. Now the problem can be summed up as follows: Source with IP access to the local database, source error; Source local access to the database works correctly. to this step, the problem can be in the IP of the machine, and then looked at the IP and error messages, and finally found a solution to the problem: netsh winsock reset--run this command to resolve. the root cause of the problem does not know why, but the role of this line of command will tell us where the cause might be:the netsh winsock reset command, which functions to reset the Winsock directory. If there is a problem with the Winsock protocol configuration on a machine that will cause problems such as network connectivity, you will need to reset the Winsock directory with the Netsh winsock reset command to restore the network. This command re-initializes the network environment to resolve parameter errors caused by software conflicts and virus causes. Netsh is an interface capable of operating almost all network-related settings via the command line, such as setting up Ip,dns, network cards, wireless networks, etc., Winsock is the internal directory of the system, Winsock is the Windows network programming interface, and Winsock works in the application layer, It provides a high-level data transfer programming interface independent of the underlying transport protocol, and reset is the reset operation to Winsock.     My machine might be because, some days ago, when I tested the publishing station on the IIS server, I did some setup on this machine. , which leads to the confusion of the network environment. Hope to help the same problem of children's shoes!

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.