![](/img/trans.png)
[英]when i create directory it create at given path but it not shown in my web page in asp.net
[英]My Web Services page not running when i change root directory on live server asp.net
当我在实时服务器中更改项目的根目录时,我的 web 服务页面无法正常工作。
我使用的第一个目录是
https://ezitasker.com/App/Allporject.asmx
工作正常。 现在我只是将我的根目录更改为https://ezitasker.com/cp/App/Allproject.asmx
。 现在我的所有项目文件都工作正常,除了抛出错误的 asmx 文件:
无法创建类型“Time_Doctor_WebApp.App.Allproject”。
第 1 行:<%@ WebService Language="C#" Codebehind="Allproject.asmx.cs" Class="Time_Doctor_WebApp.App.Allproject" %>
源文件:/Cp/App/allproject.asmx 行:1
版本信息:Microsoft .NET 框架版本:4.0.30319; ASP.NET 版本:4.7.3690.0
代码隐藏文件是:
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Services;
namespace Time_Doctor_WebApp.App
{
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Allproject : System.Web.Services.WebService
{
[webmethod]
}
我搜索了很多东西但没有得到任何帮助。 更改为以前的根目录效果很好,但我需要在新的根目录下才能处理我的文件。
谁能帮我?
再看一下错误——问题出在 asmx 文件中:
Source File: /Cp/App/allproject.asmx Line: 1
检查 asmx 文件的第一行并确保CodeBehind="..."
仍然指向正确的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.