I am using VS 2008, SQL Server 2008, IIS 6.0 Manager on an XP OS. I developed my very first C# project in VS 2008 and it runs correctly in VS. But now I need to publish this project on my website. This project also involves an SQL Server 2008 Adventureworks database on this same computer.
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.
Then I opened IIS6 Manager, Default Web Site, and I added a new virtual directory. I typed an alias and pointed the path to the folder containing my web application (this folder has a bin, App_Data, obj, and Properties folder in it. It also contains all of the .CS files).
Next I reviewed the MS documentation at
But this didn't help much. All I learned from this documentation was to copy the DLL to the C:\Inetpub\wwwroot[MyApp]\bin directory. Also I copied the web.config, global.asax, and default.aspx files to the C:\Inetpub\wwwroot[MyApp] directory. And then I changed the App's Properties via the IIS6 Manager as follows: Virtual Directory tab I selected new Local Path pointing to C:\Inetpub\wwwroot\AFS\bin directory instead of the native VS project directory (C:\Documents and Settings\New Owner\My Documents\Visual Studio 2008\Projects\AddFileToSQL\AddFileToSQL).
The only difference between these two directories I see is that the name of my application in VS and folders is "AddFileToSQL", but name I gave this folder under C:\Inetpub\wwwroot\ was "AFS". Does this matter?
When I navigate to my website, 192.168.2.2, it still shows me the default web page. However when I go to http://192.168.2.2/AddFileToSQL, it prompts me to enter password. Which password and is this right? And is this the correct URL to enter?
There are so many tabs and options in this IIS Properties window that I'm not sure if I configured it properly. I also see many Property options in VS 2008 for this project. Right now everything in these two Properties windows is set to default. Do I need to make any changes to any of these properties?
Yes I know I have XP. Target and development server are the same. This XP is the only machine I have. Are u sure IIS 6 only works with Server 2003? Cause I know that I'm able to configure the IIS6 Manager.
I'm not sure if it is Cassini or not, but from VS when I run this application, it does open a web browser and does what I want it to. I ran the aspnet_regiis command u suggested. It looks like maybe that was not installed cause it took a few minutes to install.
Now which URL should I go to to test this app? I opened the Properties window and it said Virtual Directory Local Path is C:\Inetpub\wwwroot\AFS\bin. Next I right-clicked this app from IIS6 Manager and chose "Browse". But this caused it to produce output: "The website declined to show this webpage". I feel like I am very close to the solution, but still not there yet. Do u have other suggestions?