I have an ASP.Net project that I've been working on my local machine and I've successfully uploaded my application files from my local machine to the remote IIS server. My issue occurs when I make changes to my code through the IIS remote server, sometimes the changes that I have made do not appear or work. The way I fixed the problem was upload the updated project into the IIS server.
I've read a bunch of articles online and some people are mentioning the IIS cache or temp file that must be cleared.
Is there a way for me to establish an FTP connection from my local machine to the remote IIS server so that when I push changes it would automatically update the code?
You can publish your website by using visual studio publish tool. Which will automatically deploy code to your FTP location on publish. You just need to configure your FTP remote server. Right click your website project and click publish
Then select IIS,FTP from side nav and click publish
Then select FTP from Publish method drop down and start configuring your application and after that click on Validate Connection to test if it had connected to FTP properly and click next and complete configuration and your code will be deployed to that FTP remote server
Related
When I try to publish code using Web Deploy method I am getting the following error
ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("xxxxx.xxxxxxx.xxx.xxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started
On my server,I have web deployer 3.5 install and web management service is also running.
There is no firewall issue also.
I have restarted the web management service still no luck
If you want to publish a site on a remote server you could follow the below steps:
Go to the Start menu and right-click the cmd.exe and then select Run as Administrator.
Enter the following in the command prompt:
winrm quickconfig
winrm set winrm/config/client #{TrustedHosts="*"}
On the target server, open a command prompt as an Administrator and
enter the following:
winrm quickconfig
winrm set winrm/config/client #{TrustedHosts="IP_ADDRESS"}
where IP address is the IP address of your remote server.
make sure you installed Management service.
-after doing all the above things open iis.
carete site with a blank folder at the destination (remote server)
go back to the server from which you want to publish a site and select Publish.
On the Publish page, click the icon labeled IIS, FTP, etc.
In the Publish Method list box, select Web Deploy:
or if you want to publish as an application under any site:
no need to create site at the destination server.
enter your site name in the site name and enter your application name after /.
Regards,
Jalpa
I have an app I am modifying for a client. The app is in asp.net. I have read that I can deploy the app in three ways:
xCopy Deployment
Precompiled Deployment
Web Setup Project
I would like to go with xCopy method. I have not installed visual studio but have SQL server installed.
Coming from a PHP background, is IIS just like apache where I can copy my files inside a directory in IIS and launch the app in a web browser or is there an extra step that required to be able to run the asp.net web app?
Here is a complete guide to:
Install IIS in windows
Install SQL Server Express
Publish to IIS in Visual Studio
Finally, test in the test environment
Note: There is no need to install IIS, just enable its some settings. And you have to install SQL Server and Visual Studio.
Edit:
Install IIS
Open Control Panel, Programs and Features, Turn Windows features on or off.
Make sure that ASP.NET 4.5 is selected under Internet Information Services -> World Wide Web Services -> Application Development Features.
Set ASP.Net Framework from v2.0 to v4.0: Press Windows + R and type "inetmgr" hit enter.
In the Application Pools pane under connections, click DefaultAppPool, and then in the Actions pane click Basic Settings.
In the Edit Application Pool dialog box, change .NET Framework version to .NET Framework v4.0.30319 and click OK.
Install SQL Server Express
Download it from here either x64 and x86 based.
After downloading SQL Server run the setup and click New SQL Server stand-alone installation. In the installation wizard accept the default settings.
Publish to IIS in Visual Studio
Run Visual Studio as Administrator by Right - Click on VS icon.
Right - Click on your project select Publish, in Publish Web create new Profile.
In Connection tab enter localhost -> Service URL, Default Web Site/yourProjectName -> Site/application, http://localhost/yourProjectName -> Destination URL
In Settings tab check Exclude files from the App_Data folder.
enter Remote connection string that you have use to connect with SQL Server database.
Check Update database and click Configure database updates add sql script Grant.sql that you will run in SQL Server which is like:
IF NOT EXISTS (SELECT name FROM sys.server_principals WHERE name = 'IIS APPPOOL\DefaultAppPool')
BEGIN
CREATE LOGIN [IIS APPPOOL\DefaultAppPool]
FROM WINDOWS WITH DEFAULT_DATABASE=[master],
DEFAULT_LANGUAGE=[us_english]
END
GO
CREATE USER [ContosoUniversityUser]
FOR LOGIN [IIS APPPOOL\DefaultAppPool]
GO
EXEC sp_addrolemember 'db_owner', 'yourProjectName'
GO
Finally click on Publish.
Test in Environment
Check that your project files have exits in wwwroot folder at C:\inetpub\wwwroot\yourProjectName. Run your project index.aspx file and test it.
How to connect to remote files from Aptana Studio 3 without connecting to FTP. On rt-click I only get "Run web deployment wizard" and no other options like "Transfer files and all other options". And I am connected in connections manager.
Apparently your project is not connected. If you follow through with the "Run Web Deployment Wizard" it will ask you for your ftp credentials, etc. After that, you should be able to edit the files in the project and transfer them without bothering with the ftp information again. I think that the wizard will come up one time for each project you connect to a remote server.
I have a remote project and when I right-click, I get options for transfer of files. Your connected project should have a subfolder called "Connections" which contains all the files in the project. I wanted to upload screenshots of my project view, but I don't have the permissions yet.
How do I setup the project on the network instead of localhost? I want to setup a Remote Site, I think is the lingo
Go into visual studio
File, open website and put the website name in the box and a password to open the source.
Create a unique url name like myWebApp.mycompany.com
When I create a new website application in visual studio. When I am ready to debug Visual Studio sets all this up for me and it runs on local host automatically.
I guess in my scenario I gotta set it up manually. How do I accomplish this?
I created a new virtual directory, went through the permissions wizard and keep getting this error:
Failed to access IIS metabase.
If you are trying to deploy somewhere you can access via a windows share, it is often easier to just deploy to disk by publishing to the file system and setup the IIS bits manually. In that case, you'll need the name of the server and a share to push to.
Setting the url will be configured in IIS where you host the web app. When you are debugging in visual studio it is running a copy of the web app locally so you can test it. You shouldn't be trying to host the web app within the visual studio debugger.
To configure this you will need to set the host header for the website to myWebApp.mycompany.com. This will tell IIS that incoming requests with this domain map to this website.
I have made a web application using Visual studio 2008. till now it was running on my local host..
Now i want to load it onto the server so that it can run on my company server.
How do i do that..??
Thanks
In visual studio:
Under the Build menu, select Publish
In the publish dialog, select a location to publish your application to
ex: \\server\c$\inetpub\wwwroot
Set your publish options. I reccomend using the "Only files needed to run this application" setting
Click the Publish button
You will have to mark your deployment directory as an application in IIS for IIS to run your code. See this MSDN article for details on how to do this.
You just need to copy it into the IIS directory on that server, usually c:\inetpub\wwwroot. Make sure you have asp.net installed.
You can use the project menu and copy it to a remote server (specifically the machine that will host this project, in addition a web server). Or you can just go to the remote machine, add a new site and store the .aspx pages and all related images on the web servers inetpub\wwwroot folder.