Web application and publishing

O

Oriane

Hi,

I'm developinf an Asp.Net 3.5 site on W2k3, and I use a Web application
Visual Studio 2008 project. This Web app is configured on IIS 6 as an
"application" under a web site.

When I start an aspx page from IIS (or directly on the navigator), I get an
error about the <system.web> section in the web.config file. Something like:
using a section registered as allowDefinition="MachineToApplication" beyond
the application level is an error. This error is probably due to a virtual
directory not configured as an application in IIS".

So perhaps I should deployed my web app on a web site, and not on IIS web
app ? If I installed it on a client site, I suppose that I should also
create a new web site, and avoid to use an IIS Web ap ?

What a IIS web app is useful for ? Only for the development phase ?


Best regards
 
Joined
May 16, 2006
Messages
27
Reaction score
0
Your web application must be created in File System mode. In this case the virtual directory in IIS is not created. In file system mode, the visual studio creates a temporary virtual directory when the web app. is run.

While deploying, you need to create the virtual directory in IIS for the web application.
 
S

Steven Cheng [MSFT]

Hi Oriane,

From your description, you're encountering some problem when try deploying
an ASP.NET web application into IIS web application folder,correct?

Based on the error message you attached, I think the problem is likely due
to the IIS virtual directory(where your application deployed) is not
configured as an "Application" directory. are you using IIS6 or IIS5 or
IIS7? You can perform the check on the "virtual directory" via the
following steps:

**launch IIS management console, locate the virtual directory node(where
your ASP.NET app deployed)

** right click the node in navigation treeview and select "properites" in
context menu

** in the "directory" or "virtual directory" tab of the dialog, you can
find an "Application Name" field, if it is disabled, that means the virtual
directory is not an application virtual directory, you need to click the
"create" button to make it an application directory. Otherwise, the ASP.NET
application cannot run correctly in it.

BTW, if you're using Visual studio's "publish website" to deploy the web
application, it may help you automatically create an application virtual
directory. For more information about IIS asp.net deployment, here are some
further web reference:

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/2
f45f2ea-bcf8-4d23-9f15-5caf7ebdc2ef.mspx?mfr=true

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/e
317e63b-7572-4740-90bb-073eef1bcb17.mspx?mfr=true

http://www.codeproject.com/KB/aspnet/IIS7ASPNet.aspx

If there is anything unclear, please feel free to let me know.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
O

Oriane

Hi Steven,
----- Original Message -----
From: "Steven Cheng [MSFT]" <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Sent: Tuesday, September 02, 2008 4:47 AM
Subject: RE: Web application and publishing

Hi Oriane,

From your description, you're encountering some problem when try deploying
an ASP.NET web application into IIS web application folder,correct?
No. If I deploy it, it's ok. But if I try to run a page from this Asp.Net
web application, I've got the error message.
Based on the error message you attached, I think the problem is likely due
to the IIS virtual directory(where your application deployed) is not
configured as an "Application" directory. are you using IIS6 or IIS5 or
IIS7?
IIS 6.0

Best regards
 
O

Oriane

I suspect a sort of bug since if I create my Web app in a IIS root
directory, things work...
 
S

Steven Cheng [MSFT]

Thanks for your reply Oriane,

I suspect the cause is still the original web directory(not root) is not
configured as "Application". As you said that after you move the
application to the "root directory" of the IIS web site , it works. This is
likely due to the "root directory" is automatically an application virtual
directory.

Therefore, have you checked the "Application Name" property of the web
folder(not root) via the steps I mentioned in previous post?

=================
**launch IIS management console, locate the virtual directory node(where
your ASP.NET app deployed)

** right click the node in navigation treeview and select "properites" in
context menu

** in the "directory" or "virtual directory" tab of the dialog, you can
find an "Application Name" field, if it is disabled, that means the virtual
directory is not an application virtual directory, you need to click the
"create" button to make it an application directory. Otherwise, the ASP.NET
application cannot run correctly in it.
=====================

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.


==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
O

Oriane

Hi Steven,
Steven Cheng said:
Thanks for your reply Oriane,

I suspect the cause is still the original web directory(not root) is not
configured as "Application". As you said that after you move the
application to the "root directory" of the IIS web site , it works. This
is
likely due to the "root directory" is automatically an application virtual
directory.

Therefore, have you checked the "Application Name" property of the web
folder(not root) via the steps I mentioned in previous post?
Yes.

Best regards
 
S

Steven Cheng [MSFT]

Hi Oriane,

Thanks for your reply.

If you want to continue figure out the sub web directory deployment issue,
please feel free to contact me. You can also send some screenshot on the
IIS virtual directory hierarchy to me. You can reach me at:

"stcheng" + @ + "microsoft.com"

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
<[email protected]>
In-Reply-To: <[email protected]>
Subject: Re: Web application and publishing
Date: Wed, 3 Sep 2008 08:29:34 +0200
Hi Steven,
"Steven Cheng [MSFT]" <[email protected]> a écrit dans le message
de news:[email protected]...
Thanks for your reply Oriane,

I suspect the cause is still the original web directory(not root) is not
configured as "Application". As you said that after you move the
application to the "root directory" of the IIS web site , it works. This
is
likely due to the "root directory" is automatically an application virtual
directory.

Therefore, have you checked the "Application Name" property of the web
folder(not root) via the steps I mentioned in previous post?
Yes.

Best regards
 
O

Oriane

Hi Steven,
Steven Cheng said:
Hi Oriane,

Thanks for your reply.

If you want to continue figure out the sub web directory deployment issue,
please feel free to contact me. You can also send some screenshot on the
IIS virtual directory hierarchy to me.
Thanks for your proposal. But I've juste shifted the application directory
on another place and now it's ok. People who have similar problems thinks
that it can be caused by other web.config files located in sub-directory or
parent directory. This was not my case, anyway now I can go on working.

Oriane
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top