Web Connection
Virtual Directory confusion
Gravatar is a globally recognized avatar based on your email address. Virtual Directory confusion
  Rod
  All
  Oct 24, 2014 @ 07:55am
Hi All,

I was looking at the registrationless COM deployment option for my web app and I am instructed to "Create a new folder in your Web application's site and name it: webconnection.deploy". That raised a question about general site setup, something I've never been too clear about.

The way my site is set up, my site files are in wwwroot\myapp - this is everything HTML and static, images, and including scriptmap templates. I call that the "HTML directory".

Then I created an IIS virtual directory pointing to my VFP app in c:\wconnect\myapp. I call that the "APP directory" and its where all the action is, including all data and user images stored related to my app.

Does the above seem right? Or should everything go in my APP directory including all my HTML?

So when Management Console runs I'm confused about creating a Virtual Directory and where the wc.dll goes. The option "Make Scriptmap available to Virtual Only?" makes me think it goes in the APP directory. But I ignored that option because I wasn't sure, and so the wc.dll is in the root - c:\wconnect. My site works fine, but my dim understanding is that if I create another app on the same server I really need to have each wc.dll located in my...HTML or APP folder?

So finally, when I "Create a new folder in your Web application's site and name it: webconnection.deploy", is that sub my APP folder or my HTML folder?

Thanks for any advice.
Rod


Gravatar is a globally recognized avatar based on your email address. Re: Virtual Directory confusion
  Rick Strahl
  Rod
  Oct 24, 2014 @ 03:29pm
Rod,

