473,412 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Create ASP.Net web app with command line

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

Nov 19 '05 #1
4 4469
You didn't mention whether you're
using IIS 5.x of IIS 6.0, but at this page :
http://www.microsoft.com/technet/scr...s/default.mspx

youll find sample scripts to do what
you want to do in both versions.

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
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

Nov 19 '05 #2
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

"Juan T. Llibre" wrote:
You didn't mention whether you're
using IIS 5.x of IIS 6.0, but at this page :
http://www.microsoft.com/technet/scr...s/default.mspx

youll find sample scripts to do what
you want to do in both versions.

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
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


Nov 19 '05 #3
In IIS 6, there's %SystemRoot%\System32\IIsVdir.vbs
and %SystemRoot%\System32\IIsWeb.vbs which let
you do it.

I don't know if there's scripts for IIS 5.x which do that.

You could try using System.DirectoryServices.
http://msdn.microsoft.com/library/de...ryservices.asp

There's an example in C# there.

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
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

"Juan T. Llibre" wrote:
You didn't mention whether you're
using IIS 5.x of IIS 6.0, but at this page :
http://www.microsoft.com/technet/scr...s/default.mspx

youll find sample scripts to do what
you want to do in both versions.

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
> 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
>


Nov 19 '05 #4
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

"Juan T. Llibre" wrote:
In IIS 6, there's %SystemRoot%\System32\IIsVdir.vbs
and %SystemRoot%\System32\IIsWeb.vbs which let
you do it.

I don't know if there's scripts for IIS 5.x which do that.

You could try using System.DirectoryServices.
http://msdn.microsoft.com/library/de...ryservices.asp

There's an example in C# there.

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
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

"Juan T. Llibre" wrote:
You didn't mention whether you're
using IIS 5.x of IIS 6.0, but at this page :
http://www.microsoft.com/technet/scr...s/default.mspx

youll find sample scripts to do what
you want to do in both versions.

Juan T. Llibre
ASP.NET MVP
===========
"Mark" <Ma**@discussions.microsoft.com> wrote in message
news:A6**********************************@microsof t.com...
> 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
>


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: RL | last post by:
Hello Perl gurus, 1. I have a web page where I can push a button (dospawn.html). 2. This button calls a CGI script (spawnboss.cgi) 3. spawnboss.cgi calls a forking perl script (forkme.pl) 4....
9
by: jab | last post by:
Je veux lier (join) une table qui se trouve dans une database avec une qui se trouve dans une autre database. Les 2 databases sont sur le même serveur en l'occurence DB2/NT 7.2.9. J'ai créé un...
10
by: Zack Sessions | last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command and ADO.NET? If so, is there a trick in trapping a SQL error when trying to create the view? I have a VB.NET app that, amoung...
3
by: Conrad | last post by:
Hi, it seems that I have the following issue when trying to create a symbolic link within a script: FROM COMMAND LINE: The owner is set to myself. Thus, it works. FROM WEB PAGE: It doesn't...
37
by: Steven Bethard | last post by:
The PEP below should be mostly self explanatory. I'll try to keep the most updated versions available at: http://ucsu.colorado.edu/~bethard/py/pep_create_statement.txt...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
4
by: JohnnyDeep | last post by:
I am trying to create a store proc that contain a create index with the cluster option and I receive DB21034E The command was processed as an SQL statement because it was not a valid Command...
3
by: Rahul B | last post by:
Hi, I have a user UCLDEV1 which is a part of staff and a group(db2schemagrp1) to which i have not given any permissions. The authorizations of that user are shown as db2 =get authorizations...
1
by: henrymania | last post by:
Am writing a code for database backup....by backupservlet is as given below i get the following exception
6
by: Alvin SIU | last post by:
Hi all, I have a table in Db2 v8 like this: Team Name Role ------ -------- --------------------- A Superman Leader A Batman Member A WonderWoman Member B ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.