I'm building a .NET MVC application which will be deployed on a Windows 2003 server. The server has a folder # c:\Website\Files which needs to be written to from the application.
How do I cope with this in my development environment so that the MSI setup file, which I will compile, will work correctly when deployed?
p.s. the folder is NOT located in a subdirectory of the application project
I found another implementation. I think this might be a obsolete question.
Related
I've been digging for hours and i haven't been able to find what i would think is a pretty common scenario.
I am attempting to deploy a Web Deploy Package to my existing Web Site\Web App via a TFS Release. The location of my existing Web Apps is mapped to a different drive. My source code on my web server is not in C:\inetpub lets say its in D:\MyFiles.
I'm open to using any TFS task to do this. It seems like my two options are:
Run Batch Script - point to myApp.deploy.cmd
WinRm IIS Web App Deployment
I've seen lots of examples of overriding the computer name via the setParamater file but I have not seen one example of how to set the target path for the package?
Again, i want to deploy a web package via a TFS release to D:\MyFiles. I've created the package and it deploys locally to c:inetpub, I would assume if I can get it to deploy to a specified Target location locally then when I run that same. CMD file from TFS release it will use that location on the deploy to server.
UPDATE:
So... this just started working. I'm not sure what the issue was but the WinRm Task didn't do the deploy on Friday but did the deploy on Monday. I'm thinking it may have been related to a FQDN for the server path? Honestly I'm not sure what fixed it or what to do with this post? The answer below by #Andy may help someone so I won't delete it. That link is a good one and it showed me how to perform IIS configuration with Web Deploy.
Thanks in advance,
Greg
Seems you are trying to change the physical path of an IIS site/app using MSDeploy.
Just try adding an additional command (appcmd) to the MSDeploy package manifest to change the physical path of the IIS site during the deployment:
<runcommand path="%windir%\system32\inetsrv\appcmd set app /app.name:"Default Web Site/app12" /[path='/'].physicalPath:C:\temp\app12" waitInterval="5000"/>
Refer to this article for details:
WebDeploy/MSDeploy Quick TIP: Change IIS Site/APP Physical Path with MSDeploy
In previous versions of .Net, there were some different methods of creating a project that could run as a console app or be installed as a service.
Things like TopShelf or other approaches like: .NET console application as Windows service
This is a nice convenience for development and later deployment. I put together a vNext console app using a similar approach to the accepted answer here: .NET console application as Windows service.
The issue is that vNext runs things in a different way. If you create output, it no longer gives you an exe to install. Instead you get a nuget package and a .cmd file that will tell dnx to host your application. The command file looks like:
dnx --appbase "$(dirname $0)" Microsoft.Framework.ApplicationHost My.vNext.Service $#
So my question is: Is there a way to install this thing as a Windows service given the new console application approach?
So as a beginner to the entire Visual Studio IDE and a beginner to F# and the F# based WebSharper, I have certain issues on the system. I use the 'Ctrl+F5' to test the application. Now what do I do if I want to package the application and deploy it on another server, say apache server? Assuming the basic example here has just the .js files and HTML files, where do I find the generated web pages and/or .js files or how do I generate them.
If you created the application using the HTML Site template you’ll find the HTML bundle in the project’s bin folder. You can deploy WebSharper applications built using this template on any server you prefer. If you used one of the Web Application templates (Sitelets, ASP.NET, …) you have the choice between Windows hosting and following these instructions to host the application using Mono on a Linux box running nginx.
When it comes to Windows hosting, AppHarbor is a great choice for deploying WebSharper apps and you can use one of these two templates which both build on AppHarbor to jumpstart your project:
WebSharperMVC
WebSharperBootstrap
I am really confused i have a directory structure as follows.
/foo/bar/project/
under project is the python environment via virtualenv.
I have two additional folders live, and beta.
Live is served via apache wsgi and beta is served using paster.
Some how the live site is serving templates from the beta directory. To make sure i wasn't losing my mind I renamed the beta directory to wtfbeta expecting the server to throw an error helping me track down what went wrong.
Nope, instead it just falls back to loading the correct template from the live directory. (after service apache2 restart).
I am really stuck here.
This issue was related to both sites using the same virtualenv.
Now that MVC 3 Tools Update has been released, that's all I see on the Web Platform Installer -- I no longer see MVC 3? Is this because the Tools Update is essentially MVC 3 PLUS enhancements to the development environment? Presumably, none of these additions are needed on a server so I thought that MVC 3 would still be offered for server installs.
So can/should I install the MVC 3 "Tools Update" from the Web Platform installer on a server?
I know this doesn't help you Decker, but it may help others:
The easiest way to get MVC on the server is by using the "Add Deployable Dependancies..." menu:
Also useful for deploying SQL CE.
You can use the installer from WebPI on the server just fine. It will detect if you don't have Visual Studio installed and will only install the runtime.
You could also try unzipping the installer file and only copying the runtime MSIs but I think that's overkill.
You could also use Web Platform Installer from the command line:
webpicmd /install /Products:MVC3Runtime /log:webpi.log /accepteula /SuppressReboot
If your servers don't have internet access, you can use the offline flag from a machine which does have access to download a copy of the required install files.
So your flow would be as follows:
Prepare Cached Version of Installers
webpicmd /Offline /Products:MVC3Runtime /log:webpi.log /Path:"%~dp0wbpiCache"
Install from cache (copy folder structure to target machine)
webpicmd /install /Products:MVC3Runtime /log:webpi.log /accepteula /SuppressReboot /XML:"%~dp0wbpiCache"
You don't need to install MVC3 on a server.
Just copy the MVC DLLs along with your projects.