Using appcmd to migrate to wwwroot

Using appcmd to migrate to wwwroot

am 18.01.2008 05:33:58 von Patrice

I copied all of the ASP.NET folders and files from wwwroot\mke1 on an XP Pro
machine and I put all of the copies into wwwroot on a Vista machine running
IIS7. The web site will not just load and I learn I have to run appcmd to
migrate to IIS7. I learned about using the following command...

%systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
Site/YourApp"

I think I know what /YourApp implies but I don't know what I should really
do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to
modify the Default Web Site.

Running appcmd with "Default Web Site" as the argument fails with
message:Cannot find APP object with identifier "Default Web Site"

Re: Using appcmd to migrate to wwwroot

am 18.01.2008 10:33:20 von David Wang

On Jan 17, 8:33=A0pm, "clintonG" wrote:
> I copied all of the ASP.NET folders and files from wwwroot\mke1 on an XP P=
ro
> machine and I put all of the copies into wwwroot on a Vista machine runnin=
g
> IIS7. The web site will not just load and I learn I have to run appcmd to
> migrate to IIS7. I learned about using the following command...
>
> %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
> Site/YourApp"
>
> I think I know what /YourApp implies but I don't know what I should really=

> do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to
> modify the Default Web Site.
>
> Running appcmd with "Default Web Site" as the argument fails with
> message:Cannot find APP object with identifier "Default Web Site"


Unless you use custom httpHandlers or httpModules, you won't need to
run the migration.

Configure things identically and it should work -- as one would
expect.

And even when it doesn't, the custom error tells you exactly what you
need to do to migrate.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Using appcmd to migrate to wwwroot

am 18.01.2008 20:34:50 von Patrice

"David Wang" wrote in message
news:79603765-3b3c-4733-99b8-7d206d0e7f99@u10g2000prn.google groups.com...
On Jan 17, 8:33 pm, "clintonG" wrote:
> I copied all of the ASP.NET folders and files from wwwroot\mke1 on an XP
> Pro
> machine and I put all of the copies into wwwroot on a Vista machine
> running
> IIS7. The web site will not just load and I learn I have to run appcmd to
> migrate to IIS7. I learned about using the following command...
>
> %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
> Site/YourApp"
>
> I think I know what /YourApp implies but I don't know what I should really
> do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to
> modify the Default Web Site.
>
> Running appcmd with "Default Web Site" as the argument fails with
> message:Cannot find APP object with identifier "Default Web Site"


Unless you use custom httpHandlers or httpModules, you won't need to
run the migration.

Configure things identically and it should work -- as one would
expect.

And even when it doesn't, the custom error tells you exactly what you
need to do to migrate.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Thanks for your comments David but I'm not "getting it" as I thought the
Default Website was configured as an application already and as I said the
error message does not really help me understand what to do.

> Running appcmd with "Default Web Site" as the argument fails with
> message:Cannot find APP object with identifier "Default Web Site"

What is the APP object and how can I resolve this?

Re: Using appcmd to migrate to wwwroot

am 19.01.2008 09:33:29 von David Wang

On Jan 18, 11:34=A0am, "clintonG" wrote:
> "David Wang" wrote in message
>
> news:79603765-3b3c-4733-99b8-7d206d0e7f99@u10g2000prn.google groups.com...
> On Jan 17, 8:33 pm, "clintonG" wrote:
>
>
>
>
>
> > I copied all of the ASP.NET folders and files from wwwroot\mke1 on an XP=

> > Pro
> > machine and I put all of the copies into wwwroot on a Vista machine
> > running
> > IIS7. The web site will not just load and I learn I have to run appcmd t=
o
> > migrate to IIS7. I learned about using the following command...
>
> > %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
> > Site/YourApp"
>
> > I think I know what /YourApp implies but I don't know what I should real=
ly
> > do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to
> > modify the Default Web Site.
>
> > Running appcmd with "Default Web Site" as the argument fails with
> > message:Cannot find APP object with identifier "Default Web Site"
>
> Unless you use custom httpHandlers or httpModules, you won't need to
> run the migration.
>
> Configure things identically and it should work -- as one would
> expect.
>
> And even when it doesn't, the custom error tells you exactly what you
> need to do to migrate.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //
>
> Thanks for your comments David but I'm not "getting it" as I thought the
> Default Website was configured as an application already and as I said the=

> error message does not really help me understand what to do.
>
> > Running appcmd with "Default Web Site" as the argument fails with
> > message:Cannot find APP object with identifier "Default Web Site"
>
> What is the APP object and how can I resolve this?- Hide quoted text -
>
> - Show quoted text -


