Can I use IIS with VWD instead of the development server?

A

Alan Silver

Hello,

I would like to create a new web site with VWD, but would like to run it
under IIS, not the development server. One reason for this is that I
want the web site to be at the domain root, not under a virtual
directory.

I have tried this, but don't seem to be able to get it to work. I
created a new (empty) web site in IIS, and then started a new project in
VWD and specified the type as HTTP. I browsed to http://test/ and
clicked OK to create the project.

This gave me a basic default.aspx page. I hit f5 to try it out and was
told that remote debugging was unavailable. I have enabled debugging on
the web site, so I have no idea why this should be. Without debugging,
most of the advantage of VWD has gone. Any idea how I enable it?

Anyway, I tried doing Ctrl-f5, which starts the project without
debugging. This time I got a browser window, but got a message saying
....

Server Application Unavailable
The web application you are attempting to access on this web server is
currently unavailable. Please hit the "Refresh" button in your web
browser to retry your request.

Administrator Note: An error message detailing the cause of this
specific request failure can be found in the application event log of
the web server. Please review this log entry to discover what caused
this error to occur.

I looked in the event log and found two entries, one warning and one
error. The warning said...

Failed to initialize the AppDomain:/LM/W3SVC/87257621/Root

Exception: System.IO.FileLoadException
Message: Could not load file or assembly 'System.Web, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. Access is denied.
StackTrace: at System.AppDomain.CreateInstance(String assemblyName,
String typeName)
at
System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironme
nt(String appId, IApplicationHost appHost, HostingEnvironmentParameters
hostingParameters)
at
System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironme
ntAndReportErrors(String appId, IApplicationHost appHost,
HostingEnvironmentParameters hostingParameters)

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

and the error said...

Failed to execute request because the App-Domain could not be created.
Error: 0x80070005 Access is denied.

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Does anyone have any idea what is going on here? Surely it can't be this
hard to create a web site.

I'm using Windows 2003 Server, with IIS6, VWD beta 2.

TIA
 
J

Juan T. Llibre

To specify the Web server for an already-created Web site,
open your local website with VWD and, in the Solution Explorer,
right-click the name of the Web site for which you want
to specify a Web server, and then click Property Pages.

In the Property Pages dialog box, click the Start Options tab.
Under Server, click Use custom server.

In the Base URL box, type the URL that Visual Web Developer
should start when running the current Web site. You can use localhost,
or you can use a dns domain name address if you have one.

From that point on, the VWD IDE will not use the internal web server,
but will use IIS to open your pages, i.e., if you are working on default.aspx,
it will be opened as : http://localhost/default.aspx
or as http://yourdomain.com/default.aspx
 
A

Alan Silver

Juan,

Thanks for the info, but it didn't work...
To specify the Web server for an already-created Web site,
open your local website with VWD and, in the Solution Explorer,
right-click the name of the Web site for which you want
to specify a Web server, and then click Property Pages.

Did this without problem.
In the Property Pages dialog box, click the Start Options tab.
Under Server, click Use custom server.

I couldn't do this as the option was greyed out. It was set at default
server.

IIS is running on the machine, I tested this web site before opening it
in VWD.

Any ideas? Thanks.
In the Base URL box, type the URL that Visual Web Developer
should start when running the current Web site. You can use localhost,
or you can use a dns domain name address if you have one.

From that point on, the VWD IDE will not use the internal web server,
but will use IIS to open your pages, i.e., if you are working on default.aspx,
it will be opened as : http://localhost/default.aspx
or as http://yourdomain.com/default.aspx
 
A

Alan Silver

In the Property Pages dialog box, click the Start Options tab. Under
Server, click Use custom server.

I just realised (after posting my reply) that when I run the site, it
does use IIS instead of the development server. I'm not sure why this
one is any different from my previous attempts, but even without the
custom server option, it does use IIS.

The problem I now have is that it won't let me debug. It says remote
debugging is not supported. I have checked in IIS and debugging is
switched on (under the ASP.NET tab of the web site's properties, click
the Edit Configuration button, and from the window that pops up, click
the Application tab - there's a checkbox named "enable debugging" that's
checked already).

Any idea how I get debugging working? Thanks
 
J

Juan T. Llibre

re:
IIS is running on the machine, I tested this web site before opening it in VWD.

If the site is already at an IIS server,
there's no use specifying it to use IIS, is there ?

The solution I outlined works for local websites which haven't been
published, which are the only ones which need to have IIS specified
as the default server so that the address is a "regular" address,
instead of an address plus a port ( which the internal server uses ).





Alan Silver said:
Juan,

Thanks for the info, but it didn't work...
To specify the Web server for an already-created Web site,
open your local website with VWD and, in the Solution Explorer,
right-click the name of the Web site for which you want
to specify a Web server, and then click Property Pages.

Did this without problem.
In the Property Pages dialog box, click the Start Options tab.
Under Server, click Use custom server.

I couldn't do this as the option was greyed out. It was set at default server.

IIS is running on the machine, I tested this web site before opening it in VWD.

Any ideas? Thanks.
 
A

Alan Silver

IIS is running on the machine, I tested this web site before opening
If the site is already at an IIS server,
there's no use specifying it to use IIS, is there ?

Erm, when you put it like that... no!!

You have to remember, I've only just started using VWD. All of my
ASP.NET (and classic ASP for that matter) development has been done with
a text editor. I just loaded the pages directly in a browser. I still
haven't got my head around the way VWD sets up a project.

I assumed that if you started a new site from an existing one, that VWD
might use the development server anyway. I hadn't managed to get far
enough to find out that it used the server already specified for the
existing site.

Anyway, I'm getting there. Thanks for the info.
The solution I outlined works for local websites which haven't been
published, which are the only ones which need to have IIS specified
as the default server so that the address is a "regular" address,
instead of an address plus a port ( which the internal server uses ).
 
A

Alan Silver

Any idea how I get debugging working?

Thanks for those. If I read them correctly (which I might not be), it
seems you can't do remote debugging with VWD. Since IIS is a separate
process from VWD, this means that the only way to debug ASP.NET pages is
to have a file-based project, and to use the development server.

As far as I can see, you can't have a file-based project and have it
running at the root of a domain, VWD always adds the project name as a
virtual folder. I need to be able to have the site running as
http://test/, and not http://test/SomeProject/. This sounds like I can't
develop and debug with VWD.

Is this right? If not, please explain as I can't see how to get it
working. Several of those articles had a table at the top showing the
versions to which they applied, and all had "no" by the express versions
of VWD.

Ta ra
 

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,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top