Reason:
() The property of validateRequest is not set correctly in the page or webconfig where the data is submitted.
() has HTML
Solve:
Scheme 1 aspx
Option 2: Modify nfig file:
& lt configuration & gt
& lt system website & gt
& ltpages validate request = false/& gt;
& lt/system web & gt;
& lt/configuration & gt;
Because the default value of validateRequest is true, you just need to set it to false.
Without a data solution, the read attempt is invalid.
cause
The returned sqldatareader has no data record, but no record and judgment, and the return value is null.
If (reader read()) {TextName Text =
reader[field name]ToString(); }
Data is empty. This method or property cannot be called on a null value.
Reason:
If the object is empty, there must be an error when calling the method of the object, such as ToString (). Typically, the value of a database field is empty.
It often appears in data controls such as grideview.
Solution: Therefore, it is recommended to use empty processing.
Invalid attempt to FieldCount when the reader is closed.
Reason:
After using SqlDataReader to bind data, the connection object is Close ().
similar
Public SqlDataReader? GetSomething()
{
conn open();
SqlDataReader? Reader =
sqlcmd excut reader(command behavior close connection));
conn close(); //An error occurred? here
Return? Readers;
}
This method is called when binding to specify a data source. If you use this method, you need to turn off Re in the calling function.
Ader, so conn can shut down automatically.
If SqlDataAdapter and DataSet are used, remove the call to explicitly close conn or finally.
Call to inform
Failed to map path.
Reason: It may be that the path configuration in webconfig is incorrect, which is more prominent in the configuration of FCKEditor.
& ltadd key = FCKeditor:BasePath value = ~/admin/FCKeditor//& gt;
& ltadd key = FCKeditor:user files path value =/user files//& gt;
Unreachable code detected.
cause
Generally, throw or return is used in exception handling or return value, which may be placed in front, leading to the execution of the following code.
solve
Put the related exception throw statement or return statement on the last line of agent execution.
The out-of-range index must be non-negative and smaller than the collection size.
cause
() DATAKEYFIELD is not set as the corresponding unique field in the database (generally primary key).
() Data Grid Column & gt Project Cell
solve
() Set data keyword fields
() Add the judgment statement unt (datagrid can be other similar server controls).
The data source does not support server-side data paging.
Solution:
Do not use DataReader instead of DataSet or replace the provided paging function with a custom paging form.
Oledbdataadapterda = new oledbdataadapter (SQL connection);
Data set ds = new data set ();
Da Fill(ds News);
GridView DataSource = ds
GridView DataBind();
The object name * * * is invalid.
Reason: There is no * * * * table in the currently used database.
Solution: Check whether the name of the called table is misspelled in the program, or whether the table you called exists in the SQL database.
An error occurred while establishing a connection with the server. When connecting to SQL Server, SQL is set by default.
The server does not allow remote connections, which may cause this failure (provider: named pipe provider
Error: Unable to open connection to SQL Server)
Solution: A fixed IP address or server address is required on the host.
SqlDateTime overflow must be between //* AM and //* PM.
amongst
This problem is mainly because the datetime field value is empty when updating the database, and the year and month are inserted by default.
Date'' caused date-time type overflow.
The appearance indicates that this property should be a method here.
Reason:
The format of method attributes in VB and c# is different, which leads to.
There may be a syntax error in the binding data in the design. Solution: Remember to use the [] method and the () method for the attribute.
Remember the correct syntax for binding data (there are several ways:
#Eval (field name)%>& lt%Bind (field name)%> and so on. )
Cannot derive from assembly DAL Version= Culture=neutral.
Type DAL SqlHelper is loaded in PublicKeyToken=null.
Reason: recompiling into dll after modifying other layers failed.
Solution: Reconstruction.
Too many parameters were specified for the procedure or function.
Solution: The number of parameters used to call stored procedures and defined stored procedures, or the number of parameters passed in executed SQL statements.
Inconsistent numbers (this is an SQL error)
Solution: Check carefully whether the parameter variables set in the stored procedure are in one-to-one correspondence with the actual input parameter values.
Unable to start debugging. Invalid binding handle.
Reason: the terminal of the system? The service is not open.
Unable to debug on the web server. Debugging failed because integrated windows authentication is not enabled.
Solution:
Open vs > tools >; Options >; Debug) > edit and continue) > check all.
Cannot find file name or class name in automation operation: RegExp.
Solution: regsvr vbscript dll
System NullReferenceException: the object reference is not set as an instance of the object.
Reason:
The variable set by () is empty or has no value, which usually happens when passing parameters. This problem can also occur when using data controls such as datagrid, gridview, or datalist.
The name of the () control does not correspond to the name in code-behind.
The () object is not initialized with new.
The control referenced in the () program does not exist.
Solution:
() Use try catch finally to catch the error, or directly use response write () to output the selected variable value.
() Check whether there are uninitialized variables in the code.
The digital signature policy rejected the error file (when installing vs sp) Resolution:
() Click Start, click Run, type Control Management Tool, and then click OK.
() Double-click the local security policy
() Click the software restriction policy (note that if the software restriction is not listed, right-click the software restriction policy and click New Policy).
() Double-click the force under the object type.
() Click all users except the local administrator, and then click OK.
() Restart the computer
Microsoft explained
Vs cannot switch from source file mode to view mode.
Solution: run devenv /resetskippkgs (win+r cmd) under dos.
View state MAC verification failed.
Solution: Add EnableViewState = false EnableViewStateMAC = false to the top page of the page to solve this problem.
The automation server could not create the object.
Solution: Just run: Regsvr scrrun dll.
The package failed to load.
Package visual web developer trident designer package (guid =
{ AE E C D E F A AEFF }
Solution:
Set the system variable VsLogActivity=
Create the file ActivityLog xml in the% appdata% \ Microsoft \ Visual Studio \ \ folder.
mistake
Microsoft Visual Studio
The LoadLibrary of package [Visual Web Developer Trident designer package] failed.
{ AE E B C D E F A AEFF }
e
c:\ Program Files \ Microsoft Visual Studio \ Common \ Packages \ tridsn dll
Copy the file gdiplus dll from winnt \ Microsoft net \ framework \ vxxx to the program files \ visual studio \ common \ packages folder.
Run the command devenv /resetskippkgs on the command line.
Error generating cmd exe.
Solution: copy cmd exe to VC/BIN directory under VS installation directory to solve the problem.
Attempt to read from or write to protected memory.
Solution: There is something wrong with the hardware, and there is something wrong with the general memory.
The manifest signing certificate was not found in the certificate store.
Solution: Open the csproj file of the project with Notepad and delete it.
The target ResolveKeySource does not exist in this project.
Reason: This problem is relatively rare. Inquiring about foreign related materials is roughly because the deployed scheme is not standard. You need to run the following at the command prompt that comes with VS to restore it.
Solution:
() Save the following code as an XML file and name it TestBuild xml.
& ltproject default targets = Build xmlns = & gt;
& lt Attribute Group & gt
& ltTargetConnectionString & gt data source = \ sql% user id = sqluser% bpooring = false% bpassword = x <; /target connectionstring & gt;
& lt/property group & gt;
& lt project team & gt
& ltDatabase project Include = Database \ Database dbproj/>
& ltDatabase project Include = Database \ Database dbproj/>
& lt/item group & gt;
& lttarget Name = BuildAllDatabaseProjects & gt;
& ltMSBuild
properties = target connectionstring = $(target connectionstring)
Project = @ (Database Project)
Goal = build; Deployment & gt
& lt/MSBuild & gt;
& lt/Target & gt;
() Run: m * * * uild/t: builddatabaseprojects at the command prompt to test and generate XML.
& lt/Project & gt;
Cannot insert value NULL into column * *
Reason: This is an error in database table design. An attribute that cannot be empty is set in the field of the table, but the passed-in value is null, so an error is reported.
Solution: Check whether the passed-in value is empty or modify the properties of the corresponding column of the table in the database.
Failed to load the type namespace class.
Reason:
() The project was not compiled after modification.
() The existing namespace in the project may have been modified.
() ascx or other pages required in the project do not exist or are not included in the project.
Solution:
() Rebuild or compile the whole project or solution after modification.
() Modify the changed namespace manually, and pay attention to the case of the name before recompiling.
() Include related files in the project.
Cannot access read-only file * * * * *
Solution:
Add Everyone/ write permission to the file corresponding to the virtual directory.
The request failed due to HTTP status. Solution: Check the anonymous access and iis control password on the iis information server.
Invalid SelectedValue exists because it is not in the project list.
cause
() Assign a value to DropDownList SelectedValue before binding it.
Null value in () dropdownlist.
Cannot create/shadow copy the file when it already exists.
Solution recompile the project (multiple projects are recompiled). Close vs and reopen the machine, if necessary.
User C\ASPNET failed to log in.
Exception details: system data sqlclientsql exception: user COO \ASPNET login failed.
What's going on here?
Because the connection string of your program connecting to SQLServer is integrated login with windows, you can log in with the password of the database account. The connection string is written as
Server = localhostuid = sapwd = xxxx database = master.
Server is the machine name or IP of the database server. If it is the same machine, you can use localhost.
Uid is the database login account.
Pwd is the database password.
Database is the initial owner name of the database.
answer
Right-click Desktop, My Computer, select Manage, double-click local users and groups in the opened computer management dialog box, double-click remote desktop user groups in the right window, click Add in the opened remote desktop user properties dialog box, click Advanced in the opened add user dialog box, and then click the Find Now button. Double-click ASPNET (if it is IIS NEOR SERVERCE) in the search results, and then click OK twice to finish adding users.
Click Start All Programs. Microsoft SQL Server Enterprise Manager selects the corresponding database in the open console root directory. Right-click a user in the database to select a new database. In the New User dialog box, click the drop-down list box to the right of the login name. Select New to open the New Login dialog box. Click the ellipsis button to the right of the name to open the dialog box. Select the name of this computer from the listed names, then select the remote desktop user in the name box below, then click the member button and double-click ASPNET (if it is IIS NEOR SERVERCE), then click OK to select the corresponding database name in the default database option of the new login dialog box, then select the corresponding database under the database access option, and click OK to finish adding the default anonymous user to SQL.
User nt authorization \ nworking service login failed.
> sql server switches to SQL server and windows authentication mode.
& gt
(The following methods are for reference only)
The first step is to add the NT AUTHORITY \ NEORK service to the Administrator group.
My computer > right-click > administration > local users and groups
Select group > double-click administrator > click add > click advanced > click find now > select Neork service user > click ok twice > join.
Step 2: Add the network service user to the enterprise manager.
Open Sql Server enterprise manager > select database instance >; Open the security node > select login > right-click the list on the right > select new login > click the button next to the name in the general tab > select the administrator group > click the member button below > select the Neork service > click the add button > click ok to return to the new login dialog box > ensure that the authentication type is windows authentication and allow access > click ok > close enterprise manager.
Third step
Rerun the program database connection string and select windows Authentication.
& gt add an account or IIS_WPG workgroup in sqlserver.
This method comes from
Failed to load view state. The control tree into which the view state is being loaded must match the control tree used to save the view state during the previous request. For example, when adding controls dynamically, the controls added during the postback must match the type and location of the controls added during the initial request.
Reason The function of viewstate is to save the state of the control in the next Post, so as to restore the state of the control to the server (the state of the control includes values and events).
solution
() Change the view state of each UserControl to false.
() Add this
EnableViewState = false for this page.
This method comes from _ astar/archive///l//l.
Unable to generate a user instance of SQL Server due to an error in starting the process of the user instance. The connection will be closed.
The cause of the problem
This is a bug of Microsoft, and Microsoft has admitted the details as follows.
The condition of this error is that you have used Remote Desktop Connection and installed SQL +VS, which is likely to trigger this problem. Microsoft said it will solve this problem in the future XP SP.
solve
ID = & ampSiteID=
If you can't read English, I'll tell you my solution.
Just delete the directory c: \ documents and settings \ [username] \ local settings \ application data \ Microsoft \ Microsoft SQL server data \ sqlexpress. [User Name] is a Windows user name, such as Administrator.
This question comes from
The server application is unavailable.
The web application you are trying to access on this web server is currently unavailable. Please click the refresh button in your web browser to retry your request.
Note for administrators: An error message detailing why this particular request failed can be found in the application event log of the web server. Please check this log entry to find out the cause of this error.
solve
If you run WinXP/IIS, in order to give the ASPNET worker process access to your web project folder, please go to the directory where the website file is located, right-click the first-level folder, select Security-Add-Type ASPNET, click OK or click Check Name. If the dialog box prompts that the name cannot be found, you should click Location to change the location to the local computer name, click OK to assign this user right to Full Control, and then click OK.
The mistake became
You are not authorized to view this page.
You do not have permission to view this directory or page with the credentials you provided.
solve
Right-click this virtual directory in IIS-Properties-Directory Security-Edit, and select Integrated Windows Authentication.
The timeout has expired, but no connection has been obtained from the pool. This may be because all pool connections are in use and the maximum pool size has been reached.
Possible reasons are: the concurrent operation connection is not closed after use, or the DataReader connection is exclusive.
solution
Modify several key pages or frequently accessed database access operations. Use DataAdapter and DataSet to get database data instead of DataReader.
Use data caching on pages that access the database. If the data of the page is not updated frequently (once every few minutes), the number of connections can be greatly reduced by using cache objects to use the contents in the cache without accessing the database.
Modify the code to add a call to Dispose () after Close () wherever the Connection object is used.
It is suggested that the database operation be greatly modified, and its own database operation proxy class inherits the IDisposable interface of the system to release resources forcibly, so that the problem of insufficient connection will not occur.
The package failed to load.
Package visual web developer trident designer package (guid =
{AE E C D E F A AEFF} Please contact the software package supplier for assistance. Due to possible environmental damage, it is recommended to restart the application. Do you want to disable loading this package in the future? You can use devenv reswetskippkgs to re-enable package loading.
You will get this prompt every time you open VS.
So I looked at Google and found that many methods have been tried, and only one solution is enough.
The solution is as follows:
Set the system variable VsLogActivity=
Create the file ActivityLog xml in the% appdata% \ Microsoft \ Visual Studio \ \ folder.
Copy the file gdiplus dll from winnt \ Microsoft net \ framework \ vxxx to the program files \ visual studio \ common \ packages folder.
Run the command devenv /resetskippkgs on the command line.
Note: this problem will only appear in win, and win will not appear this problem.
User xxx\ASPNET failed to log in.
first step
Add NT AUTHORITY NetWORK SERVICE to the administrators group.
My computer > right-click > administration > local users and groups
Select group > double-click administrator > click add > click advanced > click find now > select Neork service user in the list below > click ok twice > join.
Step 2: Add the Neork service user in the enterprise manager.
Open Sql Server enterprise manager > select database instance >; Open the security node > select login > right-click the list on the right > select new login > click the button next to the name in the general tab > select the administrator group > click the member button below > select the Neork service > click the add button > click ok to return to the new login dialog box > ensure that the authentication type is windows authentication and allow access > click ok > close enterprise manager.
Third step
Rerun the asp Net program database connection string and select windows Authentication.
The above is for win, if it is win plus ASp Net users.
Cannot create/shadow copy the file when it already exists.
The solution recompiles the entire project or restarts the computer.
Unable to create environment: OCIEnvCreate returned.
Solution 1
It is mainly to give read and write permission to oracle home directory oracle\ or IUSER_ and IWAM_ to restart the computer.
Solution 2:
Open IIS- WEB properties in the home directory-change the execution permission to-scripts and executable files.
-the application pool has been changed to-MSSharePointAppPool refreshed normally.
Solution 3:
You can ignore folder permissions.
Set the ORACLE_HOME variable as follows.
Control Panel > > System > > Advanced > > Environment Variables > > System Variables >; & gt new system variable
The variable name is ORACLE_HOME.
The variable value plus the actual ORACLE_HOME path is in the registry.
Cannot connect because the target machine actively refused.
Replace all localhost:recompile with localhost after adding a reference.
The control tree into which the view state is being loaded must match the control tree used to save the view state during the previous request. For example, when adding controls dynamically, the controls added during the postback must match the type and location of the controls added during the initial request.
Just add EnableViewState= false to the page item of the page.
The call between the following methods or properties is ambiguous: method and method.
Due to implicit conversion, the compiler cannot call some form of overloaded method. The following methods can be used to correct this error.
Specify the parameters of this method without implicit conversion.
Remove all overloads of this method.
Before calling the method, cast to the correct type.
Use registration outside the application level as allowdefinition = machineapplication.
Solve the problem of right-clicking the property on the virtual directory corresponding to the website, then clicking Create a name after applying the name and filling it in casually.
【 Subdirectories don't inherit the attributes of their superiors, so set the attributes of the directory where the aspx file is located correctly 】
Unrecognized configuration section connectionStrings.
cause
The application developed with vs needs to be framed, and the silent environment in iis is the time when the node can't be recognized.
solution
The environment is upgraded to Start-Run-cmd-.
c:\ WINDOWS \ Microsoft NET \ Framework \ v \ aspnet _ regiis exe I
Timeout Expires the timeout that elapses before a connection is obtained from the pool. This may be because all pool connections are in use and the maximum pool size has been reached.
Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace for details about the error and where it originated in the code.
Exception details: system InvalidOperationException: Timeout has expired. Timeout has passed before getting connections from the pool. This may be because all pool connections are in use and the maximum pool size has been reached.
The main reason may be that
Using connection pool, a large number of sqlconnection forget to close the gate after use, resulting in serious SQL occupation. You can use the stored procedure exec sp_who to check it.
The number of connections in the connection pool is limited.
Solution:
Release the Connection pool and call the Close () method of the connection object to close the database connection.
Use try catch finally to handle database connection exception. When the database cannot be connected, an exception will be thrown and an error message will be displayed, as shown in the catch code block. In this program, no matter whether there is any abnormality, you can close the database connection through the finally block, thus saving computer resources.
Include the SqlConnection object in the using block so that the program will automatically call the Dispose () method to release the system resources occupied by the SqlConnection object without using the Close () method of the SqlConnection object.
Specifying the minimum pool size means the minimum number of connections allowed by the connection pool (default is). The following code specifies that the maximum pool size of the SqlConnection object is the minimum pool size.
Lishi Xinzhi/Article/program/net/20 13 1 1/ 1 1 1 175