vb.net - 无法在 localhost 上使用 vb 创建类型“myProject.Service1”
问题描述
我试图在我的 IIS 管理器中托管一个 Web 服务,但我收到了这个错误:
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.
我读到当我更改类的名称并且不在标记中更改它时会发生这种情况,但是我都改变了
Public Class Service1
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello World"
End Function
源错误状态
Line 1: <%@ WebService Language="VB" CodeBehind="Service1.asmx.vb" Class="myApp.Service1" %>
我的标记
<%@ WebService Language="VB" CodeBehind="Service1.asmx.vb" Class="myApp.Service1" %>
我所阅读的所有内容似乎都引用了不匹配的名称,但我已将所有默认设置保留为防止此问题,但我仍然遇到相同的问题。
解决方案
您需要在进行更改后构建应用程序,然后再次发布应用程序。
推荐阅读
- javascript - 如何使用 React 获取新的 Twitch API 的总游戏观众?
- laravel - 在从 infyom 生成的 yajra 数据表中显示来自连接表的 field_name 而不是 field_id
- javascript - Google Maps Uncaught TypeError: b.has is not a function
- html - 如何使用显示拆分元素:使用 DomPDF 的两页表格
- php - Arranging data from sql database with php
- matlab - MATLAB custom colormap, accessible by name of color map as string (just as default color maps are)
- generics - Kotlin:invoke() 和参数化类的问题
- python - Inputting a number and returning the product of all the even integers between 1 and that number
- excel - 仅使用公式拆分分隔列
- prooph - 如何避免使用 prooph 的事件溯源?