iis - Hosting an asp.net website in my computer -
i have app modifying client. app in asp.net
. have read can deploy app in 3 ways:
- xcopy deployment
- precompiled deployment
- web setup project
i go xcopy
method. have not installed visual studio have sql server installed.
coming php background, iis apache can copy files inside directory in iis , launch app in web browser or there step required able run asp.net
web app?
here complete guide to:
- install iis in windows
- install sql server express
- publish iis in visual studio
- finally, test in test environment
note: there no need install iis, enable settings. , have install sql server , visual studio.
edit:
install iis
open control panel, programs , features, turn windows features on or off.
make sure asp.net 4.5 selected under internet information services -> world wide web services -> application development features.
set asp.net framework v2.0 v4.0: press windows + r , type "inetmgr" hit enter.
in application pools pane under connections, click defaultapppool, , in actions pane click basic settings.
in edit application pool dialog box, change .net framework version .net framework v4.0.30319 , click ok.
install sql server express
download here either x64 , x86 based.
after downloading sql server run setup , click new sql server stand-alone installation. in installation wizard accept default settings.
publish iis in visual studio
run visual studio administrator right - click on vs icon.
right - click on project select publish, in publish web create new profile.
in connection tab enter localhost -> service url, default web site/yourprojectname -> site/application, http://localhost/yourprojectname -> destination url
in settings tab check exclude files app_data folder.
enter remote connection string have use connect sql server database.
check update database , click configure database updates add sql script
grant.sql
run in sql server like:
if not exists (select name sys.server_principals name = 'iis apppool\defaultapppool') begin create login [iis apppool\defaultapppool] windows default_database=[master], default_language=[us_english] end go create user [contosouniversityuser] login [iis apppool\defaultapppool] go exec sp_addrolemember 'db_owner', 'yourprojectname' go
finally click on publish.
test in environment
check project files have exits in wwwroot folder @ c:\inetpub\wwwroot\yourprojectname. run project index.aspx file , test it.
Comments
Post a Comment