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

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



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



I am developing a web application on asp.net using VS 2015 (not MVC). I have chosen "Project" (Not website) to create the application. 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. Please review the following URL and make sure that it is spelled correctly.



Requested URL: /Index.aspx



But the index.aspx file is there under the root. I am not sure why the IIS can't find the index.aspx file.



Is there any change needed in web.config file? Any clue?



You can find the site at http://ssdm.xinksoft.com/



Thanks



Partha Sarathi Chakraborty





Have you tried requesting this URL instead: /Index?
– Rafalon
Aug 10 at 13:47



/Index





@Rafalon you are correct. /index is working. But the user will type the website only without file. How could I resolve this issue... is any change in "settings.AutoRedirectMode" option in RouteConfig file is needed?
– Partha
Aug 10 at 14:12





Possible duplicate of Publish website without roslyn
– NineBerry
Aug 10 at 16:39




2 Answers
2



If you look into the source code of the error message, there is this message:


<!--
[FileNotFoundException]: Could not find file 'D:INETPUBVHOSTSxinksoft.comssdm.xinksoft.combinroslyncsc.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:INETPUBVHOSTSxinksoft.comssdm.xinksoft.combinroslyncsc.exe is missing. Maybe you didn't copy the complete bin folder?


D:INETPUBVHOSTSxinksoft.comssdm.xinksoft.combinroslyncsc.exe





Server provider does not allow .exe file in the bin folder.
– Partha
Aug 10 at 16:28





You might try the steps at stackoverflow.com/questions/32282880/… or the proposal in blogs.msdn.microsoft.com/jpsanders/2018/02/22/…
– NineBerry
Aug 10 at 16:43



In IIS Manager, you can specify the default document of your WebSite, did you declare index.aspx ?



enter image description here





Yes. I did. But the problem exists.
– Partha
Aug 10 at 14:00





Like NineBerry asked, did you copy the whole bin folder and is .net runtime installed on the server (same version than the project) ? What verson of ASP.Net are you using ?
– Zysce
Aug 10 at 14:06







By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard