deploying asp.net source code to webserver - asp.net-3.5

i am just trying to understand the deployment build model with asp.net
i write code locally on my machine in visual studio and when i hit f5, it starts up a local webserver for all my testing.
then, i FTP all of my source code to my webserver and then hit the real URL.
my question is when does this get compiled on the webserver. is it looking at the bin/ directory of my local file that i just copied over or is it recompiling the solution and projects on the web server.

If you just drop source files (.aspx, .asmx, etc.) in the web site's directory and site is set to allow dynamic updating then each page will get compiled the first time it is accessed.

Every time you update it, it gets recompiled. In your bin folder, all you have is classes with code.

Related

Aurelia exported bundle causes a 404 from SystemJS if a source module was in a subdirectory

I'm learning Aurelia via the TypeScript / ASP.NET Core skeleton navigation app. Everything runs fine in its default state. To test the exported production bundle, I run the Gulp Export task, then publish the app via Visual Studio project publish to a local folder, then replace the published wwwroot folder with the wwwroot folder from within the "export" folder, then use dotnet from the command line to run the app.
Things break if I have any source modules in a subdirectory. For example, I moved the welcome.ts/html component files into "/src/Pages" and adjusted its route moduleId in app.ts accordingly to "./pages/welcome". The unbundled app then still runs up fine, but when I try the exported version, I get a request being made by SystemJS to http://localhost:5000/dist/pages/welcome.js which 404s (as you'd expect).
I can see the contents of the welcome component in the app-build.js file, and the config.js file within the export folder contains the expected file paths, i.e. it has "Pages/welcome...".
I have read this seemingly similar issue:
https://github.com/aurelia/bundler/issues/131
But setting depCache to false made no difference in my case. Why is SystemJS trying to load this module separately from outside of the bundle?
I was able to reproduce this error locally.
Presuming that you have a Windows environment, it will be a case-sensitivity issue.
After renaming [P]ages folder to [p]ages, bundled version works as expected.
On the filesystem there is a [P]ages/welcome.js viewmodel, but [p]ages/welcome has been defined as moduleId.
Unbundled mode: Windows filesystem is case-insensitive, which behaviour can be misleading by loading [P]ages/welcome.js correctly.
Bundled mode:
Based on file path, bundling process embeds[P]ages/welcome.js as [P]ages/welcome module.
But, according to the route config, SystemJS will be looking for [p]ages/welcome module within app-build.js.
My recommendation would be to use lowercase folder/filenames whenever it's possible.

How to deploy my project to localhost?

I'm working on a website and right now I am using FileZilla to make changes to it. Every time I make a change, I have to re-upload the file to the website through FTP and then wait for it to update online. I want to just deploy my project to localhost so I can get instant results and then just upload the whole project when it's finished. How do I do this? All I have is a set of directories with the files in them.
You really need to use a web/application server such as IIS/Apache.
For PHP projects go for WampServer/XAMPP.Easy to setup and works very well.
(maybe too obvious)
If you are working only static content based on html/css/js you can just edit and view changes directly by opening the local file in your browser and refresh each time.
Furthermore for css and html you can edit your code "live", directly into browser and see changes immidiately.
Another option is to edit files with an editor that supports ftp like notepad++, you can connect via ftp, open and edit files directly from server (like php,html,css,js) because once you save the editor will automatically upload your changes.
Heres a good explanation about notepad++ and ftp plugin.
Localserver
If you work with php (and even only with html/css) the best choise is to run a local server that rappresents a real environment in which your code will run. As said by others XAMPP is a good choise for begginers because of simple installation and management.
XAMPP download
XAMPP tutorial
Once installed put your folder inside C:/xampp/htdocs/yourCodeFolder
Run the xampp control panel and start the Apache server.
Finally navigate with your browser to: http://localhost/yourCodeFolder/

Deploy Click once as a single file?

