Reputation: 3511
I just finished my first C# project in VS 2008 and it is working well now. But now I need to publish this project on my new website. This project interacts with my SQL Server 2008 Adventureworks database on this same computer. I am running IIS 6.0, but I am a newbie to both IIS 6.0 and VS 2008.
I will use this same computer to host the website and house this database. I know HTML but not how to add a .NET project to a web site, especially one that also uses SQL Server. Can u offer me tips as to how to proceed? This is not a Windows Form Application, so I am pretty sure it is a Web Application.
I started by right-clicking the project and selecting "Convert to Web Application" and then I selected the URL for my site. But then when I went to this URL, it still shows the original image.
Next I opened the IIS console window (Admin tool), but I didn't see an option to add a new website, so instead I opened the Properties window for Default website. But even after changing the home directory here both to point to my project directory and also to point to my desired URL, when I refreshed my web browser it still shows same webpage from this URL. Do I have to close and reopen my web browser? There are so many tabs and options in this IIS console window. Can you give me step-by-step instructions of what to choose? I also see many Property options in VS 2008 for this project. Maybe I need to change something there?
Upvotes: 1
Views: 6137
Reputation: 1
You might need to create application pools on IIS, then add an application to your existing website in IIS, have it use that application pool, and and point it to the publishing folder set in VS.
Upvotes: 0
Reputation: 19368
I'd recommend starting by setting the application up on the default site (localhost) and testing it there.
To do this,
(Edited to work on IIS 6)
(above assumes you already have the .net framework installed)
The process for setting up a public website is similar, but you choose "New -> Web Site" from the "Web Sites" folder in step 3, and the interface that pops up will request a host header too. For info on host headers, dns, etc. you should look on serverfault.com.
Upvotes: 1
Reputation: 161783
Did you create this C# project by using "New Web Site" or "New Project"?
If this is a web site, then when you right-click the "project", you'll see a "Publish Web Site" command. Try that.
That's all there is to it.
Upvotes: 2