You resolve this by copying your files to wwwroot\
[AppNameOfYourChoice], create an Application in IIS7 under wwwroot
that points to wwwroot\[AppNameOfYourChoice].


Your problem is that you tried to do two things at once and did both
incorrectly..

You tried to rename things during the migration by moving from wwwroot
\mke1 to wwwroot and also renamed the URL namespace to "Default Web
Site" instead of "Default Web Site/YourApp". I suspect that you wanted
to "move" your webapp to be the root of a website and accessed as
http://MyWebsite instead of http://MyWebsite/MyApp

The error tells you exactly what to do and what is possible. "Default
Web Site" is not an application. Thus, your attempts to move your app
there are invalid -- no matter what you think.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Using appcmd to migrate to wwwroot

am 20.01.2008 18:19:06 von Patrice

"David Wang" wrote in message
news:d5646fa5-a004-4bd3-9c72-47cba92ea577@i7g2000prf.googleg roups.com...
On Jan 18, 11:34 am, "clintonG" wrote:
> "David Wang" wrote in message
>
> news:79603765-3b3c-4733-99b8-7d206d0e7f99@u10g2000prn.google groups.com...
> On Jan 17, 8:33 pm, "clintonG" wrote:
>
>
>
>
>
> > I copied all of the ASP.NET folders and files from wwwroot\mke1 on an XP
> > Pro
> > machine and I put all of the copies into wwwroot on a Vista machine
> > running
> > IIS7. The web site will not just load and I learn I have to run appcmd
> > to
> > migrate to IIS7. I learned about using the following command...
>
> > %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
> > Site/YourApp"
>
> > I think I know what /YourApp implies but I don't know what I should
> > really
> > do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to
> > modify the Default Web Site.
>
> > Running appcmd with "Default Web Site" as the argument fails with
> > message:Cannot find APP object with identifier "Default Web Site"
>
> Unless you use custom httpHandlers or httpModules, you won't need to
> run the migration.
>
> Configure things identically and it should work -- as one would
> expect.
>
> And even when it doesn't, the custom error tells you exactly what you
> need to do to migrate.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //
>
> Thanks for your comments David but I'm not "getting it" as I thought the
> Default Website was configured as an application already and as I said the
> error message does not really help me understand what to do.
>
> > Running appcmd with "Default Web Site" as the argument fails with
> > message:Cannot find APP object with identifier "Default Web Site"
>
> What is the APP object and how can I resolve this?- Hide quoted text -
>
> - Show quoted text -


You resolve this by copying your files to wwwroot\
[AppNameOfYourChoice], create an Application in IIS7 under wwwroot
that points to wwwroot\[AppNameOfYourChoice].


Your problem is that you tried to do two things at once and did both
incorrectly..

You tried to rename things during the migration by moving from wwwroot
\mke1 to wwwroot and also renamed the URL namespace to "Default Web
Site" instead of "Default Web Site/YourApp". I suspect that you wanted
to "move" your webapp to be the root of a website and accessed as
http://MyWebsite instead of http://MyWebsite/MyApp

The error tells you exactly what to do and what is possible. "Default
Web Site" is not an application. Thus, your attempts to move your app
there are invalid -- no matter what you think.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

You are correct David, I did want to move my "webapp" into the root of the
Default Web Site and access it as http://MyWebsite instead of
http://MyWebsite/MyApp and that's exactly what I have done and running right
now.

On XP I was running a .NET 2.0 web site as wwwroot/MyWebsite and I simply
copied all of the folders and files from wwwroot/MyWebsite on the XP machine
and put them into wwwroot on the new Vista machine running IIS7. I access
that Default Web Site from anywhere on the LAN using the Computer Name
(NetBIOS) so I can test in various browsers. I open the web site in Visual
Studio 2008 for development.

But I still don't understand the difference between a web site and an
application.

Re: Using appcmd to migrate to wwwroot

am 20.01.2008 18:29:57 von Patrice

