Config File referencing wrong location .Net application

1

I am inheriting a .NET application. For starters I have copied the source to my machine and opened the solution with Visual Studio. Upon running the project I see the following error:

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:
Module     IIS Web Core
Notification       Unknown
Handler    Not yet determined
Error Code     0x80070003
Config Error       Cannot read configuration file
Config File    \\?\path\not\on\my\machine\web.config

The problem seems to be that the path referred to by "Config File" is not the path to the file on my machine. The path seems to be from an IIS server on which the app was deployed.

I've seen others with similar problems, but in my search I have been unable to find this reference so that I may update it.

Visual Studio (2015) itself seems to respond to changes I make in web.config, particularly when I change this <compilation debug="true" targetFramework="4.0"> from true to false.

How can I change my project set up to allow the application to run on my machine?

c#
asp.net
visual-studio-2015
asked on Stack Overflow Mar 20, 2017 by Travis Smith

1 Answer

1

I was able to fix the problem. Under the project directory there was a file .vs\config\applicationhost.config. From there I changed the physicalPath attribute on the virtualdirectory tag that referenced the wrong place.

answered on Stack Overflow Mar 20, 2017 by Travis Smith

User contributions licensed under CC BY-SA 3.0