But sometimes for the security of the database server, this port will be changed to something else. At this point, reconnecting the database may report the following error.
An error occurred while establishing a connection with the server. When connecting to SQL Server, by default, SQL Server does not allow remote connections, which may cause this failure (Provider: Named Pipe Provider Error: Unable to open the connection to SQL Server).
At this point, just add the port number.
Port modification method start > server network utility >; TCP/IP & gt; Default port (other ports are acceptable)
State server session management
Setting the mode property to StateServer means that the session data is stored in a separate memory buffer controlled by a Windows service running on a single computer. The full name of the buffer state service is aspnet state service (aspnet _ stateexe), which is configured by the stateConnectionString attribute in the nfig file. This property specifies the server where the service is located and the port to be monitored.
& ltsession state mode = StateServer stateConnectionString = tcpip = my server:cookieless = false time out =/& gt;
In this example, the state service runs on the port (default port) of the machine named myserver. To change the port on the server, you can edit HKEY _ local _ machine \ system \ currentcontrolset \ services \ aspnet _ state \ Obviously, the advantage of using state service in the Parameters registry key is that the process is isolated and can be enjoyed in Web farm ***. The storage of session state will not depend on the failure or restart of iis process. However, once the state service stops, all session data will be lost. In other words, state services do not store data persistently like SQL Server. It just stores data in memory.
Unable to send the session state request to the session state server. Please ensure that ASP. NET state service (ASP. NET is started.
And the client port is the same as the server port. If the server is located on a remote computer, please check.
HKEY _ LOCAL _ MACHINE \ SYSTEM \ current control set \ Services \ aspnet _ state \ Parameters \ AllowRemoteConnectio
Lishi Xinzhi/Article/program/net/20 13 1 1/ 1 176 1