"David Wang" wrote in message
news:d5646fa5-a004-4bd3-9c72-47cba92ea577@i7g2000prf.googleg roups.com...
On Jan 18, 11:34 am, "clintonG" wrote:
> "David Wang" wrote in message
>
> news:79603765-3b3c-4733-99b8-7d206d0e7f99@u10g2000prn.google groups.com...
> On Jan 17, 8:33 pm, "clintonG" wrote:
>
>
>
>
>
> > I copied all of the ASP.NET folders and files from wwwroot\mke1 on an XP
> > Pro
> > machine and I put all of the copies into wwwroot on a Vista machine
> > running
> > IIS7. The web site will not just load and I learn I have to run appcmd
> > to
> > migrate to IIS7. I learned about using the following command...
>
> > %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
> > Site/YourApp"
>
> > I think I know what /YourApp implies but I don't know what I should
> > really
> > do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to
> > modify the Default Web Site.
>
> > Running appcmd with "Default Web Site" as the argument fails with
> > message:Cannot find APP object with identifier "Default Web Site"
>
> Unless you use custom httpHandlers or httpModules, you won't need to
> run the migration.
>
> Configure things identically and it should work -- as one would
> expect.
>
> And even when it doesn't, the custom error tells you exactly what you
> need to do to migrate.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //
>
> Thanks for your comments David but I'm not "getting it" as I thought the
> Default Website was configured as an application already and as I said the
> error message does not really help me understand what to do.
>
> > Running appcmd with "Default Web Site" as the argument fails with
> > message:Cannot find APP object with identifier "Default Web Site"
>
> What is the APP object and how can I resolve this?- Hide quoted text -
>
> - Show quoted text -


You resolve this by copying your files to wwwroot\
[AppNameOfYourChoice], create an Application in IIS7 under wwwroot
that points to wwwroot\[AppNameOfYourChoice].


Your problem is that you tried to do two things at once and did both
incorrectly..

You tried to rename things during the migration by moving from wwwroot
\mke1 to wwwroot and also renamed the URL namespace to "Default Web
Site" instead of "Default Web Site/YourApp". I suspect that you wanted
to "move" your webapp to be the root of a website and accessed as
http://MyWebsite instead of http://MyWebsite/MyApp

The error tells you exactly what to do and what is possible. "Default
Web Site" is not an application. Thus, your attempts to move your app
there are invalid -- no matter what you think.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

You are correct David, I did want to move my "webapp" into the root of the
Default Web Site and access it as http://MyWebsite instead of
http://MyWebsite/MyApp and that's exactly what I have done and running right
now.

On XP I was running a .NET 2.0 web site as wwwroot/MyWebsite and I simply
copied all of the folders and files from wwwroot/MyWebsite on the XP machine
and put them into wwwroot on the new Vista machine running IIS7. I access
that Default Web Site from anywhere on the LAN using the Computer Name
(NetBIOS) so I can test in various browsers. I open the web site in Visual
Studio 2008 for development.

But I still don't understand the difference between a web site and an
application.

P.S. I had to comment out the httpHandlers and httpModules etc. from the
web.config file before I "migrated". Now I must learn to rewrite the new
sections in web.config so I can continue to run using the DefaultAppPool.

Re: Using appcmd to migrate to wwwroot

am 21.01.2008 09:58:59 von David Wang

On Jan 20, 9:29=A0am, "clintonG" wrote:
> "David Wang" wrote in message
>
> news:d5646fa5-a004-4bd3-9c72-47cba92ea577@i7g2000prf.googleg roups.com...
> On Jan 18, 11:34 am, "clintonG" wrote:
>
>
>
>
>
> > "David Wang" wrote in message
>
> >news:79603765-3b3c-4733-99b8-7d206d0e7f99@u10g2000prn.googl egroups.com...=

> > On Jan 17, 8:33 pm, "clintonG" wrote:
>
> > > I copied all of the ASP.NET folders and files from wwwroot\mke1 on an =
XP
> > > Pro
> > > machine and I put all of the copies into wwwroot on a Vista machine
> > > running
> > > IIS7. The web site will not just load and I learn I have to run appcmd=

> > > to
> > > migrate to IIS7. I learned about using the following command...
>
> > > %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
> > > Site/YourApp"
>
> > > I think I know what /YourApp implies but I don't know what I should
> > > really
> > > do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to=

> > > modify the Default Web Site.
>
> > > Running appcmd with "Default Web Site" as the argument fails with
> > > message:Cannot find APP object with identifier "Default Web Site"
>
> > Unless you use custom httpHandlers or httpModules, you won't need to
> > run the migration.
>
> > Configure things identically and it should work -- as one would
> > expect.
>
> > And even when it doesn't, the custom error tells you exactly what you
> > need to do to migrate.
>
> > //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> > //
>
> > Thanks for your comments David but I'm not "getting it" as I thought the=

