繁体   English   中英

IIS服务器找不到index.aspx文件-404错误

[英]IIS server can not find index.aspx file - 404 error

我正在使用VS 2015(不是MVC)在asp.net上开发Web应用程序。 我选择了“ Project ”(不是网站)来创建应用程序。 该应用程序在我的本地计算机上运行良好。 我已经发布了网站(使用按编译的文件系统)并将其上传到服务器空间。 现在我得到了流动的错误:

无法找到该资源。

说明:HTTP404。您正在寻找的资源(或其依赖项之一)可能已被删除,名称更改或暂时不可用。 请查看以下网址,并确保其拼写正确。

要求的网址:/Index.aspx

但是index.aspx文件位于根目录下。 我不确定为什么IIS找不到index.aspx文件。

web.config文件是否需要任何更改? 有什么线索吗?

您可以在http://ssdm.xinksoft.com/上找到该站点。

谢谢

Partha Sarathi Chakraborty

在IIS管理器中,您可以指定WebSite的默认文档,是否声明了index.aspx?

在此处输入图片说明

如果查看错误消息的源代码,则会显示以下消息:

<!-- 
[FileNotFoundException]: Could not find file &#39;D:\INETPUB\VHOSTS\xinksoft.com\ssdm.xinksoft.com\bin\roslyn\csc.exe&#39;.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.get_CompilerName()
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.FromFileBatch(CompilerParameters options, String[] fileNames)
   at Microsoft.CodeDom.Providers.DotNetCompilerPlatform.Compiler.CompileAssemblyFromFileBatch(CompilerParameters options, String[] fileNames)
   at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile(CompilerParameters options, String[] fileNames)
   at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
   at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
   at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
   at System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
[HttpException]: Exception of type &#39;System.Web.HttpException&#39; was thrown.
   at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->

因此, D:\\INETPUB\\VHOSTS\\xinksoft.com\\ssdm.xinksoft.com\\bin\\roslyn\\csc.exe中的文件。 也许您没有复制完整的bin文件夹?

暂无
暂无

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

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