Setting Up A Website App On The Shared Network - asp.net

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.

Related

How to setup Visual Studio project FTP to a remote IIS Server?

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

How to host asp.net webapi project with the current build on IIS

I want to host my ASP.Net Web api project on IIS for local development. I have an angular UI that wants to access this API. So for this reason I don't want to run my ASP.Net project all the time, if it were running on IIS would be better. I read many articles but none of them seemed to resolve my problem.
I know how to publish my project and then host the published version of the current build but what I don't want to do is having to do a publish every time I build just to test my code.
If I am not mistaken there is an option for deploying a new version of my project with every build. Again I don't want it to be production ready, I only need it for local development to test my API.
When I was using the publish > host currently published version on IIS the application was running.
When I was configuring IIS to point to the application folder where the solution is found as well (that is what I saw in an article about configuring IIS) I got: "HTTP Error 404.0 - Not Found
The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
The solution is:
Go to IIS Manager in windows
On the left hand side of the panel, right-click -> add new website
Add a Site name that you like
Set up a Physical path, that should point to your project folder (so not where your solution is but where your ASP.Net project is)
Add a unique port that number that you make sure you are not currently using
Add a host name, and register it in the C:\Windows\System32\drivers\etc\hosts file with your local ip address

Upload ASP.net website to a hosting environment

I finish creating my website using Visual Studio 2010.. also I already have a domain name... My question is how do I publish/upload my website to my domain through the FTP server... I'm a total newbie at this and web tutorials are so complicated It makes my brain bleed...
I already tried using copy website but my website fails to appear on my domain... instead only my scripts/ ".aspx files" and resources appear on the page... in hyperlink format...
I also tried to publish the website but the same happened...
You are going to have 2 choices most likely. One is going to be some sort of ftp (or secure ftp). The other would be web deploy if the host offers it. What you want to do is publish your project to your local file system and then copy THAT output to the ftp (www) root (most likely). If you have web deploy you can also set that up in the publish settings in visual studio. Your web host should be able to provide the info you need in that case.
you need to publish your project to iis. make sure your iis is activated first in your machine, and initialize your asp framework with the iis. after all the setup are complete, then you can publish your project.

Can't start ANY ASP.NET projects

I've been trying to fix this for quite some time now, but I simply can't make any ASP.NET projects in Visual Studio Express 2012 for Web. I get this error when I start a new project:
Web application projects are currently configured to use IIS Express. To switch back to using the Visual Studio Development Server, change the development server option under the Projects and Solutions/Web Projects Category of the Options menu. Configured IIS Express failed with the following error:
Filename: redirect.config
Error: Cannot read Configuration file.
So I went on the internet to try and find others with the same error but I can't find a concrete solution to my problem. I find something similar for older versions, but it doesn't fix my problem. I do have the IIS Manager up under my Services (When you want to Manage Windows). I even made a virtual folder, but to no avail. Still doesn't work.
I want to use IIS
How do I fix this?
In Solution Explorer, right-click the name of the Web application project for which you want to specify a Web server, and then click Properties
In the Properties window, click the Web tab.
To choose the Visual Studio Development Server, under Servers, click Use Visual Studio Development Server.
To use a specific port number with the Visual Studio Development Server, select Specific port and enter the port number. By default, the Auto-assign Port option is selected, and the port number that has been assigned to your application appears
To choose IIS, under Servers, select Local IIS Web server. This option is not available if IIS is not enabled on your computer. A URL that combines localhost with the name of your Web application will automatically be created for you and appear in the Project URL box (for example, l ocalhost/WebApplication1).
To choose IIS, under Servers, select Local IIS Web server. This option is not available if IIS is not enabled on your computer. A URL that combines localhost with the name of your Web application will automatically be created for you and appear in the Project URL box (for example, loca lhost/WebApplication1).
To choose a custom Web server, select Use Custom Web Server. In the Server URL box, type the URL that Visual Studio should start when it runs the current project.
You may for example open you project file in notepad search for the string <useiisexpress>true</useiisexpress> replace it with the string <UseIIS>True</UseIIS> save and reload the project.
Make a copy of the project file first though.

Publish ASP.NET MVC 3 (Razor) app onto remote server running Windows Server 2003 with IIS 6

I have built an ASP.NET MVC 3 web application (with exlusively Razor/cshtml pages) that runs fine on my local machine with IIS Express. Now I'm trying to publish it to a remote server that is running Windows Server 2003 and IIS 6 and has just been upgraded to .NET Framework 4.0.
I was able to successfully publish all the files to the proper directory on the remote server using Visual Studio 2010's Publish dialog (Publish method: FTP), and I've followed the instructions for including all the DLLs needed to run ASP.NET MVC on a machine that doesn't have it installed, but now I'm pretty much stuck.
The first issue is that I don't have access to the remote server's IIS. I may be able to get the hosting company to add a virtual directory or change a setting, but I'm not sure they know what they're doing, and at the moment, I wouldn't know what to tell them anyway.
The second issue is that I need my web app to live inside an existing site (the web app is basically a protected members area of the main website). So, pretend the main site is http://www.foobar.com. I'd like my web app to be accessed by entering the URL http://www.foobar.com/members.
Questions
Is it possible to publish my web app without access to the remote server's IIS?
If not, what exactly do I need to tell the hosting company to add or change in IIS?
Do the settings under the Web tab of project properties affect publishing or just local debugging? At the moment, I have it set to use IIS Express, and the Project URL is "http://localhost:7373/". Do I need to change these?
Given that the remote server is running Windows Server 2003 and IIS 6.0, is it possible to use Web Deploy or am I limited to FTP?
If I can use Web Deploy, what do I put for the Service URL? All I have right now is a URL in the format of ftp://www.foobar.com/www and a username and password.
If I need to use FTP, what steps do I need to take to get the app working once the necessary files have been uploaded to ftp://www.foobar.com/www/members? I'm not worried about database, security certificates, registry, GAC, etc., I just want to know the steps necessary to get the home page of my web app to come up when I put http://www.foobar.com/members.
Have you had a look at this article by Scott Hanselman?
In addition to that article, please read the following thread on StackOverflow on pretty much the same environment as yourself.
Edit
Your first step should be to get the hosting company to set up the virtual directory with the following parameters (IIS 6):
ASP.NET Version: 4.0.30319 (or later)
Local Path: [root ftp path for main website]\Members
[ ] Script source access (unchecked)
[x] Read (checked)
[ ] Write (unchecked)
[ ] Directory browsing (unchecked)
[x] Log Visits (checked)
[x] Index this resource (checked)
Application Name: Members
Execute Permissions: Scripts only
Application Pool: ASP.NET 2.0

Resources