> > Default Website was configured as an application already and as I said t=
he
> > error message does not really help me understand what to do.
>
> > > Running appcmd with "Default Web Site" as the argument fails with
> > > message:Cannot find APP object with identifier "Default Web Site"
>
> > What is the APP object and how can I resolve this?- Hide quoted text -
>
> > - Show quoted text -
>
> You resolve this by copying your files to wwwroot\
> [AppNameOfYourChoice], create an Application in IIS7 under wwwroot
> that points to wwwroot\[AppNameOfYourChoice].
>
> Your problem is that you tried to do two things at once and did both
> incorrectly..
>
> You tried to rename things during the migration by moving from wwwroot
> \mke1 to wwwroot and also renamed the URL namespace to "Default Web
> Site" instead of "Default Web Site/YourApp". I suspect that you wanted
> to "move" your webapp to be the root of a website and accessed ashttp://My=
Websiteinstead ofhttp://MyWebsite/MyApp
>
> The error tells you exactly what to do and what is possible. "Default
> Web Site" is not an application. Thus, your attempts to move your app
> there are invalid -- no matter what you think.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //
>
> You are correct David, I did want to move my "webapp" into the root of the=

> Default Web Site and access it ashttp://MyWebsiteinstead ofhttp://MyWebsit=
e/MyAppand that's exactly what I have done and running right
> now.
>
> On XP I was running a .NET 2.0 web site as wwwroot/MyWebsite and I simply
> copied all of the folders and files from wwwroot/MyWebsite on the XP machi=
ne
> and put them into wwwroot on the new Vista machine running IIS7. I access
> that Default Web Site from anywhere on the LAN using the Computer Name
> (NetBIOS) so I can test in various browsers. I open the web site in Visual=

> Studio 2008 for development.
>
> But I still don't understand the difference between a web site and an
> application.
>
> P.S. I had to comment out the httpHandlers and httpModules etc. from the
> web.config file before I "migrated". Now I must learn to rewrite the new
> sections in web.config so I can continue to run using the DefaultAppPool.-=
Hide quoted text -
>
> - Show quoted text -


A website is just a mapping between a IP:Port:Hostname tuple and a
"root directory" mapped to "/" in the virtual URL namespace.

An "application" is a very overloaded term which to IIS means
"something in the URL namespace". Since "root directory" maps to "/"
and an application is something in the URL namespace, you can say that
all websites have a root URL and hence at least one application at
that URL.

Of course, depending on the software you are using, they may have
different terminology or even reuse the exact same name but different
meaning (for example, I have heard of the terms "Virtual Servers"
referencing IIS Websites, and "Virtual Directory" nearly synonymous
with "Web Application", and so on).

ASP.Net never allowed its own "Web Application" to be in the / "root
directory" (and Visual Studio didn't allow it, either - perhaps it
does now). However, it is possible to just put ASPX pages and
web.config files in the root directory and IIS will execute it like
anything else. However, it is also possible to run ASPX pages that
don't work in the root directory when you move it -- I have seen
plenty of Web Applications that don't move and plenty of Web
Applications that can move. In short, anything goes -- it all depends
on the application.

I just stick with the basics and the rules that never change.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Re: Using appcmd to migrate to wwwroot

am 21.01.2008 18:43:39 von Patrice

