I have created a batch file to start the web server (IIS Express). The site is configured to run on port 48000.
When the site has started, I get the IIS icon in the system tray and it displays the site in the list of sites available. However, I would like the batch file to open the site in the browser as well.
I tried :: START iexplore http://localhost:48000, but this line isnt opening the site.
Any ideas?
(Please select 'Mark as Answer' if my response has helped you.)
I am on a 64bit machine. I tried on a 32bit Win 7 machine and the webserver isnt even starting up. How do I keep the batch file window open. I Have Echo On but the cmd window is closing at end of batch
(Please select 'Mark as Answer' if my response has helped you.)
calibur
Member
300 Points
124 Posts
Starting IIS Express website
Jan 01, 2013 02:24 PM|LINK
Hello
I have created a batch file to start the web server (IIS Express). The site is configured to run on port 48000.
When the site has started, I get the IIS icon in the system tray and it displays the site in the list of sites available. However, I would like the batch file to open the site in the browser as well.
I tried :: START iexplore http://localhost:48000, but this line isnt opening the site.
Any ideas?
XIII
All-Star
182690 Points
23458 Posts
ASPInsiders
Moderator
MVP
Re: Starting IIS Express website
Jan 01, 2013 02:29 PM|LINK
Hi,
can you show the complete batch file please?
Grz, Krisl
Interested in Azure, ASP.NET (MVC), jQuery, WCF, EF, MS SQL, ...
Keep the forums clean: report to the moderation team!
oned_gk
All-Star
31515 Points
6433 Posts
Re: Starting IIS Express website
Jan 01, 2013 02:32 PM|LINK
calibur
Member
300 Points
124 Posts
Re: Starting IIS Express website
Jan 01, 2013 02:59 PM|LINK
@ECHO ON
REM : Install WEBPI
REM : Install PreReqs
cd %programfiles%\microsoft\web platform installer
START "" /WAIT /MIN WebPICMD.exe /Install /Products:SQLCE_4_0,IISExpress_7_5 /AcceptEULA
REM : Copy Config file into web server config
REM cd "%userprofile%\My Documents\IISExpress\config"
REM : The install files will be on the memory stick - Drive letters Important!!!
REM xcopy /y "F:\DITStudentManagerSupportFiles\applicationhost.config" "%userprofile%\My Documents\IISExpress\config"
REM : Start Web Server
START "" /MIN "%programfiles%\IIS Express\iisexpress.exe" /site:DITStudentManager
REM : Start Site
START iexplore http://localhost:48000
oned_gk
All-Star
31515 Points
6433 Posts
Re: Starting IIS Express website
Jan 01, 2013 03:08 PM|LINK
calibur
Member
300 Points
124 Posts
Re: Starting IIS Express website
Jan 01, 2013 03:32 PM|LINK
I am on a 64bit machine. I tried on a 32bit Win 7 machine and the webserver isnt even starting up. How do I keep the batch file window open. I Have Echo On but the cmd window is closing at end of batch
oned_gk
All-Star
31515 Points
6433 Posts
Re: Starting IIS Express website
Jan 01, 2013 03:36 PM|LINK
calibur
Member
300 Points
124 Posts
Re: Starting IIS Express website
Jan 01, 2013 03:40 PM|LINK
OK- no errors reported by bat file BUT - i ran the commands from the cmd line and I am getting this error:
ApplicationDefaults already assigned.
This is an issue with the ApplicationHost.config file. Not sure what default is causing the issue
calibur
Member
300 Points
124 Posts
Re: Starting IIS Express website
Jan 01, 2013 04:09 PM|LINK
OK - fixed the defaultapplication issue - and its working now on both machines.
Thanks all