简体   繁体   中英

Error running web administration tool for asp.net

I want to run web administration tool to set roles for different users. I have ran the IIS Express from the cmd using the following command:

"C:\Program Files\IIS Express\iisexpress.exe" /path:c:\windows\Microsoft.NET\Framework\v4.0.30319\ASP.NETWebAdminFiles /vpath:"/asp.netwebadminfiles" /port:8089 /clr:4.0 /ntlm 

After running the command IIS started working properly.

Next, I wanted to open web administration tool , so I typed this in the URL,

localhost:8089/asp.netwebadminfiles/default.aspx?applicationPhysicalPath=C:\Users\username\Documents\Visual Studio 2015\Projects\WebApplication2\WebApplication2\&applicationUrl=/ 

But, I got this compilation error,

CS0122: 'System.Configuration.StringUtil' is inaccessible due to its protection level

After some search, I found that StringUtil is not accessible inside its own file. So I exactly followed the solution available here, CS0122: 'System.Configuration.StringUtil' is inaccessible due to its protection level (I tried both the first and third answers).

But, still I'm getting the same compilation error which points to the line number ( 989 ), which I have already commented, and replaced with the suggested string value in the answer link provided above.

It seems that the compiler still sees the old version of WebAdminPage.cs , although I have updated it, saved it (to save the changes, I ran it as administrator), and even unloaded the project as suggested by the first answer, but still the compiler sees the old version.

Can anyone please tell me how to solve this problem?

Thanks.

After checking the files stored in C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\ASP.NETWebAdminFiles\\App_Code I found that WebAdminPage.cs is not being updated for some reason, although I've saved the changes more than once through Visual Studio.

To solve this problem, I clicked save as , then I found the .cs pages, WebAdminPage.cs in the save as window was updated (the modification date is today), so I have just copied it, then I paste it in C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\ASP.NETWebAdminFiles\\App_Code , the system will ask you if you want to replace the old WebAdminPage.cs with the new one being pasted, click yes.

This solved my problem, the tool is working well now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM