Can we add hyperlink on web deploy tool which check on my server following prerequisite?
1..Net Framework 4.5 installed or not.
2. MVC framework installed or not.
3. Connectivity to database server from Web Server.
My application is in MVC 2?
You could create a batch script to assert these things and run it from the prompt:
msdeploy.exe -preSync="myAssertions.bat" ...
the preSync command will be executed on the remote server. Note: the batch file you will execute here needs to reside on the server because as the command specifies; preSync no syncing has happened yet.
More information about the preSync provider: http://technet.microsoft.com/en-us/library/ee619740(v=ws.10).aspx
Related
I have created an ASP.NET Core 6 Web API project in VS2022, using a SQL Server database on my local laptop, everything was fine. After that I have added dockerfile and dockercompose then after when I run the project, I could see api from swagger but none of the end points are working since it gives error as
System.Exception: Cannot connect to SQL Server Browser. Ensure SQL Server Browser has been started.
I could understand that, from docker its not able to connect to my SQL Server database installed on my laptop, am I right?
Could you please guide me to how to resolve this error since, I'm new to Docker.
You might need to change the host that you're using to connect to your database to host.docker.internal as that's how the host machine should be referenced from inside of a Docker container. You can read more about that in the Docker docs here.
I'm learning how to write application in ASP.NET Core 2.0. I'm following the "code first approach" where I first create a model of my tables and then add a migration to build the database.
What is still unclear to me is how should I deploy the application to the server. I mean, I'm able to publish it to a folder and add it to the IIS on the remote machine.
But what about the database?
In details:
should I re-build the database on the server or I have to manually copy the one on the development machine?
what are the requisites for the server? I have to install any specific driver?
My connection string is:
"Server=(localdb)\\mssqllocaldb;Database=HelloWorld;Trusted_Connection=True;MultipleActiveResultSets=true"
and I'm using Visual Studio 2017.
I have an ASP.NET MVC 5 server application that works with SQL Server and that exposes some REST API for client consumption.
At the same time I have a Windows Forms application that consumes those REST services. The client application is being deployed through Click-Once.
Sometimes we make changes to the server that can break the client. It's not happening that often but it does happen from time to time.
I have been looking for a strategy to update both the client and server applications but so far I have not yet found a good one.
Ideally I'd like to do something along those lines:
Backup the database
Backup the server application
Backup the client application
Build the server application
Build the client application
Run the database migrations
Publish the server application
Publish the client application
If anything fails, rollback
Right now I'm doing all that by hand and it's tedious and prone to errors.
The migrations are being run through PowerShell using the commandlets of the EntityFramework (Database-Update)
The server and client code is being built on a dev box and published through the "Publish..." function of Visual Studio
There are many things that can go wrong.. migrations failing, timeouts during publishing, etc...
Ideally I could move the build and publish steps to one of the production boxes so that once the applications are being compiled and linked I can just copy the files over to the correct folders and restart IIS.
I would really love to get some suggestions to improve the flow and make it as automatic as possible. Cheers!
I have a website built with ASP MVC5.
Also I use Entity Framework 6 with Database First approach and edmx.
On production I already have database with a lot of data.
I'm using TeamCity for CI and would like to perform auto deployments.
I found Web Deployments and also tried to configure Publish profiles.
But 1 have some questions:
1. What about database? how to migrate, upgrade schema and data automatically? Are there any tools for that?
2. Could you describe how publish via Web Deploy works? I see connection string definition, etc. How it copies files to remote box, and how applies DB (schema, data migration?)
3. Also I configured IIS website for FTP upload deployment. How it connected with previous cases?
I have Created an application in C# and used SQL server 2012 for database. I have made the setup file for the app as well. Now I want to Install the App on the target machine.How to go? Where will i have to place the database and how to pick database from my machine? Note:I don't want to create a new database on target machine.Please Help
To deploy a C# application, follow the instruction below
install .Net Framework
Install the Sql Server
Restore the Database , How to restore SQL Server database through C# code
Run the project