[英]IIS server can not find index.aspx file - 404 error
I am developing a web application on asp.net using VS 2015 (not MVC). 我正在使用VS 2015(不是MVC)在asp.net上开发Web应用程序。 I have chosen " Project " (Not website) to create the application.
我选择了“ Project ”(不是网站)来创建应用程序。 The application is running fine in my Local machine.
该应用程序在我的本地计算机上运行良好。 I have published the website (using File system as per-compiled) and uploaded it to the server space.
我已经发布了网站(使用按编译的文件系统)并将其上传到服务器空间。 Now I am getting the flowing Error:
现在我得到了流动的错误:
The resource cannot be found. 无法找到该资源。
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. 说明:HTTP404。您正在寻找的资源(或其依赖项之一)可能已被删除,名称更改或暂时不可用。 Please review the following URL and make sure that it is spelled correctly.
请查看以下网址,并确保其拼写正确。
Requested URL: /Index.aspx 要求的网址:/Index.aspx
But the index.aspx file is there under the root. 但是index.aspx文件位于根目录下。 I am not sure why the IIS can't find the index.aspx file.
我不确定为什么IIS找不到index.aspx文件。
Is there any change needed in web.config file? web.config文件是否需要任何更改? Any clue?
有什么线索吗?
You can find the site at http://ssdm.xinksoft.com/ 您可以在http://ssdm.xinksoft.com/上找到该站点。
Thanks 谢谢
Partha Sarathi Chakraborty Partha Sarathi Chakraborty
If you look into the source code of the error message, there is this message: 如果查看错误消息的源代码,则会显示以下消息:
<!--
[FileNotFoundException]: Could not find file 'D:\INETPUB\VHOSTS\xinksoft.com\ssdm.xinksoft.com\bin\roslyn\csc.exe'.
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 'System.Web.HttpException' 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)
-->
So, the file at D:\\INETPUB\\VHOSTS\\xinksoft.com\\ssdm.xinksoft.com\\bin\\roslyn\\csc.exe
is missing. 因此,
D:\\INETPUB\\VHOSTS\\xinksoft.com\\ssdm.xinksoft.com\\bin\\roslyn\\csc.exe
中的文件。 Maybe you didn't copy the complete bin folder? 也许您没有复制完整的bin文件夹?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.