"David Wang" wrote in message
news:0321613c-c4c9-4aa2-82b8-17d76ebf9c19@v17g2000hsa.google groups.com...
On Jan 20, 9:29 am, "clintonG" wrote:
> "David Wang" wrote in message
>
> news:d5646fa5-a004-4bd3-9c72-47cba92ea577@i7g2000prf.googleg roups.com...
> On Jan 18, 11:34 am, "clintonG" wrote:
>
>
>
>
>
> > "David Wang" wrote in message
>
> >news:79603765-3b3c-4733-99b8-7d206d0e7f99@u10g2000prn.googl egroups.com...
> > On Jan 17, 8:33 pm, "clintonG" wrote:
>
> > > I copied all of the ASP.NET folders and files from wwwroot\mke1 on an
> > > XP
> > > Pro
> > > machine and I put all of the copies into wwwroot on a Vista machine
> > > running
> > > IIS7. The web site will not just load and I learn I have to run appcmd
> > > to
> > > migrate to IIS7. I learned about using the following command...
>
> > > %systemroot%\system32\inetsrv\APPCMD.EXE migrate config "Default Web
> > > Site/YourApp"
>
> > > I think I know what /YourApp implies but I don't know what I should
> > > really
> > > do here. I'm a bit paranoid about using the new IIS Manager in IIS7 to
> > > modify the Default Web Site.
>
> > > Running appcmd with "Default Web Site" as the argument fails with
> > > message:Cannot find APP object with identifier "Default Web Site"
>
> > Unless you use custom httpHandlers or httpModules, you won't need to
> > run the migration.
>
> > Configure things identically and it should work -- as one would
> > expect.
>
> > And even when it doesn't, the custom error tells you exactly what you
> > need to do to migrate.
>
> > //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> > //
>
> > Thanks for your comments David but I'm not "getting it" as I thought the
> > Default Website was configured as an application already and as I said
> > the
> > error message does not really help me understand what to do.
>
> > > Running appcmd with "Default Web Site" as the argument fails with
> > > message:Cannot find APP object with identifier "Default Web Site"
>
> > What is the APP object and how can I resolve this?- Hide quoted text -
>
> > - Show quoted text -
>
> You resolve this by copying your files to wwwroot\
> [AppNameOfYourChoice], create an Application in IIS7 under wwwroot
> that points to wwwroot\[AppNameOfYourChoice].
>
> Your problem is that you tried to do two things at once and did both
> incorrectly..
>
> You tried to rename things during the migration by moving from wwwroot
> \mke1 to wwwroot and also renamed the URL namespace to "Default Web
> Site" instead of "Default Web Site/YourApp". I suspect that you wanted
> to "move" your webapp to be the root of a website and accessed
> ashttp://MyWebsiteinstead ofhttp://MyWebsite/MyApp
>
> The error tells you exactly what to do and what is possible. "Default
> Web Site" is not an application. Thus, your attempts to move your app
> there are invalid -- no matter what you think.
>
> //Davidhttp://w3-4u.blogspot.comhttp://blogs.msdn.com/David. Wang
> //
>
> You are correct David, I did want to move my "webapp" into the root of the
> Default Web Site and access it ashttp://MyWebsiteinstead
> ofhttp://MyWebsite/MyAppand that's exactly what I have done and running
> right
> now.
>
> On XP I was running a .NET 2.0 web site as wwwroot/MyWebsite and I simply
> copied all of the folders and files from wwwroot/MyWebsite on the XP
> machine
> and put them into wwwroot on the new Vista machine running IIS7. I access
> that Default Web Site from anywhere on the LAN using the Computer Name
> (NetBIOS) so I can test in various browsers. I open the web site in Visual
> Studio 2008 for development.
>
> But I still don't understand the difference between a web site and an
> application.
>
> P.S. I had to comment out the httpHandlers and httpModules etc. from the
> web.config file before I "migrated". Now I must learn to rewrite the new
> sections in web.config so I can continue to run using the DefaultAppPool.-
> Hide quoted text -
>
> - Show quoted text -


A website is just a mapping between a IP:Port:Hostname tuple and a
"root directory" mapped to "/" in the virtual URL namespace.

An "application" is a very overloaded term which to IIS means
"something in the URL namespace". Since "root directory" maps to "/"
and an application is something in the URL namespace, you can say that
all websites have a root URL and hence at least one application at
that URL.

Of course, depending on the software you are using, they may have
different terminology or even reuse the exact same name but different
meaning (for example, I have heard of the terms "Virtual Servers"
referencing IIS Websites, and "Virtual Directory" nearly synonymous
with "Web Application", and so on).

ASP.Net never allowed its own "Web Application" to be in the / "root
directory" (and Visual Studio didn't allow it, either - perhaps it
does now). However, it is possible to just put ASPX pages and
web.config files in the root directory and IIS will execute it like
anything else. However, it is also possible to run ASPX pages that
don't work in the root directory when you move it -- I have seen
plenty of Web Applications that don't move and plenty of Web
Applications that can move. In short, anything goes -- it all depends
on the application.

I just stick with the basics and the rules that never change.


//David
http://w3-4u.blogspot.com
http://blogs.msdn.com/David.Wang
//

Yea, its all clear as mud eh? :-)

Its working out for me now for the time being and perhaps its due to the
IIS7 retooling that allows it to work this way. I know on XP like so many
others have done I simply created subdirectories under wwwroot as
wwwroot/myweb for example and then used the IIS Manager to mark myweb as a
virtual application (or the compiler would barf eh?).

With a Computer Name such as XP1 I would have to access that web site as
http: //xp1/myweb/ and all was well more or less with inescapable pathing
problems that cropped up when deployed to the host provider's server when
using ASP and some apparent pathing problems here and there using ASP.NET
which seem to be easier to work with using .

I can see how using virtual directories is the only way a hosting provider
could possibly support so many web sites but the notion of "applications"
has sure messed up my mind. Thanks for bringing some perspective to the
matter David...