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 Deta

Georgi Yanakiev 0 Reputation points
2025-02-26T13:58:38.7333333+00:00

Hi Everyone, please help, I just hosted my application server to azure after testing locally. I checked my connection string and also tried logging into the DB using other ways and it is online. So, any clues what could be wrong. I don't think it is possible that sql server is only not responding to requests from an app and is available if you log in through SSMS. Below is the error I get. - 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.

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.ComponentModel.Win32Exception: The system cannot find the file specified Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ankush Raj 410 Reputation points Microsoft Employee
    2025-02-27T06:57:58.9633333+00:00

    Hi @Georgi Yanakiev

    I understand this error could be frustrating.

    Please verify the following (i assume you're using azure SQL server)

    1. verify the connection string and whether it's storing the correct credentials for logging into the sql server.
    2. make sure 'public network access' for your sql server is enabled for selected networks and your local machine IP address is added there under the firewall rules.User's image
    3. ensure this is checked in the same page at bottom.User's image
    4. Most importantly please ensure that this option is unchecked. Otherwise, no credential be it even sql admin credentials is going to work to access this sql server and you'll keep getting the same error. User's image Thanks, and regards, If the answer is helpful, please click ACCEPT ANSWER and kindly upvote it so that other people who faces similar issue may get benefitted from it. If you have any further questions about this answer, please click Comment.

  2. Georgi Yanakiev 0 Reputation points
    2025-03-04T22:31:00.87+00:00

    @ankush raj ,

    I think the problem was different. The firewall rule was set. I had to tweak the context from the app context to work correctly with the connection string.

    Regards,

    Georgi Y.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.