asp.net made an error while processing the configuration file required to provide the service to the request

  • 2020-05-09 18:24:04
  • OfStack

Everyone, I have encountered an error today: the program is net3.5 and all other pages can be used, except for two pages that prompt the following error:

 
 " /pdd "Server error in application.  
-------------------------------------------------------------------------------- 
 Configuration error  
 instructions :  An error occurred while processing the configuration file required to provide the service to the request. Check the specific error details below and modify the configuration file as appropriate.  
 Analyzer error message :  Use register as outside the application level  allowDefinition='MachineToApplication'  The section is wrong. If the  IIS  This error may occur if the virtual directory is not configured as an application in.  
 Source of error : 
 line  125: cookieless="false" timeout="20" /> 
 line  126: --> 
 line  127: <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120"/> 
 line  128: <!-- Role: configure  ASP.NET HTTP  Runtime Settings. This section can be declared at the computer, site, application, and subdirectory levels.  
 line  129:    Example: control the maximum size of user uploaded files 4M , the maximum time is 60 Seconds, the maximum number of requests 100 

 The source file : C:\Program Files\pdd\pro\web.config  line : 127 

Through the network query: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
 
1 And start  --  Management tool  --  Computer management ( Win2003 The location of other operating systems is similar to) open computer administration  
2 , expand the computer to manage the "services and applications" node in the left tree, then expand the "index services" node under it, and then expand the" System "Node, under which expand the" directory "node.  
3 On the right side of the computer administration we can see the configured index service directory.  
4 , right click on the "directory" node and select "new" -- "Directory"  
5 , in the "add directory" dialog box, enter through the input box  ASP.net  Temporary file directory. The default should be:  
c:\<WINDIR>\Microsoft.NET\Framework\<Version Number>\Temporary ASP.NET Files  Directory.  
<Version Number>  It means what you have to deal with .net Version.  
6 , in "included in the index?" In the options, select "no"  
7 , click the "ok" button  
8 , right click on the "index service" node and restart the index service.  
 (open with notepad  c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config 
 To find the  "processModel" In the userName="machine"  Change it to  userName="System"  )  

Still not resolved :(

In my opinion, the virtual directory in iis, net3.5, and the directory permissions are all set normally, so there should be no problem.
Is it possible that some section of web.config has been changed in the process of modifying the information in web.config?
As soon as you want to do it, find an web.config file and make sure there is no problem. Replace the web.config file in the directory. So I opened the software...

Ah! The question remains.


Searching and looking on the Internet, I came across a word "web.config must be put in the root directory." I looked again at the error indicating file "source: C:\Program Files\pdd\pro\web.config line: 127"
Oh? The wrong web.config is no longer in the root directory. When I looked at the directory, I found that there was one web.config in the root directory, and one web.config in the pro directory. The two pages I made a mistake with are in the pro directory.
Delete the web.config file in the pro directory, and the problem has been solved.


It took me a whole hour and a half to fix the mistake. Look back again, another I depressed! Just one more file, and the error is pointing to something else.


Related articles: