What is the website path when migrating from VS2010 to 2017

Asked 1 years ago, Updated 1 years ago, 130 views

Migrating the website created in VS2010 to VS2017, but
During debugging, the URL of the website HogeWeb changed.

Before migration: http://localhost:60357/HogeWeb/Default.aspx
 After migration: http://localhost:60357/Default.aspx

Is there a way to make the post-migration URL the same as before?

When debugging, we use a regulatory web server.
(ASP.NET Development Server before migration, IIS Express after migration)

There are no project files on the website HogeWeb.
The solution file contains the following statements, which appear to be ignored after migration:

Project("{XXXXXX}") = "HogeWeb", "HogeWeb\" and "{XXXXXX}"
  ProjectSection (WebsiteProperties) = preProject
    TargetFrameworkMoniker= ".NETFramework, Version %3Dv4.0"
    Debug.AspNetCompiler.VirtualPath="/HogeWeb"
    Debug.AspNetCompiler.PhysicalPath="HogeWeb\"
    Debug.AspNetCompiler.TargetPath="PrecompiledWeb\HogeWeb\"
    Debug.AspNetCompiler.Updateable="true"
    Debug.AspNetCompiler.ForceOverwrite="true"
    Debug.AspNetCompiler.FixedNames="false"
    Debug.AspNetCompiler.Debug="True"
    (Omitted)
    VWDPort="60357"
  EndProjectSection
EndProject

The Project Properties page is also simple, and no virtual directory creation is displayed.

I tried the following methods, and I was hoping to find another solution.
A. Under the website HogeWeb, create the folder HogeWeb and move the aspx file.
→ I can't because I don't want to change the physical path.

B. Add the following description (★~★) to the applicationhost.config.
→ Unable to access the original URL.

<site name="HogeWeb" id="1">
    <application path="/"applicationPool="Clr4 IntegratedAppPool">
        <virtualDirectory path="/"physicalPath="C:\Users\userName\source\repos\HogeForm\HogeWeb"/>
    </application>
  ★<application path="/HogeWeb"applicationPool="Clr4 IntegratedAppPool">
        <virtualDirectory path="/"physicalPath="C:\Users\userName\source\repos\HogeForm\HogeWeb"/>
    </application>★
    <bindings>
        <binding protocol="http" bindingInformation="*:60357:localhost"/>
    </bindings>
</site>

Thank you for your cooperation.

c# visual-studio url

2022-09-30 21:29

1 Answers

For <application path="/">, you may want to specify a different physical path for <virtualDirectory>.


2022-09-30 21:29

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.