简体   繁体   English

为asp.net运行Web管理工具时出错

[英]Error running web administration tool for asp.net

I want to run web administration tool to set roles for different users. 我想运行Web管理工具来为不同的用户设置角色。 I have ran the IIS Express from the cmd using the following command: 我已经使用以下命令从cmd运行IIS Express:

"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. 运行命令后,IIS开始正常工作。

Next, I wanted to open web administration tool , so I typed this in the URL, 接下来,我想打开web administration tool ,所以我在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. 经过一番搜索,我发现StringUtil在其自己的文件中不可访问。 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). 因此,我完全遵循此处可用的解决方案CS0122:由于其保护级别,无法访问“ System.Configuration.StringUtil” (我尝试了第一个和第三个答案)。

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. 但是,我仍然遇到相同的编译错误,该错误指向我已经注释过的行号(989),并由上面提供的答案链接中的建议字符串值替换。

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. 似乎编译器仍然可以看到旧版本的WebAdminPage.cs ,尽管我已经对其进行了更新,保存(保存更改,我以管理员身份运行),甚至按照第一个答案的建议卸载了该项目,但仍然编译器会看到旧版本。

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. 在检查了存储在C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\ASP.NETWebAdminFiles\\App_Code我发现WebAdminPage.cs出于某种原因没有被更新,尽管我已经保存了多次更改通过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. 为了解决此问题,我单击了save as ,然后找到了.cs页,“另存为”窗口中的WebAdminPage.cs已更新(修改日期为今天),因此我已经复制了它,然后将其粘贴到C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\ASP.NETWebAdminFiles\\App_Code ,系统将询问您是否要用粘贴的新WebAdminPage.cs替换旧的WebAdminPage.cs ,单击“是”。

This solved my problem, the tool is working well now. 这解决了我的问题,该工具现在运行良好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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