How to deploy and view the Web page using J#

Started by sukishan, Jul 14, 2009, 03:44 PM

Previous topic - Next topic

sukishan

1. In Solution Explorer, right-click on the Web site name, and click Add Reference.

2. In the Add Reference window, click the Projects tab.

3. Highlight the BrowserComponent project and click OK.

Later, when you build the whole solution, the reference allows your Web page to find the component.

4. In Solution Explorer, right-click on the Web site name, and click Add New Item.

5. Click Web Configuration File, and then click OK.

The web.config file provides compilation and run-time information such as security modes.

6. In Solution Explorer, double-click on the web.config file.

7. Under <system.web>, insert the following code:


        <compilation debug="true" >
            <assemblies>
                <add assembly="BrowserComponent"/>
                </assemblies>
           
            </compilation>
The compilation debug="true" statement enables you to debug the component from the Web page. When you deploy your Web site to production, be sure to set this statement to false for better performance. The add assembly="BrowserComponent" attribute identifies the component that the Web page uses.

8. On the File menu, click Save All to store all references and project settings.

9. On the Build menu, point to Build Solution.

Both projects compile and the component deploys to the Web site's \bin directory.

10. From the Windows Start menu, point to Programs, then point to Administrative Tools, and click Internet Information Services.

11. In the Internet Information Services snap-in, right-click the BrowserComponent folder.

12. Click New, then click Virtual Directory, and then click Next.

13. On the Virtual Directory Alias window, type BrowserComponent as the Web name.

14. Click Next.

15. Click the Browse button, and highlight the Web directory path.

16. Click OK, and then click Next.

17. On the Access Permissions window, select the Executable check box to allow the BrowserControl.dll to run.

18. Click Next, and then click Finish.

The Web site is now enabled for access and you can begin running the Web page from the browser.

19. On the Visual Studio Debug menu, click Start.

20. In Solution Explorer, right-click Default.aspx, and click View in Browser.

The Web browser displays the Cape Town address as: XYZ Customer Branch Parliament Street Cape Town S. Africa.
A good beginning makes a good ending