PDA

View Full Version : سوال: قرار دادن برنامه تحت وب در IIS



Sonia_Naghdi
یک شنبه 31 شهریور 1392, 09:46 صبح
من یه برنامه تحت وب نوشتم که بتونم آن رو توی شبکه اجرا کنم. ولی متأسفانه نمی دونم چطور آن را باید درون IIS اجرا کنم. می خوام توی ویندوز XP آن را اجرا کنم.
با استفاده از CD ویندوز نرم افزار IIS را نصب کردم. Virtual Directory را نیز ایجاد کردم. وقتی دکمه browse برای صفحات asp انتخاب می کنم به اشیاء کلاس هایی که خودم ایجاد کردم گیر می ده.
لطفاً راهنماییم کنید اگر تنظیمات خاص دیگه ایی دارد آن را انجام بدم.
و از اونجایی که در ایجاد برنامه تحت وب فرد اماتوری هستم ممکن است توی کدهای برنامه ام اشتباهی صورت گرفته باشد؟

مهدی رحیم زاده
یک شنبه 31 شهریور 1392, 13:21 عصر
با سلام خدمت شما دوست عزیز و تبریک بابت عضویتتون توی جامعه برنامه نویس
ویندوز xp برای اجرای برنامه هایی که با دات نت نوشته میشه نیاز داره که شما iis رو هم تنظیم کنید . یعنی فقط نصب کافی نیست. با یک سرچ ساده میتونید این تنظیمات رو پیدا کنید ، من کلی براتون میگم شما باید دات نت مورد نظرتون رو نصب کنید و اون رو به iis معرفی کنید ، بعد چند تا سرویس هست که باید اونا روهم استارت کنیدو تموم .البته اگر تنظیمات امنیتی و ... هم داشته باشید با خودتونه. من یک سری موارد رو براتون این پایین میزارم که مشکلی برای جست و جو هم نداشته باشید/
موفق وپیروز باشید
Initial Requirements: 1) Install the Microsoft .NET framework version 2.0 (available as free download in the official site of Microsoft).2) Your system should have Microsoft Visual Studio 2005 or higher version (you can get free download of Visual Studio express edition from Microsoft’s site).3) Do remember that you need Microsoft .NET SDK v2.0 for running the website in Visual studio (You can get this as free download from Microsoft’s site). Installing IIS: 1) Place the Windows XP Professional CD-ROM into your CD - ROM Drive.2) Open Control Panel and select ‘Add/Remove Windows Components’ from the ‘Add/Remove programs’ 3) Place a tick in the check box for 'Internet Information Services (IIS)' leaving all the default installation settings intact.4) Once the installation is complete you can remove the XP CD from the drive.5) In order to check the proper installation of IIS, open internet explorer and type 'http://localhost' in the address bar. On hitting enter, an ‘iishelp’ page will open.
6) If the page doesn’t open then there is a problem with the services.

7) To start the services, Run à Type ‘services.msc’. 8) In the services, right click ‘IIS Admin’ and select properties. In the properties, select ‘Automatic’ for the ‘Startup Type’. Click ‘apply’ and then ‘start’ (If ‘start’ is not highlighted don’t worry – it means the service has started)
9) Again in the services, right click ‘World Wide Web Publishing’ and select properties. In the properties, select ‘Automatic’ for the ‘Startup Type’. Click ‘apply’ and then click ‘start’.

10)Now type 'http://localhost' in internet explorer and check for the ‘iishelp’ page. If it opens then the IIS is working fine. Configuring IIS for the website: 1) Open command prompt (Run à cmd)2) Change the directory to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
3) Type ‘iisreset /stop’. This will stop IIS. (Make sure Visual Studio is not open while keying in this command)

4) Now type ‘aspnet_regiis -i’. Wait for the installation to complete.5) Now type ‘aspnet_regiis -c’.6) Finally type ‘iisreset /start’. This will start the IIS.7) If you find any trouble in starting the IIS then make sure that the ‘IIS Admin’ and ‘World Wide Web Publishing’ services are running correctly in ‘services.msc’.8) Now open IIS. Type ‘inetmgr’ in Run.9) Expand ‘websites’. Right click ‘Default Web Site’ and select browse. You should be able to see the ‘iishelp’ page.
10)Now copy your website(which you developed using Visual Studio) folder into the path C:\Inetpub\wwwroot

11)Now right click the ‘websites’ folder in IIS and select ‘Refresh’. Now you should be able to see your website folder under ‘Default Web Site’.
12)Now we need to add the ‘virtual directory’. To add a new ‘virtual directory’ right click on 'Default Web Site' and select 'New', followed by 'Virtual Directory', from the drop down list.

13)Next you will see the 'Virtual Directory Creation Wizard' from the first screen click the 'next' button. 14)You will then be asked to type in an 'Alias' by which you will access the virtual directory from your web browser.
15)Next you will see a 'Browse...' button, click on this to select the directory your web site pages are in on your computer(The website should be in the path C:\Inetpub\wwwroot ), after which click on the 'next' button to continue.

16)On the final part of the wizard you will see a series of boxes, if you are not worried about security then select them all, if you are and want to run ASP scripts then check the first two, followed by the 'next' button.

17)Once the virtual directory is created you can view the web pages in the folder by typing 'http://localhost/aliasName' (where 'alias Name' is, place the alias you called the virtual directory) into the address bar of your web browser.

Sonia_Naghdi
دوشنبه 01 مهر 1392, 18:54 عصر
از پاسخ جامعتون متشكرم:لبخندساده: