Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to allow making Applications within site. #809

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

CatStarwind
Copy link

Added an apps option that allows setting a selection of folders to turn into an application when creating the web server.

Added logic to process apps option.
Added apps as an optional option.
@warrenbuckley
Copy link
Owner

Thank you for your PR @CatStarwind
Can you give me some examples on what you are trying to do and achieve so I can understand the use case a little better when testing and looking at this PR.

@CatStarwind
Copy link
Author

Using Classic ASP as an example it's essentially to replicate the following:
image

Where your project in vscode would look something like this:
image

With the apps parameter you can mirror the pathing of the IIS website on your local machine. e.g. http://localhost/SubSite1
image

Previously this would not work as the ASP within SubSite1 would not execute since it wasn't an Application site.

I also imagine this would allow #558 to be implemented in cases where your vscode project looks like this:
image

Though I haven't tested the above.

@warrenbuckley
Copy link
Owner

@CatStarwind I don't actively work on any classic ASP or even .NET Framework sites anymore to test this.
Are you able to send me a copy of a project where I can test this setup for this PR please.

@CatStarwind
Copy link
Author

Using the structure below

C:\Projects\TestSite
│   Default.asp
│   global.asa
│
└───.vscode
        iisexpress.json

Default.asp

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Test Site</title>
    </head>
    <body>
        <p>Welcome <%=Session("User")%> to <%=Application("Name")%></p>        
    </body>
</html>

global.asa

<script language="vbscript" runat="server">
	Sub Application_OnStart
		Application("Name") = "TestSite"
	End Sub

	Sub Session_OnStart
		Session("User") = "Test User"
	End Sub
</script>

.vscode/iisexpress.json

{
  "port": 12637,
  "path": "../",
  "clr": "v2.0",
  "protocol": "http",
  "url": "/TestSite",
  "apps": [
    "/TestSite"
  ]
}

Result:
image

If iisexpress.json is instead:

{
  "port": 12637,
  "path": "../",
  "clr": "v2.0",
  "protocol": "http",
  "url": "/TestSite"
}

The following erroneous result is displayed:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants