Create ASP.Net web app with command line

G

Guest

Hello,
I'm trying to install an ASP.Net project using the command line (SDK tools
& perhaps IIS Admin scripts?)

Does anyone know of an automatic, command-line-driven way, to creat the
ASP.Net virtual directory, essentially mimicking whatever VS.Net does when it
creates a web project?

Ideally it would be as simple as "CreateAspWebApp.bat virtualPath
PhysicalPath"

I thought something like:
cd %windir%\Microsoft.NET\Framework\v1.1.4322
Aspnet_regiis -sn W3SVC/1/ROOT/SampleApp1

would do it, but this requires that I first have a virtual directory. So
then I run this first:
cd C:\Inetpub\AdminScripts
mkwebdir -c localhost -w "Default Web Site" -v
"SampleApp1","C:\Develop\SampleApp1\"

The problem is that I still need to manually go into the IIS GUI console, go
to the web's property page, VirturalDirectory tab, and set its Execute
Permissions = "Scripts Only" (default is none) and click the "Create" button
next to the Application Name textbox.

Thanks,
Mark
 
G

Guest

Hello Juan,
Thanks for the post. I'm using IIS 5.1.
I had checked out that sight before posting here. The closest script I can
see on there is "Create an Application in a Web Directory". That script reads:

strComputer = "LocalHost"
Set objIIS = GetObject _
("IIS://" & strComputer & "/W3SVC/2142295254/root/aspnet_client_folder")
objIIS.AppCreate(False)

The problem is that I don't see where to set the physical directory of the
application source code (such as "C:\inetpub\wwwroot\myApp1").
Any advice?
Thanks,
Mark
 
G

Guest

Hey Juan,
Thanks for the link, I wouldn't have thought of that.
I explored Directory Services, and it seems pretty involved... almost too
involved.
I was hoping that because the problem was so straight-forward, that IIS 5.1
or the .Net SDK would just have a solution to it.

Thanks,
Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top