I upload my asp.net file in webserver. First it shows
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration
Then I add <customErrors mode="Off">
in web.config file.
After that when i run it shows the following error.
Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies. The system cannot find the file specified.
I upload my projects file completely such as bin, css, js, images and forms. First time I am uploading in web server. Please tell me what should I do.
I had this exact same error while deploying an app containing application insights to production (worked on acceptance weirdly, but oh well) yesterday. Somehow the project was incorrectly configured to not copy a bunch of references (including the Microsoft.AI.Web reference).
The solution proved quite simple:
Install-Package Microsoft.ApplicationInsights.Web
This installed a new version of application insights and fixed the references. Alternatively, I would suspect that a reinstall of that package would do the same trick.
You could follow the below steps to solve the issue:
Note: The above steps would work if you have published your project as an Application under the 'Default Web Site' in IIS. In case you have publish your project as a different web site, you could try the similar steps to point it to your project and not to 'C:\inetpub\wwwroot'
You must have your reference set to "copy local" when deploying your website.
Check this answer
I get this when running my site with Target .Net Framework 4.5.2 but not when running with 4.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With