I've recently bought a VPS in which I wanna host a website. When I waana upload an ASP.Net MVC website in a normal shared hosting, I simply use the the publish option in the visual studio and the website gets automatically uploaded in the host. In the VPS which has Windows server 2012, there is a server manager which I used to create an area in the hard drive where I have to put my web file. (I put a hello world html file and it works)
My question is that, I have never manually uploaded an ASP.Net application before and I do know how exactly Visual Studio publish those ASP.Net website, so how can I manually build the website and put it in the VPS.
I used the batch build, VS made some Dlls and I don't know what to do with them .
If you call MS build from the command line in the following manner for instance:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe TestApp.csproj /p:Configuration=Release /t:Package
by specifying the target "Package" (/t:Package) you are commanding MSBUILD to package the website.
It will proceed to build and package your website into an MSDEPLOY package (specific zip file layout).
The build output from the sample build is actually very helpful and gives you clues as to where to go next, for example it tells us where it created the file:
Package "TestApp.zip" is successfully created as single file at the following location:
file:///C:/TestApp/obj/Release/Package
It also gives us a link to find out more:
To get the instructions on how to deploy the web package please visit the following link:
http://go.microsoft.com/fwlink/?LinkId=124618
Then it shows you where it created a sample .cmd file for deploying the package
Sample script for deploying this package is generated at the following location:
C:\TestApp\obj\Release\Package\TestApp.deploy.cmd
For this sample script, you can change the deploy parameters by changing the following file:
C:\TestApp\obj\Release\Package\TestApp.SetParameters.xml
Now you can customize the ".deploy.cmd" file to publish your application on your server. Edit the ".SetParameters.xml" file to setup specific parameters for your server. Login into your server, run the command file from a console that has right to publish and all should be good.
Related
how to setup 8th wall project for web ar for Mac and use our system instead of using their web editor . I want to code in my computer and test and then upload that to their console rather then coding it in their web editor .
Steps to locally develop 8thwall webAR without using 8th wall cloud editor
Create a project using 8thwall dashboard and navigate to the dashboard settings and copy the appkey.
copy this base glitch get-started project and replace the appkey with your project appkey.
Navigate back to the dashboard and authorize your browser with the help of the dev-token.
You are ready to now use and test 8thwall development locally.
You can later self-host the project instead of copy pasting the code and reformatting according to the 8thwall cloud editor.
You can also directly remix any of the glitch projects as well which is a much quicker option.
NOTE: The glitch projects are under-maintained hence refer docs for latest SDK version as well as syntax changes
You can develop locally by choosing self-hosted project option with 8thwall, then downloading 8thwall's own web repository to tinker with. I struggled with the 8thwall docs to figure this out but the web repository makes locally development pretty straight-forward.
Follow the steps on the getting started guide ,
firstly you'll need to create an 8thwall account and self-hosted project.
Copy your unique App Key from the project settings page.
Clone the source code from the repo, replacing the app key in index.html file with your own app key (this lives in the header of the html file) :
<script async src="//apps.8thwall.com/xrweb?appKey=insert-your-key-here"></script>
8thwall included a serve script, which serves your source code on local network over https. This means you can add your local URL as a trusted domain in your self-hosted project settings for testing.
you'll need to ensure Node.js and npm are installed to run the script
Using the serve script depends on your computer, (there's instructions here for Windows also) but for the case of Mac, open a terminal in your project directory :
cd <to_this_serve_directory>
npm install
cd ..
./serve/bin/serve -d <sample_project_location>
I use Node version 16.16.0 as I had issues with my current node version 18.12.1. You can get Node version manager npm package to help manage your Node versions.
What's great about this is when you run the serve script from your terminal, this generates a QR code so you can test your app on a mobile device over local network. Make sure you copy the entire Listening URL into your browser, including the port number. e.g. https://245.678.0.11:8080
Final thing to mention, don't include the port number in your trusted domains URL. e.g. https://245.678.0.11
When I use the Web Deploy Package publish method to publish a ASP.NET MVC website in Visual Studio 2019, the package contains multiple references to my computer and personal folder paths.
For example, the systemInfo.xml file contains:
<systemInfo osVersion="6.3" winDir="C:\windows" machineName="[***MYCOMUTERNAME***]" processorArchitecture="x86" msdeployVersion="1.0" buildVersion="7.1.2606.1250">
And the *.sourceManifest.xml file contains:
<IisApp path="C:\Users\[***MYUSERNAME***]\Source\Repos\myproject\obj\x64\Release\Package\PackageTmp" />
The package still works, but if I want to use this package to distribute the software, how can I build it so that it does not contain personal information?
Web deploy packag always contain the physical path of your project and machine name automatically no matter you generate package from VS or webdeploy. So if you need to hide [MYUSERNAME], please move your project to another path which doesn't contain username.
web deploy package can be pushed remotely so you don't have to worry about the machine name.https://learn.microsoft.com/en-us/previous-versions/aspnet/ff356104(v%3Dvs.110). If you don't want to expose the machine name, you can edit system.info manually.
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
I build the app using Visual Studio and already publish it to Azure Services.
However, when trying to run it, I got the following error:
Could not load file or assembly 'RandomColorGenerator.Forms' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I looked into the bin folder in my local project and I can see the dll file just right.
Any suggestions?
According to your description, your MVC project could work on your development environment, but when deployed to Azure Web App, you got the above error. Per my understanding, you could follow the possible approaches below to troubleshoot this issue:
Use KUDU which is an analysis tool for Azure Web Apps, click on the "Debug console > CMD", then check your deployed web content under D:\home\site\wwwroot\. Make sure the missing dll has been deployed to Azure Web App successfully.
You could try to create a new web app for deploying your MVC project, in order to isolate this issue.
Additionally, you could try to empty your deployed web content via KUDU or redeploy your project by select "Delete all existing files prior to publish" under the "Setting > File Publish Options" of VS publish wizard.
UPDATE:
Based on your comment, you are using Azure Cloud Services. You could enable Remote Desktop and re-publish your application, then remote to your cloud services for troubleshooting this issue. Here is a similar issue, you could refer to it.
An attempt was made to load a program with an incorrect format.
As I known, the above message means that there be a 32-bit or 64-bit
platform conflict. For more details, you could refer to this similar issue.
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