Bhavesh Ghul

Bhavesh Ghul

  • 725
  • 1k
  • 54.5k

Why Can't read an image by URL path in the .Net Core 2.1 Application?

May 19 2021 3:16 PM
Hello everyone

I am facing one issue, can you please anyone help me.
I have hosted my application on the hosting server, the application is working fine but can not read an image by URL path, but I do delete or rename web.config file, then I can getting Image by URL path but the application does not work because web.config is not found in code.
so I request you, how to solve my problem, please tell me. without delete web.config file, how can get an Image by URL path.
My web.config file code :
  1. <?xml version="1.0" encoding="utf-8"?>  
  2. <configuration>  
  3.   <location path="." inheritInChildApplications="false">  
  4.     <system.webServer>  
  5.       <handlers>  
  6.         <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />  
  7.       </handlers>  
  8.       <aspNetCore processPath="dotnet" arguments=".\OldAutomotive.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />  
  9.     </system.webServer>  
  10.   </location>  
  11. </configuration>  
  12. <!--ProjectGuid: 915204f8-38ac-49d1-bb01-644141882ba5-->   
Error Image :

Thanks
Bhavesh Ghul

Answers (1)