The server error in the "/website2" application.
The callback parameter is invalid. Use in configuration
<Pages enableeventvalidation = "true"/>
Or use
<% @ Page enableeventvalidation = "true" %>
Event verification is enabled. For security purposes, this function verifies whether the parameters of the send-back or callback events come from the server controls that initially present these events. If the data is valid and is expected, use
Clientscriptmanager. registerforeventvalidation
Method to register the sending back or callback data for verification.
Description
:An error occurred while executing the current Web request. Check the stack trace information for details about the error and the source of the error in the code.
Exception details:System. argumentexception: the callback or callback parameter is invalid. Use <pages enableeventvalidation = "true"/> in the configuration, or use <% @ page enableeventvalidation = "true" %> On the page to enable event verification. For security purposes, this function verifies whether the parameters of the send-back or callback events come from the server controls that initially present these events. If the data is valid and is expected, use the clientscriptmanager. registerforeventvalidation method to register the sending back or callback data for verification.
Source Error:
| An unhandled exception is generated during the execution of the current Web request. You can use the following exception stack trace information to determine the cause and location of the exception. |
If template is used in the gridview, the page cannot be automatically displayed
The gridview is defined as: <asp: gridview id = "accessorylist" runat = "server" autogeneratecolumns = "false" borderwidth = "0" Borderstyle = "NONE" cssclass = "gbtext" Height = "1%" onrowcommand = "accessorylist_rowcommand" Onrowdatabound = "inline" width = "100%" useaccessibleheader = "false" enabletheming = "true" pagesize = "5" showheader = "false" allowpaging = "true" onpageindexchanging = "pic" font-overline = "false" font-strikeout = "false" font-underline = "false"> <Columns> <Asp: templatefield> <Itemtemplate> <% # Databinder. eval (container. dataitem, "newsid") %> </itemtemplate> <Itemstyle width = "50px"/> </ASP: templatefield> <Asp: templatefield> <Itemtemplate> <Asp: hyperlink id = "accessorylink" runat = "server" navigateurl = '<% #"~ /News_content.aspx? Newsid = "+ databinder. eval (container. dataitem," newsid ") %>' Target = _ blank> <% # Databinder. eval (container. dataitem, "newstitle") %> </ASP: hyperlink> </Itemtemplate> <Itemstyle width = "80px"/> </ASP: templatefield> <Asp: templatefield> <Itemtemplate> <% # Databinder. eval (container. dataitem, "newsdate") %> </itemtemplate> <Itemstyle width = "100px"/> </ASP: templatefield> <Asp: templatefield> <Itemtemplate> <% # Databinder. eval (container. dataitem, "newswriter") %> </itemtemplate> <Itemstyle width = "50px"/> </ASP: templatefield> </Columns> <Selectedrowstyle backcolor = "# ffc0c0"/> <Headerstyle wrap = "true"/> </ASP: gridview> after allowpaging is set to true in the gridview, the following error occurs after enablesortingandpagingcallbacks is set to true:Callback is not supported on templatefield because some controls cannot be correctly updated in the callback. Disable the callback on "accessorylist.Therefore, if you want to use templatefield in the gridview, enablesortingandpagingcallbacks must be set to false, but the automatic page flip function will become unavailable. You must use the onpageindexchanging event to call the function. The function is protected void pageindexchanging (Object sender, gridviewpageeventargs E) { Accessorylist. pageindex = E. newpageindex; Bindnews (); } Bindnews () re-binds the data of the table retrieved from the database to the gridview. |
An error occurred while establishing a connection with the server. When you connect to SQL Server 2005, the default setting does not allow remote connection to SQL Server may cause this failure. (Provider: named pipeline provider, error: 40-unable to open the connection to SQL Server)
Solution: the database you may connect to is SQL Server 2005 express edition. From the "Start Menu", you can call up "SQL Server peripheral application configurator" in "configuration tool ". click "service and connect to the peripheral application configurator" and select the database instance ("sqlexpress" by default ", select "local connection and remote connection (using TCP/IP)" in "remote connection" of database engine to enable the remote connection of SQL Server 2005 (not allowed by default ).
You can
Configuration file:
<Connectionstrings>
<Add name = "testdbconnectionstring" connectionstring = "Data Source =. /sqlexpress; attachdbfilename = D:/wwwroot/ssztest1/app_data/testdb. MDF; Integrated Security = true; Connect timeout = 30; user instance = true "providername =" system. data. sqlclient "/>
</Connectionstrings>
Program call time:
Sqlconnection sqlcon = new sqlconnection (system. configuration. configurationsettings. deleettings ["testdbconnectionstring"]. tostring (); // testdbconnectionstring
Or both directly generate connection:
Sqlconnection sqlcon = new sqlconnection ("Data Source =. // sqlexpress; attachdbfilename = D: // wwwroot // ssztest1 // app_data // testdb. MDF; Integrated Security = true; Connect timeout = 30; user instance = true ")
As long as the connection is successful, it is not a problem to generate datasource again.
An error occurred while establishing a connection with the server. Connect
SQL Server 2005
In the default settings
SQL Server
Remote connection is not allowed, which may cause this failure.
(Provider: SQL
Network Interface
, Error: 26-
Locate the specified server
/
Instance error
)
First, make sure that SQL Server exprss is installed on the local computer and the SQL Server (sqlexpress) service is successfully started. If the problem persists, open "SQL Server peripheral application configurator" and select "service and connected peripheral application configurator ", then configure "remote connection" as "using TCP/IP and named pipes at the same time"
An error occurred while starting the process of the user instance.SQL Server. The connection is closed.
Modify "user instance = true" in the connection string to "user instance = false.
For more information, see non-administrator user instances.
File cannot be moved'X:/website/app_data/database. MDF'As a database''.Attach. The current command has a serious error. Discard any possible results.
You need to assign the "read" permission for the Users Group to the subfolders and files of the X and X partitions.
Try to be a fileX:/website/app_data/database. MDFAn error occurred while attaching the automatically named database. A database with the same name already exists, or the specified file cannot be opened or locatedUNCIn the shared directory.
It is preferred to confirm that the Users Group's "read" permission has been assigned to the subfolders and files of the X and X partitions. If the problem persists, use SQL Server Management studio to connect to the sqlexpress database instance and check whether the database named "Database" exists. If yes, separate the database with the same name.
The default database cannot be opened. Logon Failed.
User'Nt authority/network Service'Logon Failed.
The read and write permissions of database file database. MDF are set to only available for network service. The solution is to stop the SQL Server (sqlexpress) service first, then integrate permissions from the parent item, and then start the SQL Server (sqlexpress) service again.