ASP.NET 开发 Web 服务器损坏
我有 VS 2005 和 v2.0 框架。 然后我最近安装了NDoc,它只支持v1.1,所以它在v2.0之上安装了v1.1。 这很好,因为两个版本可以共存,但它所做的是搞砸了一些设置:
a) ASP.NET 附带的 Web 服务器,您在调试模式下运行 Web 服务的服务器。
b) SQL Server 的活动 CLR 设置(但这并没有那么困扰我)
c) IIS 设置(但我通过在 2.0 中重新注册 IIS 解决了这个问题)
现在最让我烦恼的是损坏的 ASP.NET Web 服务器不允许我调试我的 Web 服务,甚至不允许同一解决方案中的另一个项目创建对其的 Web 引用。
因此,我无法在 Visual Studio 中生成代理,也无法在同一解决方案中设置对 Web 服务的 Web 引用(因为它涉及生成代理)。
请注意,我可以调用 wsdl.exe。 但我还不想部署我的服务。 我只希望同一个解决方案中的所有项目都像乖孩子一样引用 ws。
当我尝试在解决方案中创建对 WS 项目的 Web 引用时,我不断收到此错误:
“/”应用程序中的服务器错误。
解析器错误 描述:解析服务此请求所需的资源时发生错误。 请查看以下特定解析错误详细信息并适当修改您的源文件。
解析器错误消息:无法创建类型“DaWS.PhoneDirectory”。
源错误:
第 1 行:<%@ WebService Language="C#" CodeBehind="PhoneDirectory.asmx.cs" 第 2 行:Class="DaWS.PhoneDirectory" %>
源文件:/PhoneDirectory.asmx 行:2
版本信息:Microsoft .NET Framework 版本:2.0.50727.3082; ASP.NET 版本:2.0.50727.3082
这已经困扰我好几天了,我一直在 IIS 中进行部署管理。
除了重新安装Visual Studio之外,还有谁有更好的解决方案吗?
I had VS 2005 with v2.0 of the framework. Then I installed NDoc recently and that supports only v1.1, so it installed v1.1 on top of v2.0. That is fine because both versions can co-exist but what it did was screw up some settings with:
a) The web server that comes with ASP.NET, the one you run your web services on in debug mode.
b) SQL Server's active CLR settings (but this isn't bothering me as much)
c) IIS settings (but I fixed this by re-registering IIS with 2.0)
What's bothering me to the hilt now is the broken ASP.NET web server won't allow me to debug my Web services or even have another project in the same solution create a web reference to it.
I can't generate proxies in Visual Studio because of this, nor can I set a web reference to a web service in the same solution (as it involves generating a proxy).
Note that I can call wsdl.exe though. But I don't want to deploy my service yet. I just want all projects in the same solution referencing the ws like well-behaved little kids.
When I do try to create a web reference to the WS project in my solution, I keep getting this error:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not create type 'DaWS.PhoneDirectory'.
Source Error:
Line 1: <%@ WebService Language="C#" CodeBehind="PhoneDirectory.asmx.cs"
Line 2: Class="DaWS.PhoneDirectory" %>
Source File: /PhoneDirectory.asmx Line: 2
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
It's been nagging me for days now and I've been managing with deploying in IIS.
Other than re-install Visual Studio, does anyone have a better solution?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
创建一个新的 Web 服务,并且完全不要更改它。 看看是否有效。
顺便说一句,该页面显示 .NET 2.0 而不是 1.1 的事实表明版本不是问题。
Create a new web service, and do not change it at all. See if it works.
BTW, the fact that this page displays .NET 2.0 and not 1.1 suggests version is not the problem.