That sounds backwards to me. The virtual is the WEB directory where all your HTML, CSS and templates live not the code folder. The app folder is just a regular folder out of which your server runs and that folder can live anywhere on the machine. For that matter the virtual can also live anywhere on your machine (it doesn't have to live in wwwroot).

I've taken to using a standard structure for Web Connection applications:

AppRootFolder
\Web
\FoxCode
\Deploy
\Tools

I then map IIS and the virtual to \Web. The \Deploy folder holds everything needed to run the app as it gets deployed - that's EXE, data files, ini and other configuration files etc. \FoxCode holds the actual source code and that's where I do my development. This may duplicate some of the files that end up in the \Deploy eventually. I might amend that to include a common \data folder if the data is large and shared by dev and live, but generally I like to keep that separate (and often you only deply data once and after that just run update scripts). So both \FoxCode and \Deploy are similar except that \Deploy only holds binaries, while \FoxCode holds the source code that I work on. When I'm ready to deploy I build the EXE and update the \Deploy folder to get it ready. At that point I also tag the build usually in source control (GIT for me) so I have something to roll back to.

Now for the registrationless COM everything has to live inside of the Virtual folder structure, so that if you push this to a host you can actually get it up there - they only allow you access to your Web directory. So in that case you copy the contents of the Deploy folder into \Web\WebConnection.Deploy. Web Connection looks there for registrationless com components.

Unfortunately the registrationless process is very, very finicky and a pain in the ass, but frankly I don't know how to make this any easier. It's just a shitty way that Windows deals with this, so the process is unfortunately unnecessarily difficult.

If and when I get around to building the next version of Web Connection, there will be a new New Project wizard that will attempt to configure these things for you up front and build the right directory structures etc. so this might become easier, but in the meantime this is all still a manual process.

+++ Rick ---

This way everything is in one place and when you deploy you can zip the whole thing


Hi All,

I was looking at the registrationless COM deployment option for my web app and I am instructed to "Create a new folder in your Web application's site and name it: webconnection.deploy". That raised a question about general site setup, something I've never been too clear about.

The way my site is set up, my site files are in wwwroot\myapp - this is everything HTML and static, images, and including scriptmap templates. I call that the "HTML directory".

Then I created an IIS virtual directory pointing to my VFP app in c:\wconnect\myapp. I call that the "APP directory" and its where all the action is, including all data and user images stored related to my app.

Does the above seem right? Or should everything go in my APP directory including all my HTML?

So when Management Console runs I'm confused about creating a Virtual Directory and where the wc.dll goes. The option "Make Scriptmap available to Virtual Only?" makes me think it goes in the APP directory. But I ignored that option because I wasn't sure, and so the wc.dll is in the root - c:\wconnect. My site works fine, but my dim understanding is that if I create another app on the same server I really need to have each wc.dll located in my...HTML or APP folder?

So finally, when I "Create a new folder in your Web application's site and name it: webconnection.deploy", is that sub my APP folder or my HTML folder?

Thanks for any advice.
Rod



Rick Strahl
West Wind Technologies

Making waves on the Web
from Maui

Gravatar is a globally recognized avatar based on your email address. Re: Virtual Directory confusion
  Rod
  Rick Strahl
  Oct 25, 2014 @ 04:23am
Thanks, Rick. That really helps.

I guess the folder I designated my "App directory" is more the data folder really, since in deployment I only have a single EXE that lives there. No code. So in effect that's my virtual, but I unnecessarily separated my HTML into the wwwroot path of my site. Which works, but I'm much more clear on things now.

So I assume if I tell the Wizard to copy the wc.dll and make it available only to Virtual it would have ended up there in my "App directory", i.e. my virtual. I misspoke before. Currently, since I skipped that step, I found the wc.dll in wwwroot\wconnect. I think that's the one its using. The only other one I see is in the /bin subfolder of my site path and it has an older date. I think the location of the wc.dll was the biggest mystery to me.

I may seek help in getting the registrationless com deployment going.

Thanks, again,
Rod


Rod,

That sounds backwards to me. The virtual is the WEB directory where all your HTML, CSS and templates live not the code folder. The app folder is just a regular folder out of which your server runs and that folder can live anywhere on the machine. For that matter the virtual can also live anywhere on your machine (it doesn't have to live in wwwroot).

I've taken to using a standard structure for Web Connection applications:

AppRootFolder
\Web
\FoxCode
\Deploy
\Tools

I then map IIS and the virtual to \Web. The \Deploy folder holds everything needed to run the app as it gets deployed - that's EXE, data files, ini and other configuration files etc. \FoxCode holds the actual source code and that's where I do my development. This may duplicate some of the files that end up in the \Deploy eventually. I might amend that to include a common \data folder if the data is large and shared by dev and live, but generally I like to keep that separate (and often you only deply data once and after that just run update scripts). So both \FoxCode and \Deploy are similar except that \Deploy only holds binaries, while \FoxCode holds the source code that I work on. When I'm ready to deploy I build the EXE and update the \Deploy folder to get it ready. At that point I also tag the build usually in source control (GIT for me) so I have something to roll back to.

Now for the registrationless COM everything has to live inside of the Virtual folder structure, so that if you push this to a host you can actually get it up there - they only allow you access to your Web directory. So in that case you copy the contents of the Deploy folder into \Web\WebConnection.Deploy. Web Connection looks there for registrationless com components.

Unfortunately the registrationless process is very, very finicky and a pain in the ass, but frankly I don't know how to make this any easier. It's just a shitty way that Windows deals with this, so the process is unfortunately unnecessarily difficult.

If and when I get around to building the next version of Web Connection, there will be a new New Project wizard that will attempt to configure these things for you up front and build the right directory structures etc. so this might become easier, but in the meantime this is all still a manual process.

+++ Rick ---

This way everything is in one place and when you deploy you can zip the whole thing


Hi All,

I was looking at the registrationless COM deployment option for my web app and I am instructed to "Create a new folder in your Web application's site and name it: webconnection.deploy". That raised a question about general site setup, something I've never been too clear about.

The way my site is set up, my site files are in wwwroot\myapp - this is everything HTML and static, images, and including scriptmap templates. I call that the "HTML directory".

Then I created an IIS virtual directory pointing to my VFP app in c:\wconnect\myapp. I call that the "APP directory" and its where all the action is, including all data and user images stored related to my app.

Does the above seem right? Or should everything go in my APP directory including all my HTML?

So when Management Console runs I'm confused about creating a Virtual Directory and where the wc.dll goes. The option "Make Scriptmap available to Virtual Only?" makes me think it goes in the APP directory. But I ignored that option because I wasn't sure, and so the wc.dll is in the root - c:\wconnect. My site works fine, but my dim understanding is that if I create another app on the same server I really need to have each wc.dll located in my...HTML or APP folder?

So finally, when I "Create a new folder in your Web application's site and name it: webconnection.deploy", is that sub my APP folder or my HTML folder?

Thanks for any advice.
Rod



© 1996-2024