I am looking to use click once to deploy an application for internal use, When publishing to the network share it creates several files and folders. (manifest, ApplicationFiles etc)
Is there a way to bundle this up as a single file, I do not fancy the idea of allowing other users access to the application Files folder that is created, I would rather just give them the exe and have it take care of everything else.
Does anyone have experience with this, or am I stuck with the application Folder, Application Manifest, and setup file all being in the same directory for installation.
There is not a way to package the whole application folder and files into one file, like an MSI with ClickOnce.
You could code something on your own to have a shell app that use ClickOnce and its only file would be your app compressed. The shell would download that compressed file to the client's machine and would unzip etc.
You could also InstallShield Limited Edition that comes with VS 2012/2013 in the Other Projects, Setup and Deployment but that does give you the ClickOnce easy of deployment features. You could use the InstallShield setup to be your compress file in your shell clickonce app and then just use Process.Start to launch the InstallShield setup. It should work.

Netbeans - Open remote folder/new project

I have been using Netbeans for several months now and like it a lot. I am trying to enable a way to create a project which accesses live files on my server to make changes. When I create a project using a remote source, it starts downloading all the server files to my computer. This would be just fine, except for the fact that (a) the server has a few gigs of files on it and (b) there are two of us that will be making changes on the server.
In the past, I have worked with IDEs that just open an FTP or SFTP connection and will download the file you want to edit, and then upload that file back to the server when you save it. Preferably, this is what I would like Netbeans to do.
I have tried adding a FTP folder in Windows, but Netbeans won't open it. I have tried using Swish and setting up an SFTP folder, and Netbeans won't find the Swish folder altogether.
On a side note, I understand what I am doing is horrible practice, but it is a small site and I am usually the only one working on it. I haven't worked on the website in the past several weeks and just thought it would be easier to get access directly than re-downloading the entire server's worth of code/images/videos/etc. Any help would be appreciated.
NetBeans does not support what you want to do. However, if you put your site under Subversion/Git (revision control), you could check out the content, modify it locally and push modification back remotely.
This would also help avoiding code clashes when your friends work on your website too.
Actually Netbeans supports this for php projects.
Just choose :
PHP Application from remote server
(but git is the best solution anw as it gives you version control as well but the above is useful if you want your server files to be updated when you just press ctr+s)

Zend Framework Setup on Hostmonster?

I have created a project locally using Zend Framework 1.11. I have spent a long time learning the basics of the framework from all the online tutorials I can find, and I now feel fairly comfortable using the ZF Tool and locally working on my project on WAMP. I decided it was time to upload my project and deploy it on my shared hosting server, which happens to be Hostmonster.
After uploading my project, I have been struggling to get it to function correctly on the remote host. I have successfully uploaded my Zend Framework Library and included it in my PHP.ini, and all tests show it is seen by the server.
My directory structure, which was originally created to the standard format by the ZF Tool locally on the command line, is not pointing to the same paths on the remote server, so everything was messed up when I navigated to the Project/public folder. After much more Googling, I found several posts by various bloggers related to modifying .htaccess files, etc., which resulted in all my other sites hosted on the server being disrupted.
The closest I have been able to come to re-creating my initial local site on the Hostmonster host is by:
Taking all the directories out of my "public" ZF folder, and putting them directly in the web root of my server, (public_html), and:
Changing the 'APPLICATON_PATH' of my index.php file from the ZF public folder with the path to my ZF library (changed to reflect where it is in relation to the new location).
With this (tedious) setup, I am now seeing my index view being rendered with all CSS and Javascript, but I am unable to navigate to any of the other views, and the form I have displayed via a view script is likewise not showing up, only the index view is rendered.
My Zend Framework Library is located in a directory in the web root-- public_html, with the php.ini adding it to the include path.
This is becoming very frustrating as I like a lot of the features of ZF, but the restructuring of the site is proving impossible. If anyone has instructions or experience with this setup, I would greatly appreciate it. I am also hosting multiple other sites on this server, so I'm hoping I don't have to change from the single php.ini configuration(5.3) I'm currently using or mess around with a bunch of .htaccess files.
Thanks for any help anyone may have!
I have ZF running on HM no problem. Just place your index.php and .htaccess in your public_html dir, and what I did was created a public_html/zend/library folder and in my index.php including that library to get things working.
Also what do u mean you're running other sites off this server? Are you serving the application on the root of your domain? ie in your http://domain.com/ path? or different subdomains?